projects.html.haml 3.32 KB
Newer Older
1
%h3.page-title My Projects
2
%p.light
3
  All projects you have access to are listed here. Public projects are not included here unless you are a member
4
%hr
5 6 7 8
.row
  .span3
    %ul.nav.nav-pills.nav-stacked
      = nav_tab :scope, nil do
9 10 11 12
        = link_to projects_dashboard_path do
          All
          %span.pull-right
            = current_user.authorized_projects.count
13
      = nav_tab :scope, 'personal' do
14 15 16 17
        = link_to projects_dashboard_path(scope: 'personal') do
          Personal
          %span.pull-right
            = current_user.personal_projects.count
18
      = nav_tab :scope, 'joined' do
19 20 21 22
        = link_to projects_dashboard_path(scope: 'joined') do
          Joined
          %span.pull-right
            = current_user.authorized_projects.joined(current_user).count
23
      = nav_tab :scope, 'owned' do
24 25 26 27
        = link_to projects_dashboard_path(scope: 'owned') do
          Owned
          %span.pull-right
            = current_user.owned_projects.count
28

29 30 31 32 33 34 35 36 37 38 39 40 41 42 43

    - if @groups.present?
      %fieldset
        %legend Groups
        %ul.bordered-list
          - @groups.each do |group|
            %li{ class: (group.name == params[:group]) ? 'active' : 'light' }
              = link_to projects_dashboard_path(group: group.name) do
                %i.icon-folder-close-alt
                = group.name
                %small.pull-right
                  = group.projects.count



44
    - if @labels.present?
45 46 47 48 49 50 51 52
      %fieldset
        %legend Labels
        %ul.bordered-list
          - @labels.each do |label|
            %li{ class: (label.name == params[:label]) ? 'active' : 'light' }
              = link_to projects_dashboard_path(scope: params[:scope], label: label.name) do
                %i.icon-tag
                = label.name
53

54
  .span9
55
    %ul.bordered-list.my-projects.top-list
56
      - @projects.each do |project|
57
        %li.my-project-row
58
          %h4.project-title
59
            = link_to project_path(project), class: dom_class(project) do
60
              = project.name_with_namespace
61
            - unless project.private?
62
              %small.access-icon
63 64
                = visibility_level_icon(project.visibility_level)
                = visibility_level_label(project.visibility_level)
65

66 67 68 69 70 71
            - if current_user.can_leave_project?(project)
              .pull-right
                = link_to leave_project_team_members_path(project), confirm: "Leave project?", method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
                  %i.icon-signout
                  Leave

72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
            - if project.forked_from_project
              %small.pull-right
                %i.icon-code-fork
                Forked from:
                = link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
          .project-info
            .pull-right
              - project.labels.each do |label|
                %span.label.label-info
                  %i.icon-tag
                  = label.name
            - if project.description.present?
              %p= truncate project.description, length: 100
            .last-activity
              %span.light Last activity:
              %span.date= project_last_activity(project)
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
88

89

90 91 92
        - if @projects.blank?
          %li
            %h3.nothing_here_message There are no projects here.
93 94
    .bottom
      = paginate @projects, theme: "gitlab"
95