35 lines
1.5 KiB
Plaintext
35 lines
1.5 KiB
Plaintext
- if can?(:merge, @pull) && @pull.can_merging?
|
|
%br
|
|
=form_for PullRequest.new, :url => merge_project_pull_request_path(@project, @pull), :html => { :method => :put, :class => :form } do |f|
|
|
=f.submit t 'projects.pull_requests.ready'
|
|
|
|
.flash{'ng-show' => '!pull.mergeable'}
|
|
.notice{'ng-show' => "pull.status == 'blocked'"}
|
|
= t "projects.pull_requests.blocked"
|
|
.alert{'ng-show' => "pull.status == 'merged'"}
|
|
= t("projects.pull_requests.merged",
|
|
:user => '{{pull.merged_by.uname}}',
|
|
:to_ref => show_ref(@pull, 'to'),
|
|
:from_ref => show_ref(@pull, 'from'),
|
|
:time => '{{merged_at}}').html_safe
|
|
.alert{'ng-show' => "pull.status == 'closed'"}
|
|
= t("projects.pull_requests.closed",
|
|
:user => '{{pull.closed_by.uname}}',
|
|
:time => '{{closed_at}}')
|
|
|
|
|
|
- if !@pull.cross_pull? && can?(:write, @project)
|
|
%div{'ng-init' => 'can_delete_branch = true', 'ng-show' => "pull.status == 'closed' || pull.status == 'merged'"}
|
|
%br
|
|
%a.button{:href => '', 'ng-click' => 'deleteBranch()', 'ng-show' => "branch"}
|
|
= t('layout.projects.delete_branch')
|
|
%a.button{:href => '', 'ng-click' => 'restoreBranch()', 'ng-hide' => "branch"}
|
|
= t('layout.projects.restore_branch')
|
|
|
|
|
|
-if can? :update, @pull
|
|
%br
|
|
%a.button{:href => '', 'ng-click' => 'reopen()', 'ng-show' => "pull.status == 'closed'"}
|
|
= t '.reopen'
|
|
%a.button{:href => '', 'ng-click' => 'close()', 'ng-show' => "pull.status == 'ready' || pull.status == 'open' || pull.status == 'blocked'"}
|
|
= t '.close' |