Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
3f9ab9bc
Commit
3f9ab9bc
authored
Mar 20, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Protect tag partial
parent
f592cae1
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
71 additions
and
0 deletions
+71
-0
app/views/projects/protected_tags/_create_protected_tag.html.haml
...s/projects/protected_tags/_create_protected_tag.html.haml
+32
-0
app/views/projects/protected_tags/_dropdown.html.haml
app/views/projects/protected_tags/_dropdown.html.haml
+15
-0
app/views/projects/protected_tags/_index.html.haml
app/views/projects/protected_tags/_index.html.haml
+18
-0
app/views/projects/protected_tags/_tags_list.html.haml
app/views/projects/protected_tags/_tags_list.html.haml
+6
-0
No files found.
app/views/projects/protected_tags/_create_protected_tag.html.haml
0 → 100644
View file @
3f9ab9bc
=
form_for
[
@project
.
namespace
.
becomes
(
Namespace
),
@project
,
@protected_branch
]
do
|
f
|
.panel.panel-default
.panel-heading
%h3
.panel-title
Protect a tag
.panel-body
.form-horizontal
=
form_errors
(
@protected_branch
)
.form-group
=
f
.
label
:name
,
class:
'col-md-2 text-right'
do
Tag:
.col-md-10
=
render
partial:
"projects/protected_tags/dropdown"
,
locals:
{
f:
f
}
.help-block
=
link_to
'Wildcards'
,
help_page_path
(
'user/project/protected_branches'
,
anchor:
'wildcard-protected-branches'
)
such as
%code
*-stable
or
%code
production/*
are supported
.form-group
%label
.col-md-2.text-right
{
for:
'push_access_levels_attributes'
}
Allowed to push:
.col-md-10
.push_access_levels-container
=
dropdown_tag
(
'Select'
,
options:
{
toggle_class:
'js-allowed-to-push wide'
,
dropdown_class:
'dropdown-menu-selectable'
,
data:
{
field_name:
'protected_branch[push_access_levels_attributes][0][access_level]'
,
input_id:
'push_access_levels_attributes'
}})
.panel-footer
=
f
.
submit
'Protect'
,
class:
'btn-create btn'
,
disabled:
true
app/views/projects/protected_tags/_dropdown.html.haml
0 → 100644
View file @
3f9ab9bc
=
f
.
hidden_field
(
:name
)
=
dropdown_tag
(
'Select tag or create wildcard'
,
options:
{
toggle_class:
'js-protected-tag-select js-filter-submit wide'
,
filter:
true
,
dropdown_class:
"dropdown-menu-selectable"
,
placeholder:
"Search protected tag"
,
footer_content:
true
,
data:
{
show_no:
true
,
show_any:
true
,
show_upcoming:
true
,
selected:
params
[
:protected_branch_name
],
project_id:
@project
.
try
(
:id
)
}
})
do
%ul
.dropdown-footer-list
%li
=
link_to
'#'
,
title:
"New Protected Tag"
,
class:
"create-new-protected-tag"
do
Create wildcard
%code
app/views/projects/protected_tags/_index.html.haml
0 → 100644
View file @
3f9ab9bc
-
content_for
:page_specific_javascripts
do
=
page_specific_javascript_bundle_tag
(
'protected_branches'
)
.row.prepend-top-default.append-bottom-default
.col-lg-3
%h4
.prepend-top-0
Protected tags
%p
.prepend-top-20
By default, Protected branches are designed to:
%ul
%li
Prevent tag pushes from everybody except Masters
%li
Prevent
<strong>
anyone
</strong>
from force pushing to the tag
%li
Prevent
<strong>
anyone
</strong>
from deleting the tag
.col-lg-9
-
if
can?
current_user
,
:admin_project
,
@project
=
render
'projects/protected_tags/create_protected_tag'
=
render
"projects/protected_tags/tags_list"
app/views/projects/protected_tags/_tags_list.html.haml
0 → 100644
View file @
3f9ab9bc
.panel.panel-default.protected-tags-list
.panel-heading
%h3
.panel-title
Protected tag (0)
%p
.settings-message.text-center
There are currently no protected tags, protect a tag with the form above.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment