summaryrefslogtreecommitdiff
path: root/app/views/dashboard/projects.html.haml
blob: c2cde6551d4bf4ab035af2c17759c5ddd4b7d381 (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
.pull-right
  .dropdown.inline
    %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
      %span.light sort:
      - if @sort.present?
        = @sort.humanize
      - else
        Name
      %b.caret
    %ul.dropdown-menu
      %li
        = link_to projects_dashboard_filter_path(sort: nil) do
          Name
        = link_to projects_dashboard_filter_path(sort: 'newest') do
          Newest
        = link_to projects_dashboard_filter_path(sort: 'oldest') do
          Oldest
        = link_to projects_dashboard_filter_path(sort: 'recently_updated') do
          Recently updated
        = link_to projects_dashboard_filter_path(sort: 'last_updated') do
          Last updated
%p.light
  All projects you have access to are listed here. Public projects are not included here unless you are a member
%hr
.row
  .col-md-3.hidden-sm.hidden-xs.side-filters
    = render "projects_filter"
  .col-md-9
    %ul.bordered-list.my-projects.top-list
      - @projects.each do |project|
        %li.my-project-row
          %h4.project-title
            .project-access-icon
              = visibility_level_icon(project.visibility_level)
            = link_to project_path(project), class: dom_class(project) do
              = project.name_with_namespace

            - if current_user.can_leave_project?(project)
              .pull-right
                = link_to leave_project_team_members_path(project), data: { confirm: "Leave project?"}, method: :delete, remote: true, class: "btn-tiny btn remove-row", title: 'Leave project' do
                  %i.icon-signout
                  Leave

            - 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
              - if project.archived?
                %span.label
                  %i.icon-archive
                  Archived
              - project.tags.each do |tag|
                %span.label.label-info
                  %i.icon-tag
                  = tag.name
            - if project.description.present?
              %p{ dir: 'auto' }= truncate project.description, length: 100
            .last-activity
              %span.light Last activity:
              %span.date= project_last_activity(project)


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