2016-03-07 04:07:19 +00:00
|
|
|
-# @project is present when viewing Project's milestone
|
|
|
|
- project = @project || issuable.project
|
|
|
|
- assignee = issuable.assignee
|
|
|
|
- issuable_type = issuable.class.table_name
|
|
|
|
- base_url_args = [project.namespace.becomes(Namespace), project, issuable_type]
|
2016-10-28 09:30:58 +00:00
|
|
|
- can_update = can?(current_user, :"update_#{issuable.to_ability_name}", issuable)
|
2016-03-07 04:07:19 +00:00
|
|
|
|
2017-01-06 16:52:18 +00:00
|
|
|
%li{ id: dom_id(issuable, 'sortable'), class: "issuable-row #{'is-disabled' unless can_update}", 'data-iid' => issuable.iid, 'data-id' => issuable.id, 'data-url' => polymorphic_path(issuable) }
|
2016-03-07 04:07:19 +00:00
|
|
|
%span
|
|
|
|
- if show_project_name
|
|
|
|
%strong #{project.name} ·
|
|
|
|
- elsif show_full_project_name
|
|
|
|
%strong #{project.name_with_namespace} ·
|
2016-03-17 21:00:03 +00:00
|
|
|
- if issuable.is_a?(Issue)
|
|
|
|
= confidential_icon(issuable)
|
2016-03-07 04:07:19 +00:00
|
|
|
= link_to_gfm issuable.title, [project.namespace.becomes(Namespace), project, issuable], title: issuable.title
|
2016-12-23 09:37:12 +00:00
|
|
|
.issuable-detail
|
2016-03-07 04:07:19 +00:00
|
|
|
= link_to [project.namespace.becomes(Namespace), project, issuable] do
|
2017-01-13 13:54:20 +00:00
|
|
|
%span.issuable-number= issuable.to_reference
|
2016-03-07 04:07:19 +00:00
|
|
|
|
|
|
|
- issuable.labels.each do |label|
|
|
|
|
= link_to polymorphic_path(base_url_args, { milestone_title: @milestone.title, label_name: label.title, state: 'all' }) do
|
|
|
|
- render_colored_label(label)
|
|
|
|
|
2016-12-22 11:00:09 +00:00
|
|
|
%span.assignee-icon
|
2016-05-25 23:08:48 +00:00
|
|
|
- if assignee
|
|
|
|
= link_to polymorphic_path(base_url_args, { milestone_title: @milestone.title, assignee_id: issuable.assignee_id, state: 'all' }),
|
|
|
|
class: 'has-tooltip', title: "Assigned to #{assignee.name}", data: { container: 'body' } do
|
|
|
|
- image_tag(avatar_icon(issuable.assignee, 16), class: "avatar s16", alt: '')
|