summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-29 21:08:21 +0000
committerDmitriy Zaporozhets <dzaporozhets@gitlab.com>2014-12-29 21:08:21 +0000
commitda9d8279046c7f5f1dfb0972c0c8ac676cfc8b2c (patch)
tree71cc058276f30803bc6d8ed02767611c6174a9a1
parent95cd5b275a3dcb442c5571814baafbfb90639a20 (diff)
parent95c0393789e6f65e2c0ddcbdf1d7e38801be2dd4 (diff)
downloadgitlab-ce-da9d8279046c7f5f1dfb0972c0c8ac676cfc8b2c.tar.gz
Merge branch 'inline-protected-branches' into 'master'
Improve UI for protected branches See merge request !1361
-rw-r--r--app/views/projects/protected_branches/_branches_list.html.haml24
1 files changed, 11 insertions, 13 deletions
diff --git a/app/views/projects/protected_branches/_branches_list.html.haml b/app/views/projects/protected_branches/_branches_list.html.haml
index c37b255b6ac..e422799f55c 100644
--- a/app/views/projects/protected_branches/_branches_list.html.haml
+++ b/app/views/projects/protected_branches/_branches_list.html.haml
@@ -1,10 +1,12 @@
- unless @branches.empty?
- %h5 Already Protected:
+ %br
+ %h4 Already Protected:
%table.table.protected-branches-list
%thead
%tr.no-border
%th Branch
%th Developers can push
+ %th Last commit
%th
%tbody
@@ -19,18 +21,14 @@
%td
= check_box_tag "developers_can_push", branch.id, branch.developers_can_push, "data-url" => @url
%td
+ - if commit = branch.commit
+ = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do
+ = commit.short_id
+ &middot;
+ #{time_ago_with_tooltip(commit.committed_date)}
+ - else
+ (branch was removed from repository)
+ %td
.pull-right
- if can? current_user, :admin_project, @project
= link_to 'Unprotect', [@project, branch], data: { confirm: 'Branch will be writable for developers. Are you sure?' }, method: :delete, class: "btn btn-remove btn-small"
- %tr.no-border
- %td
- - 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))
- #{time_ago_with_tooltip(commit.committed_date)}
- - else
- (branch was removed from repository)
- %td
- %td