Add projects page to dashboard. Remove projects pagination on dashboard

This commit is contained in:
Dmitriy Zaporozhets 2013-01-27 12:34:27 +02:00
parent b68bba441e
commit bd3b677b86
5 changed files with 71 additions and 24 deletions

View file

@ -0,0 +1,46 @@
%h3.page_title
Projects
%span
(#{@projects.total_count})
- if current_user.can_create_project?
%span.right
= link_to new_project_path, class: "btn very_small info" do
%i.icon-plus
New Project
%hr
.row
.span3
%ul.nav.nav-pills.nav-stacked
= nav_tab :scope, nil do
= link_to "All", dashboard_projects_path
= nav_tab :scope, 'personal' do
= link_to "Personal", dashboard_projects_path(scope: 'personal')
= nav_tab :scope, 'joined' do
= link_to "Joined", dashboard_projects_path(scope: 'joined')
.span9
= form_tag dashboard_projects_path, method: 'get' do
%fieldset.dashboard-search-filter
= hidden_field_tag "scope", params[:scope]
= search_field_tag "search", params[:search], { placeholder: 'Search', class: 'left input-xxlarge' }
= button_tag type: 'submit', class: 'btn' do
%i.icon-search
%ul.well-list
- @projects.each do |project|
%li
= link_to project_path(project), class: dom_class(project) do
- if project.namespace
= project.namespace.human_name
\/
%strong.well-title
= truncate(project.name, length: 25)
%span.right.light
%strong Last activity:
%span= project_last_activity(project)
- if @projects.blank?
%li
%h3.nothing_here_message There are no projects here.
.bottom= paginate @projects, theme: "gitlab"