342d553709
write_ was renamed to create_ modify_ was renamed to update_ So now in update action we have next code def create can?(current_user, :create_issue, @issue) end def update can?(current_user, :update_issue, @issue) end Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
33 lines
1.3 KiB
Text
33 lines
1.3 KiB
Text
- content_for :note_actions do
|
|
- if can?(current_user, :update_issue, @issue)
|
|
- if @issue.closed?
|
|
= link_to 'Reopen Issue', issue_path(@issue, issue: {state_event: :reopen}, status_only: true), method: :put, class: 'btn btn-grouped btn-reopen js-note-target-reopen', title: 'Reopen Issue'
|
|
- else
|
|
= link_to 'Close Issue', issue_path(@issue, issue: {state_event: :close}, status_only: true), method: :put, class: 'btn btn-grouped btn-close js-note-target-close', title: 'Close Issue'
|
|
|
|
= render 'shared/show_aside'
|
|
|
|
.row
|
|
%section.col-md-9
|
|
.votes-holder.pull-right
|
|
#votes= render 'votes/votes_block', votable: @issue
|
|
.participants
|
|
%span= pluralize(@participants.count, 'participant')
|
|
- @participants.each do |participant|
|
|
= link_to_member(@project, participant, name: false, size: 24)
|
|
.voting_notes#notes= render 'projects/notes/notes_with_form'
|
|
%aside.col-md-3
|
|
.issuable-affix
|
|
.clearfix
|
|
%span.slead.has_tooltip{title: 'Cross-project reference'}
|
|
= cross_project_reference(@project, @issue)
|
|
%hr
|
|
.context
|
|
= render 'shared/issuable/context', issuable: @issue
|
|
|
|
- if @issue.labels.any?
|
|
.issuable-context-title
|
|
%label Labels
|
|
.issue-show-labels
|
|
- @issue.labels.each do |label|
|
|
= link_to_label(label)
|