summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_form.html.haml
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2016-07-08 00:42:16 +0300
committerValery Sizov <valery@gitlab.com>2016-07-12 19:52:14 +0300
commitc39356998b1850f3dc26fe0b987cb419c1d1afb4 (patch)
treeb9cc4982fe65e1ae71146b7a9d4383b94126b8ae /app/views/shared/issuable/_form.html.haml
parenta6a6970961cdfa3908384691ab37d9deb4785841 (diff)
downloadgitlab-ce-c39356998b1850f3dc26fe0b987cb419c1d1afb4.tar.gz
Optimistic locking for Issue and Merge Requests
Diffstat (limited to 'app/views/shared/issuable/_form.html.haml')
-rw-r--r--app/views/shared/issuable/_form.html.haml9
1 files changed, 9 insertions, 0 deletions
diff --git a/app/views/shared/issuable/_form.html.haml b/app/views/shared/issuable/_form.html.haml
index c30bdb0ae91..98bbb12eaec 100644
--- a/app/views/shared/issuable/_form.html.haml
+++ b/app/views/shared/issuable/_form.html.haml
@@ -1,5 +1,12 @@
= form_errors(issuable)
+- if @conflict
+ .alert.alert-danger
+ Someone edited the #{issuable.class.model_name.human.downcase} the same time you did.
+ Please check out
+ = link_to "the #{issuable.class.model_name.human.downcase}", polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), target: "_blank"
+ and make sure your changes will not unintentionally remove theirs
+
.form-group
= f.label :title, class: 'control-label'
.col-sm-10
@@ -149,3 +156,5 @@
= link_to 'Delete', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), data: { confirm: "#{issuable.class.name.titleize} will be removed! Are you sure?" },
method: :delete, class: 'btn btn-danger btn-grouped'
= link_to 'Cancel', polymorphic_path([@project.namespace.becomes(Namespace), @project, issuable]), class: 'btn btn-grouped btn-cancel'
+
+= f.hidden_field :lock_version