BigW Consortium Gitlab

_due_date.html.haml 1.29 KB
Newer Older
1
.block.due_date
2
  .title
3 4
    Due date
    - if can?(current_user, :admin_issue, @project)
5
      = icon("spinner spin", class: "block-loading")
6
      = link_to "Edit", "#", class: "edit-link pull-right"
7
  .value
8 9 10 11
    .value-content
      %span.no-value{ "v-if" => "!issue.dueDate" }
        No due date
      %span.bold{ "v-if" => "issue.dueDate" }
12
        {{ issue.dueDate | due-date }}
13 14 15 16 17
      - if can?(current_user, :admin_issue, @project)
        %span.no-value.js-remove-due-date-holder{ "v-if" => "issue.dueDate" }
          \-
          %a.js-remove-due-date{ href: "#", role: "button" }
            remove due date
18 19 20 21 22 23 24 25
  - if can?(current_user, :admin_issue, @project)
    .selectbox
      %input{ type: "hidden",
        name: "issue[due_date]",
        ":value" => "issue.dueDate" }
      .dropdown
        %button.dropdown-menu-toggle.js-due-date-select.js-issue-boards-due-date{ type: 'button',
          data: { toggle: 'dropdown', field_name: "issue[due_date]", ability_name: "issue" },
26
          ":data-issue-update" => "'#{project_issues_path(@project)}/' + issue.id + '.json'" }
27 28 29 30 31 32
          %span.dropdown-toggle-text Due date
          = icon('chevron-down')
        .dropdown-menu.dropdown-menu-due-date
          = dropdown_title('Due date')
          = dropdown_content do
            .js-due-date-calendar