diff options
author | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-12 15:37:02 -0500 |
---|---|---|
committer | Jacob Schatz <jacobschatz@Jacobs-MBP.fios-router.home> | 2016-03-25 08:04:57 -0400 |
commit | 024dc8073ec1f315d3ded16b7d112cd5686c1c26 (patch) | |
tree | 82acde3b0dcb1d3f466e21e24da517c45747120b /app/views | |
parent | aa4da384357c025ce6e363eebd9182ffb39b7bd4 (diff) | |
download | gitlab-ce-024dc8073ec1f315d3ded16b7d112cd5686c1c26.tar.gz |
Add milestone sidebar update via JSON
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/shared/issuable/_sidebar.html.haml | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index d44ab935831..3696f9fafd9 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -75,6 +75,7 @@ = issuable.labels.count .title.hide-collapsed Labels + =icon('spinner spin', class: 'block-loading') - if can?(current_user, :"admin_#{issuable.to_ability_name}", @project) = link_to 'Edit', '#', class: 'edit-link pull-right' .value.bold.issuable-show-labels.hide-collapsed{ class: ("has-labels" if issuable.labels.any?) } @@ -84,8 +85,29 @@ - else .light None .selectbox.hide-collapsed - = f.collection_select :label_ids, issuable.project.labels.all, :id, :name, - { selected: issuable.label_ids }, multiple: true, class: 'select2 js-select2', data: { placeholder: "Select labels" } + .dropdown + %button.dropdown-menu-toggle.js-label-select{type: "button", data: {toggle: "dropdown", field_name: "label_name", show_no: "true", show_any: "true", selected: params[:label_name], project_id: (@project.id if @project), issue_update: namespace_project_issue_path(@project.namespace, @project, issuable.id, :json), labels: (namespace_project_labels_path(@project.namespace, @project, :json) if @project)}} + %span.dropdown-toggle-text + Label + = icon('chevron-down') + .dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable + .dropdown-page-one + = dropdown_title("Filter by label") + = dropdown_filter("Search labels") + = dropdown_content + - if @project + = dropdown_footer do + %ul.dropdown-footer-list + - if can? current_user, :admin_label, @project + %li + %a.dropdown-toggle-page{href: "#"} + Create new + %li + = link_to namespace_project_labels_path(@project.namespace, @project) do + - if can? current_user, :admin_label, @project + Manage labels + - else + View labels = render "shared/issuable/participants", participants: issuable.participants(current_user) - if current_user @@ -116,6 +138,6 @@ = clipboard_button(clipboard_text: project_ref) :javascript - new Subscription('.subscription'); new MilestoneSelect(); + new LabelsSelect(); new IssuableContext(); |