[refs #194] fixed executor bug

This commit is contained in:
Alexander Machehin 2012-03-14 21:50:58 +06:00
parent 20079d4fc5
commit f11fc179d3
2 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
-content_for :sidebar do -content_for :sidebar do
- can_manage = can? :write, @issue.project - can_manage = can?(:update, @issue) && @issue.persisted? || can?(:create, @project.issues.new) && @issue.new_record?
- if @issue.persisted? - if @issue.persisted?
.bordered.nopadding .bordered.nopadding
%h3=t('activerecord.attributes.issue.status') %h3=t('activerecord.attributes.issue.status')
@ -21,7 +21,7 @@
.name="#{@issue.user.uname} (#{@issue.user.name})" .name="#{@issue.user.uname} (#{@issue.user.name})"
=hidden_field_tag "user-0", @issue.user.id, :name => 'issue[user_id]' =hidden_field_tag "user-0", @issue.user.id, :name => 'issue[user_id]'
.both .both
- else - elsif @issue.user
.people.nopointer .people.nopointer
.avatar=image_tag avatar_url(@issue.user), :alt => 'avatar' .avatar=image_tag avatar_url(@issue.user), :alt => 'avatar'
.name="#{@issue.user.uname} (#{@issue.user.name})" .name="#{@issue.user.uname} (#{@issue.user.name})"

View File

@ -16,7 +16,7 @@
.fulltext.view.issue_body=@issue.body .fulltext.view.issue_body=@issue.body
.both .both
%br %br
- if can? :write, @issue.project - if can? :update, @issue
=link_to t('layout.edit'), '#', :id => 'edit_issue_content', :class => 'button' =link_to t('layout.edit'), '#', :id => 'edit_issue_content', :class => 'button'
=form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_form issue', :style => 'display:none;' } do |f| =form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_form issue', :style => 'display:none;' } do |f|
.leftlist= t('activerecord.attributes.issue.title') + ':' .leftlist= t('activerecord.attributes.issue.title') + ':'