_issue_context.html.haml 1.08 KB
= form_for [@project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f|
  Created by #{link_to_member(@project, issue.author)} 
  - if issue.assignee
    \ and currently assigned to

  - if can?(current_user, :modify_issue, @issue)
    = link_to profile_path(issue.assignee) do
      = image_tag(avatar_icon(issue.assignee.email), class: 'avatar avatar-inline s16 assignee') if issue.assignee
    = f.select(:assignee_id, assignee_options(@issue), { include_blank: "Assign to user (none):" }, {class: 'select2'})
  - elsif issue.assignee
    = link_to_member(@project, @issue.assignee)


  .pull-right.hidden-sm.hidden-xs
    - if issue.milestone
      - milestone = issue.milestone
      %cite.cgray Attached to milestone

    - if can?(current_user, :modify_issue, @issue)
      = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone (none):" }, {class: 'select2 select2-compact'})

      = hidden_field_tag :issue_context
      = f.submit class: 'btn'
    - elsif issue.milestone
      = link_to issue.milestone.title, project_milestone_path