-content_for :sidebar do - can_manage = can?(:update, @issue) && @issue.persisted? || @issue.new_record? - if @issue.persisted? .bordered.nopadding %h3=t('activerecord.attributes.issue.status') #switcher.issue_status{:class => "#{@issue.closed? ? 'switcher-off' : 'switcher'} #{can_manage ? "switch_issue_status" : ''}"} .swleft=t('layout.issues.status.open') .swright=t('layout.issues.status.closed') - if can_manage =form_tag [@project, @issue], :id => 'update_issue_status', :method => :put do =hidden_field_tag "issue_status", @issue.closed? ? 'closed' : 'open', :name => "issue[status]" .bordered.nopadding %h3=t('layout.issues.assignee') - if @issue.persisted? -if can_manage =form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_assignee issue'} do |f| =hidden_field_tag "user-default_assignee", nil, :name => 'issue[assignee_id]' .current_assignee - if @issue.assignee #user-0.people.nopointer .avatar=image_tag avatar_url(@issue.assignee), :alt => 'avatar' .name=@issue.assignee.fullname =hidden_field_tag "user-0", @issue.assignee.id, :name => 'issue[assignee_id]' .both - elsif @issue.assignee .people.nopointer .avatar=image_tag avatar_url(@issue.assignee), :alt => 'avatar' .name=@issue.assignee.fullname .both =link_to(t('layout.issues.label_manage'), '#', :class => "button tmargin10 manage_assignee") if can_manage - if can_manage =form_tag search_collaborators_project_issues_path(@project), :id => 'search_user', :method => :get, :style => @issue.persisted? ? 'display:none' : '' do =tracker_search_field(:search_user, t('layout.issues.search_user')) #manage_issue_users_list =render 'search_collaborators' =link_to(t('layout.issues.done'), '#', :class => "button tmargin10 update_assignee", :style => 'display:none') if can_manage .block %h3=t('layout.issues.labels') - if can_manage .current_labels - (@project.labels || []).each do |label| - is_issue_label = @issue.labels.include? label .label{:id => "flag#{label.id}", :class => @issue.persisted? ? 'nopointer' : 'add_label'} .flag{:style => "background: ##{label.color}; #{is_issue_label ? 'display:none;' : ''}"} .labeltext{:class => is_issue_label ? 'selected' : '', :style => is_issue_label ? "background: ##{label.color}" : ''}=label.name .both=hidden_field_tag "flag#{label.id}", label.id, :name => "issue[labelings_attributes][#{label.id}][label_id]" =form_for :issue, :url => [@project, @issue], :method => :put, :html => { :class => 'edit_labels issue'} do |f| .manage_labels - @issue.labels.each do |label| =hidden_field_tag "flag#{label.id}", label.id, :name => "issue[labelings_attributes][#{label.id}][label_id]" - else - (@issue.labels || []).each do |label| .label.nopointer .labeltext.selected{:style => "background: ##{label.color};"}=label.name .both - if can_manage && @issue.persisted? =link_to(t('layout.issues.label_manage'), '#', :class => "button tmargin10 manage_labels") =link_to(t('layout.issues.done'), '#', :class => "button tmargin10 update_labels", :style => 'display:none')