summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKushal Pandya <kushal@gitlab.com>2017-04-07 18:18:58 +0530
committerKushal Pandya <kushal@gitlab.com>2017-04-07 18:18:58 +0530
commit6f15e89a6b83dcfef897dda414325b85090e2c40 (patch)
tree3b2d8d2fc6729410923571dffff05b715fedf7dd
parent72419f3a8b94874de059f3567980844c7aaa6336 (diff)
downloadgitlab-ce-18471-restrict-tag-pushes-protected-tags.tar.gz
Show Flash message above Tags list18471-restrict-tag-pushes-protected-tags
-rw-r--r--app/assets/javascripts/protected_tags/protected_tag_edit.js2
-rw-r--r--app/assets/stylesheets/pages/projects.scss4
-rw-r--r--app/views/projects/protected_tags/_tags_list.html.haml4
3 files changed, 8 insertions, 2 deletions
diff --git a/app/assets/javascripts/protected_tags/protected_tag_edit.js b/app/assets/javascripts/protected_tags/protected_tag_edit.js
index 624067a5a09..09a387c0f9e 100644
--- a/app/assets/javascripts/protected_tags/protected_tag_edit.js
+++ b/app/assets/javascripts/protected_tags/protected_tag_edit.js
@@ -43,7 +43,7 @@ export default class ProtectedTagEdit {
},
},
error() {
- new Flash('Failed to update tag!');
+ new Flash('Failed to update tag!', null, $('.js-protected-tags-list'));
},
}).always(() => {
this.$allowedToCreateDropdownButton.enable();
diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss
index 61b973e0aa9..717ebb44a23 100644
--- a/app/assets/stylesheets/pages/projects.scss
+++ b/app/assets/stylesheets/pages/projects.scss
@@ -782,6 +782,10 @@ pre.light-well {
width: 100%;
max-width: 300px;
}
+
+ .flash-container {
+ padding: 0;
+ }
}
.custom-notifications-form {
diff --git a/app/views/projects/protected_tags/_tags_list.html.haml b/app/views/projects/protected_tags/_tags_list.html.haml
index cc006ed8a0b..728afd75b50 100644
--- a/app/views/projects/protected_tags/_tags_list.html.haml
+++ b/app/views/projects/protected_tags/_tags_list.html.haml
@@ -1,4 +1,4 @@
-.panel.panel-default.protected-tags-list
+.panel.panel-default.protected-tags-list.js-protected-tags-list
- if @protected_tags.empty?
.panel-heading
%h3.panel-title
@@ -21,6 +21,8 @@
- if can_admin_project
%th
%tbody
+ %tr
+ %td.flash-container{ colspan: 4 }
= render partial: 'projects/protected_tags/protected_tag', collection: @protected_tags, locals: { can_admin_project: can_admin_project}
= paginate @protected_tags, theme: 'gitlab'