summaryrefslogtreecommitdiff
path: root/app/views/dashboard/projects.html.haml
blob: 8fd0744a63fb0664d820787a480a853315d369a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
%h3.page-title My Projects
%p.light
  All projects you have access to are listed here. Public projects are not included here unless you have membership in it
%hr
.row
  .span3
    %ul.nav.nav-pills.nav-stacked
      = nav_tab :scope, nil do
        = link_to projects_dashboard_path do
          All
          %span.pull-right
            = current_user.authorized_projects.count
      = nav_tab :scope, 'personal' do
        = link_to projects_dashboard_path(scope: 'personal') do
          Personal
          %span.pull-right
            = current_user.personal_projects.count
      = nav_tab :scope, 'joined' do
        = link_to projects_dashboard_path(scope: 'joined') do
          Joined
          %span.pull-right
            = current_user.authorized_projects.joined(current_user).count
      = nav_tab :scope, 'owned' do
        = link_to projects_dashboard_path(scope: 'owned') do
          Owned
          %span.pull-right
            = current_user.owned_projects.count

    - if @labels.present?
      %p.light Filter by label:
      %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

  .span9
    %ul.bordered-list.my-projects.top-list
      - @projects.each do |project|
        %li
          %h4.project-title
            %span.access-icon
              - if project.public
                = public_icon
              - else
                = private_icon
            = link_to project_path(project), class: dom_class(project) do
              = project.name_with_namespace

            - 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)

        - if @projects.blank?
          %li
            %h3.nothing_here_message There are no projects here.
    .bottom
      = paginate @projects, theme: "gitlab"