Dashboard perfomance improved. Filter for projects page
This commit is contained in:
parent
6d5c969872
commit
cff9519127
16 changed files with 215 additions and 112 deletions
|
@ -11,5 +11,5 @@
|
|||
%span.project-name= project.name
|
||||
%span.time
|
||||
%strong Last activity:
|
||||
= project.last_activity_date ? time_ago_in_words(project.last_activity_date) + " ago" : "Never"
|
||||
= project.last_activity_date_cached ? time_ago_in_words(project.last_activity_date_cached) + " ago" : "Never"
|
||||
|
||||
|
|
|
@ -15,3 +15,5 @@
|
|||
ago
|
||||
.clear
|
||||
|
||||
- if @commits.empty?
|
||||
%p.cgray Nothing to merge
|
||||
|
|
|
@ -20,3 +20,5 @@
|
|||
%p
|
||||
%center No preview for this file type
|
||||
|
||||
- if @diffs.empty?
|
||||
%p.cgray Nothing to merge
|
||||
|
|
|
@ -10,10 +10,10 @@
|
|||
%input{ :value => project.url_to_repo, :class => ['git-url', 'one_click_select', 'text', 'project_list_url'], :readonly => 'readonly' }
|
||||
%p.title.activity
|
||||
%span Last Activity:
|
||||
- last_note = project.notes.last
|
||||
= last_note ? last_note.created_at.stamp("24 Aug, 2011") : "Never"
|
||||
|
||||
%p.small-tags= tag_list project
|
||||
- if project.last_activity_date_cached
|
||||
= project.last_activity_date_cached.stamp("24 Aug, 2011")
|
||||
- else
|
||||
Never
|
||||
|
||||
.buttons
|
||||
%a.browse-code.button.yellow{:href => tree_project_ref_path(project, project.root_ref)} Browse code
|
||||
|
|
|
@ -7,13 +7,23 @@
|
|||
%h2.icon
|
||||
%span
|
||||
Projects
|
||||
%center
|
||||
= form_tag projects_path, :method => :get, :remote => true, :id => "projects_search_form" do
|
||||
= search_field_tag :project_search, nil, { :placeholder => 'Filter projects by name', :class => 'project_search text' }
|
||||
|
||||
%div.clear
|
||||
- unless @projects.empty?
|
||||
%div{:class => "tile", :style => view_mode_style("tile")}
|
||||
%div{:class => "tile"}
|
||||
= render "tile"
|
||||
%div{:class => "list", :style => view_mode_style("list")}
|
||||
= render "list"
|
||||
.clear
|
||||
.loading{ :style => "display:none;"}
|
||||
%center= image_tag "ajax-loader.gif"
|
||||
|
||||
- if @projects.count == @limit
|
||||
:javascript
|
||||
$(function(){
|
||||
ProjectsList.init(16);
|
||||
});
|
||||
- else
|
||||
%center.prepend-top
|
||||
%h2
|
||||
|
|
7
app/views/projects/index.js.haml
Normal file
7
app/views/projects/index.js.haml
Normal file
|
@ -0,0 +1,7 @@
|
|||
- if params[:replace]
|
||||
:plain
|
||||
ProjectsList.replace(#{@projects.count}, "#{escape_javascript(render(:partial => 'projects/tile'))}");
|
||||
- else
|
||||
:plain
|
||||
ProjectsList.append(#{@projects.count}, "#{escape_javascript(render(:partial => 'projects/tile'))}");
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue