Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-20 15:22:18 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2013-05-20 15:22:18 +0400
commite96374b74bc791858951d21d1a2dd7fb5fbaa1c9 (patch)
treeda2aa95112dd44b940f6ce91f51b3c201976772e
parentedc2e0a64be33dc05a5714acea891965fab1cdfa (diff)
Better remove project message
-rw-r--r--app/helpers/projects_helper.rb4
-rw-r--r--app/helpers/user_teams_helper.rb1
-rw-r--r--app/views/admin/projects/index.html.haml2
-rw-r--r--app/views/projects/edit.html.haml2
-rw-r--r--app/views/projects/empty.html.haml2
5 files changed, 7 insertions, 4 deletions
diff --git a/app/helpers/projects_helper.rb b/app/helpers/projects_helper.rb
index 1db8b7c689c..9b142714980 100644
--- a/app/helpers/projects_helper.rb
+++ b/app/helpers/projects_helper.rb
@@ -44,4 +44,8 @@ module ProjectsHelper
project.name
end
end
+
+ def remove_project_message(project)
+ "You are going to remove #{project.name_with_namespace}.\n Removed project CANNOT be restored!\n Are you ABSOLUTELY sure?"
+ end
end
diff --git a/app/helpers/user_teams_helper.rb b/app/helpers/user_teams_helper.rb
index 2055bb3c8bc..8603ee434a8 100644
--- a/app/helpers/user_teams_helper.rb
+++ b/app/helpers/user_teams_helper.rb
@@ -22,5 +22,4 @@ module UserTeamsHelper
def remove_from_user_team_message(team, member)
"You are going to remove #{member.name} from #{team.name}. Are you sure?"
end
-
end
diff --git a/app/views/admin/projects/index.html.haml b/app/views/admin/projects/index.html.haml
index aa006dfc997..59831d83cc2 100644
--- a/app/views/admin/projects/index.html.haml
+++ b/app/views/admin/projects/index.html.haml
@@ -53,7 +53,7 @@
= link_to project.name_with_namespace, [:admin, project]
.pull-right
= link_to 'Edit', edit_project_path(project), id: "edit_#{dom_id(project)}", class: "btn btn-small"
- = link_to 'Destroy', [project], confirm: "REMOVE #{project.name}? Are you sure?", method: :delete, class: "btn btn-small btn-remove"
+ = link_to 'Destroy', [project], confirm: remove_project_message(project), method: :delete, class: "btn btn-small btn-remove"
- if @projects.blank?
%p.nothing_here_message 0 projects matches
= paginate @projects, theme: "gitlab"
diff --git a/app/views/projects/edit.html.haml b/app/views/projects/edit.html.haml
index dd087100e4c..d57aa83ec2b 100644
--- a/app/views/projects/edit.html.haml
+++ b/app/views/projects/edit.html.haml
@@ -147,7 +147,7 @@
%p
%strong Removed project can not be restored!
- = link_to 'Remove project', @project, confirm: 'Removed project can not be restored! Are you sure?', method: :delete, class: "btn btn-remove btn-small"
+ = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove btn-small"
- else
%p.nothing_here_message Only project owner can remove a project
diff --git a/app/views/projects/empty.html.haml b/app/views/projects/empty.html.haml
index b1795b301b0..56dbbf0755e 100644
--- a/app/views/projects/empty.html.haml
+++ b/app/views/projects/empty.html.haml
@@ -31,4 +31,4 @@
- if can? current_user, :remove_project, @project
.prepend-top-20
- = link_to 'Remove project', @project, confirm: 'Are you sure?', method: :delete, class: "btn btn-remove pull-right"
+ = link_to 'Remove project', @project, confirm: remove_project_message(@project), method: :delete, class: "btn btn-remove pull-right"