summaryrefslogtreecommitdiff
path: root/app/views/projects/protected_tags
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/projects/protected_tags')
-rw-r--r--app/views/projects/protected_tags/shared/_create_protected_tag.html.haml17
-rw-r--r--app/views/projects/protected_tags/shared/_index.html.haml12
-rw-r--r--app/views/projects/protected_tags/shared/_tags_list.html.haml6
3 files changed, 14 insertions, 21 deletions
diff --git a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml
index c4bf2d20ecf..332cdd98e4a 100644
--- a/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml
+++ b/app/views/projects/protected_tags/shared/_create_protected_tag.html.haml
@@ -2,24 +2,19 @@
%input{ type: 'hidden', name: 'update_section', value: 'js-protected-tags-settings' }
.card
.card-header
- Protect a tag
+ = _('Protect a tag')
.card-body
= form_errors(@protected_tag)
.form-group.row
- .col-md-2.text-right
- = f.label :name, 'Tag:'
+ = f.label :name, _('Tag:'), class: 'col-md-2 text-left text-md-right'
.col-md-10.protected-tags-dropdown
= render partial: "projects/protected_tags/shared/dropdown", locals: { f: f }
.form-text.text-muted
- = link_to 'Wildcards', help_page_path('user/project/protected_tags', anchor: 'wildcard-protected-tags')
- such as
- %code v*
- or
- %code *-release
- are supported
+ - wildcards_url = help_page_path('user/project/protected_tags', anchor: 'wildcard-protected-tags')
+ - wildcards_link_start = '<a href="%{url}" target="_blank" rel="noopener noreferrer">'.html_safe % { url: wildcards_url }
+ = html_escape(_("%{wildcards_link_start}Wildcards%{wildcards_link_end} such as %{code_tag_start}v*%{code_tag_end} or %{code_tag_start}*-release%{code_tag_end} are supported.")) % { wildcards_link_start: wildcards_link_start, wildcards_link_end: '</a>'.html_safe, code_tag_start: '<code>'.html_safe, code_tag_end: '</code>'.html_safe }
.form-group.row
- %label.col-md-2.text-right{ for: 'create_access_levels_attributes' }
- Allowed to create:
+ = f.label :create_access_levels_attributes, _('Allowed to create:'), class: 'col-md-2 text-left text-md-right'
.col-md-10
.create_access_levels-container
= yield :create_access_levels
diff --git a/app/views/projects/protected_tags/shared/_index.html.haml b/app/views/projects/protected_tags/shared/_index.html.haml
index 4bf3ce09fc7..5734b7dc3c9 100644
--- a/app/views/projects/protected_tags/shared/_index.html.haml
+++ b/app/views/projects/protected_tags/shared/_index.html.haml
@@ -7,16 +7,14 @@
%button.btn.js-settings-toggle{ type: 'button' }
= expanded ? 'Collapse' : 'Expand'
%p
- Limit access to creating and updating tags.
+ Limit access to creating and updating tags. #{link_to "What are protected tags?", help_page_path("user/project/protected_tags")}
.settings-content
%p
- By default, protected tags are designed to:
+ By default, protected tags protect your code and:
%ul
- %li Prevent tag creation by everybody except Maintainers
- %li Prevent <strong>anyone</strong> from updating the tag
- %li Prevent <strong>anyone</strong> from deleting the tag
-
- %p Read more about #{link_to "protected tags", help_page_path("user/project/protected_tags")}.
+ %li Allow only users with Maintainer #{link_to "permissions", help_page_path("user/permissions")} to create tags.
+ %li Prevent <strong>anyone</strong> from updating tags.
+ %li Prevent <strong>anyone</strong> from deleting tags.
- if can? current_user, :admin_project, @project
= yield :create_protected_tag
diff --git a/app/views/projects/protected_tags/shared/_tags_list.html.haml b/app/views/projects/protected_tags/shared/_tags_list.html.haml
index 382ea848243..a5a43072744 100644
--- a/app/views/projects/protected_tags/shared/_tags_list.html.haml
+++ b/app/views/projects/protected_tags/shared/_tags_list.html.haml
@@ -1,9 +1,9 @@
.protected-tags-list.js-protected-tags-list
- if @protected_tags.empty?
.card-header
- Protected tag (#{@protected_tags_count})
+ Protected tags (#{@protected_tags_count})
%p.settings-message.text-center
- There are currently no protected tags, protect a tag with the form above.
+ No tags are protected.
- else
- can_admin_project = can?(current_user, :admin_project, @project)
@@ -16,7 +16,7 @@
%col
%thead
%tr
- %th Protected tag (#{@protected_tags_count})
+ %th Protected tags (#{@protected_tags_count})
%th Last commit
%th Allowed to create
- if can_admin_project