projects.html.haml 2.1 KB
Newer Older
1 2 3 4 5
%h3.page_title
  Projects
  %span
    (#{@projects.total_count})
  - if current_user.can_create_project?
6
    %span.pull-right
D
Dmitriy Zaporozhets 已提交
7
      = link_to new_project_path, class: "btn btn-tiny info" do
8 9 10
        %i.icon-plus
        New Project

D
Dmitriy Zaporozhets 已提交
11

12 13 14 15 16
%hr
.row
  .span3
    %ul.nav.nav-pills.nav-stacked
      = nav_tab :scope, nil do
D
Dmitriy Zaporozhets 已提交
17
        = link_to "All", projects_dashboard_path
18
      = nav_tab :scope, 'personal' do
D
Dmitriy Zaporozhets 已提交
19
        = link_to "Personal", projects_dashboard_path(scope: 'personal')
20
      = nav_tab :scope, 'joined' do
D
Dmitriy Zaporozhets 已提交
21
        = link_to "Joined", projects_dashboard_path(scope: 'joined')
22 23

  .span9
D
Dmitriy Zaporozhets 已提交
24
    = form_tag projects_dashboard_path, method: 'get' do
25 26
      %fieldset.dashboard-search-filter
        = hidden_field_tag "scope", params[:scope]
27
        = search_field_tag "search", params[:search], { id: 'dashboard_projects_search', placeholder: 'Search', class: 'left input-xxlarge'}
28 29 30
        = button_tag type: 'submit', class: 'btn' do
          %i.icon-search

D
Dmitriy Zaporozhets 已提交
31
    %ul.bordered-list
32
      - @projects.each do |project|
D
Dmitriy Zaporozhets 已提交
33
        %li.clearfix
34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
          .clearfix
            %h5
              = link_to project_path(project), class: dom_class(project) do
                - if project.namespace
                  = project.namespace.human_name
                  \/
                %strong
                  = truncate(project.name, length: 45)
              .pull-right.light
                - if project.owner == current_user
                  %i.icon-wrench
                - tm = project.team.get_tm(current_user.id)
                - if tm
                  %strong= tm.project_access_human
          .clearfix
            .left
              - if project.description.present?
                %span.light= project.description
D
Dmitriy Zaporozhets 已提交
52 53 54 55
              - project.labels.each do |label|
                %span.label.label-info
                  %i.icon-tag
                  = label.name
56 57 58 59

            .pull-right.light
              %small.light
                Last activity #{project_last_activity(project)}
D
Dmitriy Zaporozhets 已提交
60

61 62 63
      - if @projects.blank?
        %li
          %h3.nothing_here_message There are no projects here.
64 65 66
    .bottom
      %hr
      = paginate @projects, theme: "gitlab"
67