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:
authorRubén Dávila <rdavila84@gmail.com>2016-02-11 18:00:45 +0300
committerRobert Speicher <rspeicher@gmail.com>2016-02-19 21:14:53 +0300
commit5ad78cdbda7e5393bda5267adc7e7aab3c11956f (patch)
tree9ec34d4782f3b6a07d3611598587fafdb1bf484a
parentb8295fc3232a3d9ca2af524225f9a66ab7735926 (diff)
Use a custom title in the revert modal.
-rw-r--r--app/views/projects/commit/_revert.html.haml2
-rw-r--r--app/views/projects/commit/show.html.haml2
-rw-r--r--app/views/projects/merge_requests/_show.html.haml2
3 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/commit/_revert.html.haml b/app/views/projects/commit/_revert.html.haml
index ef1aced495a..5c9f6dbbccc 100644
--- a/app/views/projects/commit/_revert.html.haml
+++ b/app/views/projects/commit/_revert.html.haml
@@ -3,7 +3,7 @@
.modal-content
.modal-header
%a.close{href: "#", "data-dismiss" => "modal"} ×
- %h3.page-title Revert commit
+ %h3.page-title== Revert: "#{title}"
.modal-body
= form_tag revert_namespace_project_commit_path(@project.namespace, @project, commit_id), method: :post, remote: false, class: 'form-horizontal js-create-dir-form js-requires-input' do
.form-group.branch
diff --git a/app/views/projects/commit/show.html.haml b/app/views/projects/commit/show.html.haml
index 0666dfaf8f4..104934ef913 100644
--- a/app/views/projects/commit/show.html.haml
+++ b/app/views/projects/commit/show.html.haml
@@ -13,4 +13,4 @@
diff_refs: @diff_refs
= render "projects/notes/notes_with_form"
- if can_collaborate_with_project?
- = render "projects/commit/revert", commit_id: @commit.id
+ = render "projects/commit/revert", commit_id: @commit.id, title: @commit.title
diff --git a/app/views/projects/merge_requests/_show.html.haml b/app/views/projects/merge_requests/_show.html.haml
index 24a33954821..f7ed3a25180 100644
--- a/app/views/projects/merge_requests/_show.html.haml
+++ b/app/views/projects/merge_requests/_show.html.haml
@@ -86,7 +86,7 @@
= render 'shared/issuable/sidebar', issuable: @merge_request
- if @merge_request.merge_commit_sha
- = render "projects/commit/revert", commit_id: @merge_request.merge_commit_sha
+ = render "projects/commit/revert", commit_id: @merge_request.merge_commit_sha, title: @merge_request.title
:javascript
var merge_request;