_issue_context.html.haml 2.1 KB
Newer Older
Vinnie Okada's avatar
Vinnie Okada committed
1
= form_for [@project.namespace.becomes(Namespace), @project, @issue], remote: true, html: {class: 'edit-issue inline-update'} do |f|
2
  %div.prepend-top-20
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
3
4
5
    .issuable-context-title
      %label
        Assignee:
6
      - if issue.assignee
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7
        %strong= link_to_member(@project, @issue.assignee, size: 24)
8
9
      - else
        none
10
    - if can?(current_user, :modify_issue, @issue)
11
      = users_select_tag('issue[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: @issue.assignee_id, null_user: true, first_user: true)
12

Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
13
14
15
16
  %div.prepend-top-20.clearfix
    .issuable-context-title
      %label
        Milestone:
17
      - if issue.milestone
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
18
        %span.back-to-milestone
19
          = link_to namespace_project_milestone_path(@project.namespace, @project, @issue.milestone) do
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
20
21
22
            %strong
              %i.fa.fa-clock-o
              = @issue.milestone.title
23
24
      - else
        none
25
26
27
28
    - if can?(current_user, :modify_issue, @issue)
      = f.select(:milestone_id, milestone_options(@issue), { include_blank: "Select milestone" }, {class: 'select2 select2-compact js-select2 js-milestone'})
      = hidden_field_tag :issue_context
      = f.submit class: 'btn'
Valery Sizov's avatar
Valery Sizov committed
29

Valery Sizov's avatar
Valery Sizov committed
30
31
32
33
34
  - if current_user
    %div.prepend-top-20.clearfix
      .issuable-context-title
        %label
          Subscription:
Sullivan SENECHAL's avatar
Sullivan SENECHAL committed
35
      %button.btn.btn-block.subscribe-button{:type => 'button'}
Valery Sizov's avatar
Valery Sizov committed
36
37
38
39
40
41
42
43
        %i.fa.fa-eye
        %span= @issue.subscribed?(current_user) ? "Unsubscribe" : "Subscribe"
      - subscribtion_status = @issue.subscribed?(current_user) ? "subscribed" : "unsubscribed"
      .subscription-status{"data-status" => subscribtion_status}
        .description-block.unsubscribed{class: ( "hidden" if @issue.subscribed?(current_user) )}
          You're not receiving notifications from this thread.
        .description-block.subscribed{class: ( "hidden" unless @issue.subscribed?(current_user) )}
          You're receiving notifications because you're subscribed to this thread.
Valery Sizov's avatar
Valery Sizov committed
44
45

:coffeescript
46
  new Subscription("#{toggle_subscription_namespace_project_issue_path(@issue.project.namespace, @project, @issue)}")