gitlab-org--gitlab-foss/app/views/shared/milestones/_issuable.html.haml

32 lines
1.4 KiB
Text
Raw Normal View History

2016-03-06 23:07:19 -05:00
-# @project is present when viewing Project's milestone
- project = @project || issuable.project
- namespace = @project_namespace || project.namespace.becomes(Namespace)
2017-07-07 04:49:33 -04:00
- labels = issuable.labels
- assignees = issuable.assignees
- base_url_args = [namespace, project]
2017-07-07 04:49:33 -04:00
- issuable_type_args = base_url_args + [issuable.class.table_name]
- issuable_url_args = base_url_args + [issuable]
2016-03-06 23:07:19 -05:00
%li.issuable-row
2016-03-06 23:07:19 -05:00
%span
- if show_project_name
%strong #{project.name} ·
- elsif show_full_project_name
%strong #{project.full_name} ·
- if issuable.is_a?(Issue)
= confidential_icon(issuable)
= link_to issuable.title, issuable_url_args, title: issuable.title
2016-12-23 04:37:12 -05:00
.issuable-detail
= link_to [namespace, project, issuable], class: 'issue-link' do
%span.issuable-number= issuable.to_reference
2016-03-06 23:07:19 -05:00
2017-07-07 04:49:33 -04:00
- labels.each do |label|
= link_to polymorphic_path(issuable_type_args, { milestone_title: @milestone.title, label_name: label.title, state: 'all' }) do
2016-03-06 23:07:19 -05:00
- render_colored_label(label)
%span.assignee-icon
- assignees.each do |assignee|
= link_to polymorphic_path(issuable_type_args, { milestone_title: @milestone.title, assignee_id: assignee.id, state: 'all' }),
class: 'has-tooltip', title: "Assigned to #{assignee.name}", data: { container: 'body' } do
- image_tag(avatar_icon_for_user(assignee, 16), class: "avatar s16", alt: '')