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
02e39563
Commit
02e39563
authored
Jul 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
better ui for protected branches page
parent
fe7bef3a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
27 deletions
+26
-27
app/views/projects/protected_branches/index.html.haml
app/views/projects/protected_branches/index.html.haml
+26
-27
No files found.
app/views/projects/protected_branches/index.html.haml
View file @
02e39563
...
...
@@ -3,13 +3,13 @@
.span3
=
render
"projects/repositories/filter"
.span9
.alert
.alert
.alert-info
%p
Protected branches designed to prevent push for all except
#{
link_to
"masters"
,
help_permissions_path
,
class:
"vlink"
}
.
%p
This ability allows:
%ul
%li
keep stable branches secured
%li
forced code review before merge to protected branches
%p
Read more about project permissions
#{
link_to
"here"
,
help_permissions_path
,
class:
"
v
link"
}
%p
Read more about project permissions
#{
link_to
"here"
,
help_permissions_path
,
class:
"
underlined_
link"
}
-
if
can?
current_user
,
:admin_project
,
@project
=
form_for
[
@project
,
@protected_branch
]
do
|
f
|
...
...
@@ -24,31 +24,30 @@
.span3
=
f
.
select
(
:name
,
@project
.
open_branches
.
map
{
|
br
|
[
br
.
name
,
br
.
name
]
}
,
{
include_blank:
"Select branch"
},
{
class:
"chosen span3"
})
=
f
.
submit
'Protect'
,
class:
"btn-primary btn"
=
f
.
submit
'Protect'
,
class:
"btn-create btn"
-
unless
@branches
.
empty?
%table
%thead
%tr
%th
Name
%th
Last commit
%th
%tbody
-
@branches
.
each
do
|
branch
|
%tr
%td
=
link_to
project_commits_path
(
@project
,
branch
.
name
)
do
%strong
=
branch
.
name
-
if
@project
.
root_ref?
(
branch
.
name
)
%span
.label
default
%td
-
if
branch
.
commit
=
link_to
project_commit_path
(
@project
,
branch
.
commit
.
id
)
do
=
truncate
branch
.
commit
.
id
.
to_s
,
length:
10
=
time_ago_in_words
(
branch
.
commit
.
committed_date
)
ago
-
else
(branch was removed from repository)
%td
%h5
Already Protected:
%ul
.bordered-list
-
@branches
.
each
do
|
branch
|
%li
%h4
=
link_to
project_commits_path
(
@project
,
branch
.
name
)
do
%strong
=
branch
.
name
-
if
@project
.
root_ref?
(
branch
.
name
)
%span
.label.label-info
default
%span
.label.label-success
%i
.icon-lock
.pull-right
-
if
can?
current_user
,
:admin_project
,
@project
=
link_to
'Unprotect'
,
[
@project
,
branch
],
confirm:
'Branch will be writable for developers. Are you sure?'
,
method: :delete
,
class:
"btn btn-remove btn-small"
-
if
commit
=
branch
.
commit
=
link_to
project_commit_path
(
@project
,
commit
.
id
),
class:
'commit_short_id'
do
=
commit
.
short_id
%span
.light
=
gfm
escape_once
(
truncate
(
commit
.
title
,
length:
40
))
%span
=
time_ago_in_words
(
commit
.
committed_date
)
ago
-
else
(branch was removed from repository)
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