OSDN Git Service

Convert span into col-md
[wvm/gitlab.git] / app / views / dashboard / projects.html.haml
1 %h3.page-title
2   My Projects
3 .pull-right
4   .dropdown.inline
5     %a.dropdown-toggle.btn.btn-small{href: '#', "data-toggle" => "dropdown"}
6       %span.light sort:
7       - if @sort.present?
8         = @sort.humanize
9       - else
10         Name
11       %b.caret
12     %ul.dropdown-menu
13       %li
14         = link_to projects_dashboard_filter_path(sort: nil) do
15           Name
16         = link_to projects_dashboard_filter_path(sort: 'newest') do
17           Newest
18         = link_to projects_dashboard_filter_path(sort: 'oldest') do
19           Oldest
20         = link_to projects_dashboard_filter_path(sort: 'recently_updated') do
21           Recently updated
22         = link_to projects_dashboard_filter_path(sort: 'last_updated') do
23           Last updated
24 %p.light
25   All projects you have access to are listed here. Public projects are not included here unless you are a member
26 %hr
27 .row
28   .col-md-3
29     %ul.nav.nav-pills.nav-stacked
30       = nav_tab :scope, nil do
31         = link_to projects_dashboard_filter_path(scope: nil) do
32           All
33           %span.pull-right
34             = current_user.authorized_projects.count
35       = nav_tab :scope, 'personal' do
36         = link_to projects_dashboard_filter_path(scope: 'personal') do
37           Personal
38           %span.pull-right
39             = current_user.personal_projects.count
40       = nav_tab :scope, 'joined' do
41         = link_to projects_dashboard_filter_path(scope: 'joined') do
42           Joined
43           %span.pull-right
44             = current_user.authorized_projects.joined(current_user).count
45       = nav_tab :scope, 'owned' do
46         = link_to projects_dashboard_filter_path(scope: 'owned') do
47           Owned
48           %span.pull-right
49             = current_user.owned_projects.count
50
51     %fieldset
52       %legend Visibility
53       %ul.bordered-list.visibility-filter
54         - Gitlab::VisibilityLevel.values.each do |level|
55           %li{ class: (level.to_s == params[:visibility_level]) ? 'active' : 'light' }
56             = link_to projects_dashboard_filter_path(visibility_level: level) do
57               = visibility_level_icon(level)
58               = visibility_level_label(level)
59
60     - if @groups.present?
61       %fieldset
62         %legend Groups
63         %ul.bordered-list
64           - @groups.each do |group|
65             %li{ class: (group.name == params[:group]) ? 'active' : 'light' }
66               = link_to projects_dashboard_filter_path(group: group.name) do
67                 %i.icon-folder-close-alt
68                 = group.name
69                 %small.pull-right
70                   = group.projects.count
71
72
73
74     - if @labels.present?
75       %fieldset
76         %legend Labels
77         %ul.bordered-list
78           - @labels.each do |label|
79             %li{ class: (label.name == params[:label]) ? 'active' : 'light' }
80               = link_to projects_dashboard_filter_path(scope: params[:scope], label: label.name) do
81                 %i.icon-tag
82                 = label.name
83
84   .col-md-9
85     %ul.bordered-list.my-projects.top-list
86       - @projects.each do |project|
87         %li.my-project-row
88           %h4.project-title
89             .project-access-icon
90               = visibility_level_icon(project.visibility_level)
91             = link_to project_path(project), class: dom_class(project) do
92               = project.name_with_namespace
93
94             - if current_user.can_leave_project?(project)
95               .pull-right
96                 = 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
97                   %i.icon-signout
98                   Leave
99
100             - if project.forked_from_project
101               %small.pull-right
102                 %i.icon-code-fork
103                 Forked from:
104                 = link_to project.forked_from_project.name_with_namespace, project_path(project.forked_from_project)
105           .project-info
106             .pull-right
107               - if project.archived?
108                 %span.label
109                   %i.icon-archive
110                   Archived
111               - project.labels.each do |label|
112                 %span.label.label-info
113                   %i.icon-tag
114                   = label.name
115             - if project.description.present?
116               %p= truncate project.description, length: 100
117             .last-activity
118               %span.light Last activity:
119               %span.date= project_last_activity(project)
120
121
122         - if @projects.blank?
123           %li
124             %h3.nothing_here_message There are no projects here.
125     .bottom
126       = paginate @projects, theme: "gitlab"
127