diff options
author | Steven Thonus <steven@ln2.nl> | 2013-11-29 17:10:59 +0100 |
---|---|---|
committer | Steven Thonus <steven@ln2.nl> | 2013-12-16 14:39:14 +0100 |
commit | 37383966ef3fada865d3d21a8ce7a3c640bbd11e (patch) | |
tree | c7fe9015cd5d3b336e868498bb478fd523de0a86 /app/views | |
parent | 99490159e5f9d6ff4b45f78b977d01caa1e3c4fc (diff) | |
download | gitlab-ce-37383966ef3fada865d3d21a8ce7a3c640bbd11e.tar.gz |
Archiving old projects; archived projects aren't shown on dashboard
features for archive projects
abilities for archived project
other abilities for archive projects
only limit commits and merges for archived projects
ability changed to prohibited actions on archived projects
added spec and feature tests for archive projects
changed search bar not to include archived projects
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/dashboard/projects.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/_home_panel.html.haml | 4 | ||||
-rw-r--r-- | app/views/projects/edit.html.haml | 27 |
3 files changed, 35 insertions, 0 deletions
diff --git a/app/views/dashboard/projects.html.haml b/app/views/dashboard/projects.html.haml index b42bbf58dc4..23d78720881 100644 --- a/app/views/dashboard/projects.html.haml +++ b/app/views/dashboard/projects.html.haml @@ -82,6 +82,10 @@ = 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-book + Archived - project.labels.each do |label| %span.label.label-info %i.icon-tag diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 19c150b54fb..ae5deb0b6de 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -7,6 +7,10 @@ %span.visibility-level-label = visibility_level_icon(@project.visibility_level) = visibility_level_label(@project.visibility_level) + - if @project.archived? + %span.visibility-level-label + %i.icon-book + Archived .span7 - unless empty_repo diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml index 57936cff10f..c56919e792c 100644 --- a/app/views/projects/edit.html.haml +++ b/app/views/projects/edit.html.haml @@ -98,6 +98,33 @@ %i.icon-chevron-down .js-toggle-visibility-container.hide + - if can? current_user, :archive_project, @project + .ui-box.ui-box-danger + .title + - if @project.archived? + Unarchive project + - else + Archive project + .ui-box-body + - if @project.archived? + %p + Unarchiving the project will mark its repository as active. + %br + The project can be committed to. + %br + %strong Once active this project shows up in the search and on the dashboard. + = link_to 'Unarchive', unarchive_project_path(@project), confirm: "Are you sure that you want to unarchive this project?\nWhen this project is unarchived it is active and can be comitted to again.", method: :post, class: "btn btn-remove" + - else + %p + Archiving the project will mark its repository as read-only. + %br + It is hidden from the dashboard and doesn't show up in searches. + %br + %strong Archived projects cannot be committed to! + = link_to 'Archive', archive_project_path(@project), confirm: "Are you sure that you want to archive this project?\nAn archived project cannot be committed to.", method: :post, class: "btn btn-remove" + - else + %p.nothing_here_message Only the project owner can archive a project + - if can?(current_user, :change_namespace, @project) .ui-box.ui-box-danger .title Transfer project |