From 95c0393789e6f65e2c0ddcbdf1d7e38801be2dd4 Mon Sep 17 00:00:00 2001 From: Dmitriy Zaporozhets Date: Mon, 29 Dec 2014 19:30:27 +0200 Subject: [PATCH] Inline protected branches list Signed-off-by: Dmitriy Zaporozhets --- .../_branches_list.html.haml | 24 +++++++++---------- 1 file 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 @@ -18,19 +20,15 @@ %span.label.label-info default %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 + · + #{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