diff options
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/issuable/_sidebar.html.haml | 11 | ||||
-rw-r--r-- | app/views/shared/notes/_notes_with_form.html.haml | 10 |
2 files changed, 20 insertions, 1 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index 9cae3f51825..38a54c232d0 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -131,6 +131,17 @@ %button.btn.btn-default.pull-right.js-subscribe-button.issuable-subscribe-button.hide-collapsed{ type: "button" } %span= subscribed ? 'Unsubscribe' : 'Subscribe' + - if can_edit_issuable + - locked = issuable.discussion_locked? + .block.light.discussion-lock{ data: { lock: (!locked).to_s, url: "#{issuable_json_path(issuable)}?basic=true", issuable_type: issuable.class.to_s.underscore } } + .sidebar-collapsed-icon + = icon('rss', 'aria-hidden': 'true') + %span.issuable-header-text.hide-collapsed.pull-left + Discussion Lock + - subscribtion_status = locked ? 'locked' : 'not locked' + %button.btn.btn-default.pull-right.js-discussion-lock-button.issuable-discussion-lock-button.hide-collapsed{ type: "button" } + %span= locked ? 'Unlock' : 'Lock' + - project_ref = cross_project_reference(@project, issuable) .block.project-reference .sidebar-collapsed-icon.dont-change-state diff --git a/app/views/shared/notes/_notes_with_form.html.haml b/app/views/shared/notes/_notes_with_form.html.haml index e3e86709b8f..371a9523de9 100644 --- a/app/views/shared/notes/_notes_with_form.html.haml +++ b/app/views/shared/notes/_notes_with_form.html.haml @@ -1,3 +1,6 @@ +- issuable = @issue || @merge_request +- discussion_locked = issuable&.discussion_locked? + %ul#notes-list.notes.main-notes-list.timeline = render "shared/notes/notes" @@ -21,5 +24,10 @@ or = link_to "sign in", new_session_path(:user, redirect_to_referer: 'yes'), class: 'js-sign-in-link' to comment - +- elsif discussion_locked + .discussion_locked + %span + This + = issuable.class.to_s + has been locked. Posting comments has been restricted to project members. %script.js-notes-data{ type: "application/json" }= initial_notes_data(autocomplete).to_json.html_safe |