Commit e96374b74bc791858951d21d1a2dd7fb5fbaa1c9
1 parent
edc2e0a6
Exists in
master
and in
4 other branches
Better remove project message
Showing
5 changed files
with
7 additions
and
4 deletions
Show diff stats
app/helpers/projects_helper.rb
app/helpers/user_teams_helper.rb
app/views/admin/projects/index.html.haml
... | ... | @@ -53,7 +53,7 @@ |
53 | 53 | = link_to project.name_with_namespace, [:admin, project] |
54 | 54 | .pull-right |
55 | 55 | = link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small" |
56 | - = link_to 'Destroy', [project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove" | |
56 | + = link_to 'Destroy', [project], confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove" | |
57 | 57 | - if @projects.blank? |
58 | 58 | %p.nothing_here_message 0 projects matches |
59 | 59 | = paginate @projects, theme: "gitlab" | ... | ... |
app/views/projects/edit.html.haml
... | ... | @@ -147,7 +147,7 @@ |
147 | 147 | %p |
148 | 148 | %strong Removed project can not be restored! |
149 | 149 | |
150 | - = link_to 'Remove project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn btn-remove btn-small" | |
150 | + = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove btn-small" | |
151 | 151 | - else |
152 | 152 | %p.nothing_here_message Only project owner can remove a project |
153 | 153 | ... | ... |
app/views/projects/empty.html.haml
... | ... | @@ -31,4 +31,4 @@ |
31 | 31 | |
32 | 32 | - if can? current_user, :remove_project, @project |
33 | 33 | .prepend-top-20 |
34 | - = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove pull-right" | |
34 | + = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove pull-right" | ... | ... |