rosa-build/app/views/projects/pull_requests/_status.html.haml

35 lines
1.5 KiB
Plaintext
Raw Normal View History

2012-09-26 18:09:29 +01:00
- if can?(:merge, @pull) && @pull.can_merging?
2012-07-12 15:15:28 +01:00
%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'
2013-07-12 15:21:46 +01:00
.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'"}
2012-07-12 15:15:28 +01:00
%br
2013-07-12 15:21:46 +01:00
%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'