Commit 95c03937 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Inline protected branches list

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent a0c4fa31
- unless @branches.empty? - unless @branches.empty?
%h5 Already Protected: %br
%h4 Already Protected:
%table.table.protected-branches-list %table.table.protected-branches-list
%thead %thead
%tr.no-border %tr.no-border
%th Branch %th Branch
%th Developers can push %th Developers can push
%th Last commit
%th %th
%tbody %tbody
...@@ -18,19 +20,15 @@ ...@@ -18,19 +20,15 @@
%span.label.label-info default %span.label.label-info default
%td %td
= check_box_tag "developers_can_push", branch.id, branch.developers_can_push, "data-url" => @url = check_box_tag "developers_can_push", branch.id, branch.developers_can_push, "data-url" => @url
%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 %td
- if commit = branch.commit - if commit = branch.commit
= link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do = link_to project_commit_path(@project, commit.id), class: 'commit_short_id' do
= commit.short_id = commit.short_id
%span.light &middot;
= gfm escape_once(truncate(commit.title, length: 40))
#{time_ago_with_tooltip(commit.committed_date)} #{time_ago_with_tooltip(commit.committed_date)}
- else - else
(branch was removed from repository) (branch was removed from repository)
%td %td
%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"
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment