BigW Consortium Gitlab

_issuable.html.haml 1.38 KB
Newer Older
1 2
-# @project is present when viewing Project's milestone
- project = @project || issuable.project
3
- namespace = @project_namespace || project.namespace.becomes(Namespace)
4
- labels = issuable.labels
5
- assignees = issuable.assignees
6
- base_url_args = [namespace, project]
7
- issuable_type_args = base_url_args + [issuable.class.table_name]
8
- issuable_url_args = base_url_args + [issuable]
9

10
%li.issuable-row
11 12 13 14 15
  %span
    - if show_project_name
      %strong #{project.name} ·
    - elsif show_full_project_name
      %strong #{project.name_with_namespace} ·
16 17
    - if issuable.is_a?(Issue)
      = confidential_icon(issuable)
18
    = link_to issuable.title, issuable_url_args, title: issuable.title
19
  .issuable-detail
20
    = link_to [namespace, project, issuable] do
21
      %span.issuable-number= issuable.to_reference
22

23
    - labels.each do |label|
24
      = link_to polymorphic_path(issuable_type_args, { milestone_title: @milestone.title, label_name: label.title, state: 'all' }) do
25 26
        - render_colored_label(label)

27
    %span.assignee-icon
28
      - assignees.each do |assignee|
29
        = link_to polymorphic_path(issuable_type_args, { milestone_title: @milestone.title, assignee_id: assignee.id, state: 'all' }),
30
                  class: 'has-tooltip', title: "Assigned to #{assignee.name}", data: { container: 'body' } do
31
          - image_tag(avatar_icon(assignee, 16), class: "avatar s16", alt: '')