From 5ad78cdbda7e5393bda5267adc7e7aab3c11956f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rub=C3=A9n=20D=C3=A1vila?= Date: Thu, 11 Feb 2016 10:00:45 -0500 Subject: [PATCH] Use a custom title in the revert modal. --- app/views/projects/commit/_revert.html.haml | 2 +- app/views/projects/commit/show.html.haml | 2 +- app/views/projects/merge_requests/_show.html.haml | 2 +- 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; -- GitLab