diff options
Diffstat (limited to 'app/views/shared/issuable/_sidebar.html.haml')
-rw-r--r-- | app/views/shared/issuable/_sidebar.html.haml | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index ecbaa901792..e7510c1d1ec 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -37,7 +37,7 @@ = link_to 'Edit', '#', class: 'edit-link pull-right' .value.hide-collapsed - if issuable.milestone - = link_to issuable.milestone.title, project_milestone_path(@project, issuable.milestone), class: "bold has-tooltip", title: milestone_remaining_days(issuable.milestone), data: { container: "body", html: 1 } + = link_to issuable.milestone.title, milestone_path(issuable.milestone), class: "bold has-tooltip", title: milestone_remaining_days(issuable.milestone), data: { container: "body", html: 1 } - else %span.no-value None @@ -138,17 +138,4 @@ = project_ref = clipboard_button(text: project_ref, title: "Copy reference to clipboard", placement: "left") - :javascript - gl.sidebarOptions = { - endpoint: "#{issuable_json_path(issuable)}?basic=true", - editable: #{can_edit_issuable ? true : false}, - currentUser: #{current_user.to_json(only: [:username, :id, :name], methods: :avatar_url)}, - rootPath: "#{root_path}" - }; - - new MilestoneSelect('{"full_path":"#{@project.full_path}"}'); - new LabelsSelect(); - new IssuableContext('#{escape_javascript(current_user.to_json(only: [:username, :id, :name]))}'); - gl.Subscription.bindAll('.subscription'); - new gl.DueDateSelectors(); - window.sidebar = new Sidebar(); + %script.js-sidebar-options{ type: "application/json" }= issuable_sidebar_options(issuable, can_edit_issuable).to_json.html_safe |