_context.html.haml 2.33 KB
Newer Older
Vinnie Okada's avatar
Vinnie Okada committed
1
= form_for [@project.namespace.becomes(Namespace), @project, @merge_request], remote: true, html: {class: 'edit-merge_request 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 @merge_request.assignee
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
7
        %strong= link_to_member(@project, @merge_request.assignee, size: 24)
8
9
      - else
        none
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
10
11
    .issuable-context-selectbox
      - if can?(current_user, :modify_merge_request, @merge_request)
12
        = users_select_tag('merge_request[assignee_id]', placeholder: 'Select assignee', class: 'custom-form-control js-select2 js-assignee', selected: @merge_request.assignee_id, null_user: true)
13

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

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

:coffeescript
48
  new Subscription("#{toggle_subscription_namespace_project_merge_request_path(@merge_request.project.namespace, @project, @merge_request)}")