mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-20 18:16:45 +10:00
Added visibility_level icons to project view (rather than just text). Added public projects to search results. Added ability to restrict visibility levels standard users can set.
96 lines
3.3 KiB
Plaintext
96 lines
3.3 KiB
Plaintext
%h3.page-title My Projects
|
|
%p.light
|
|
All projects you have access to are listed here. Public projects are not included here unless you are a member
|
|
%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 @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
|
|
|
|
|
|
|
|
- if @labels.present?
|
|
%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
|
|
|
|
.span9
|
|
%ul.bordered-list.my-projects.top-list
|
|
- @projects.each do |project|
|
|
%li.my-project-row
|
|
%h4.project-title
|
|
= link_to project_path(project), class: dom_class(project) do
|
|
= project.name_with_namespace
|
|
- unless project.private?
|
|
%small.access-icon
|
|
= visibility_level_icon(project.visibility_level)
|
|
= visibility_level_label(project.visibility_level)
|
|
|
|
- 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
|
|
|
|
- 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"
|
|
|