2016-01-28 18:26:47 -05:00
|
|
|
%aside.right-sidebar{ class: sidebar_gutter_collapsed_class }
|
2016-01-27 17:38:19 -05:00
|
|
|
.issuable-sidebar
|
2016-04-07 08:32:37 -04:00
|
|
|
- can_edit_issuable = can?(current_user, :"admin_#{issuable.to_ability_name}", @project)
|
2016-03-04 12:37:07 -05:00
|
|
|
.block.issuable-sidebar-header
|
2016-02-25 05:35:52 -05:00
|
|
|
%span.issuable-count.hide-collapsed.pull-left
|
2016-02-16 06:58:12 -05:00
|
|
|
= issuable.iid
|
2016-01-27 22:50:18 -05:00
|
|
|
of
|
2016-02-15 09:19:23 -05:00
|
|
|
= issuables_count(issuable)
|
2016-03-04 12:37:07 -05:00
|
|
|
%a.gutter-toggle.pull-right.js-sidebar-toggle{href: '#'}
|
|
|
|
= sidebar_gutter_toggle_icon
|
2016-02-25 05:35:52 -05:00
|
|
|
.issuable-nav.hide-collapsed.pull-right.btn-group{role: 'group', "aria-label" => '...'}
|
2016-02-15 09:19:23 -05:00
|
|
|
- if prev_issuable = prev_issuable_for(issuable)
|
|
|
|
= link_to 'Prev', [@project.namespace.becomes(Namespace), @project, prev_issuable], class: 'btn btn-default prev-btn'
|
2016-01-28 18:26:47 -05:00
|
|
|
- else
|
|
|
|
%a.btn.btn-default.disabled{href: '#'}
|
|
|
|
Prev
|
2016-02-15 09:19:23 -05:00
|
|
|
- if next_issuable = next_issuable_for(issuable)
|
|
|
|
= link_to 'Next', [@project.namespace.becomes(Namespace), @project, next_issuable], class: 'btn btn-default next-btn'
|
2016-01-28 18:26:47 -05:00
|
|
|
- else
|
|
|
|
%a.btn.btn-default.disabled{href: '#'}
|
|
|
|
Next
|
2016-01-27 22:50:18 -05:00
|
|
|
|
2016-02-02 19:42:19 -05:00
|
|
|
= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f|
|
2016-01-27 17:38:19 -05:00
|
|
|
.block.assignee
|
2016-03-06 07:06:52 -05:00
|
|
|
.sidebar-collapsed-icon.sidebar-collapsed-user{data: {toggle: "tooltip", placement: "left", container: "body"}, title: (issuable.assignee.to_reference if issuable.assignee)}
|
2016-01-28 20:36:48 -05:00
|
|
|
- if issuable.assignee
|
2016-03-07 03:40:19 -05:00
|
|
|
= link_to_member(@project, issuable.assignee, size: 24)
|
2016-01-28 20:36:48 -05:00
|
|
|
- else
|
|
|
|
= icon('user')
|
2016-02-25 05:35:52 -05:00
|
|
|
.title.hide-collapsed
|
2016-03-04 12:37:07 -05:00
|
|
|
Assignee
|
2016-03-25 08:00:16 -04:00
|
|
|
= icon('spinner spin', class: 'block-loading')
|
2016-04-07 08:32:37 -04:00
|
|
|
- if can_edit_issuable
|
2016-03-04 12:37:07 -05:00
|
|
|
= link_to 'Edit', '#', class: 'edit-link pull-right'
|
2016-04-07 08:32:37 -04:00
|
|
|
.value.bold.hide-collapsed
|
2016-01-27 17:38:19 -05:00
|
|
|
- if issuable.assignee
|
2016-03-04 12:37:07 -05:00
|
|
|
= link_to_member(@project, issuable.assignee, size: 32) do
|
2016-03-21 07:31:50 -04:00
|
|
|
- if issuable.instance_of?(MergeRequest) && !issuable.can_be_merged_by?(issuable.assignee)
|
|
|
|
%span.pull-right.cannot-be-merged{ data: { toggle: 'tooltip', placement: 'left' }, title: 'Not allowed to merge' }
|
|
|
|
= icon('exclamation-triangle')
|
2016-03-04 12:37:07 -05:00
|
|
|
%span.username
|
|
|
|
= issuable.assignee.to_reference
|
2016-01-27 17:38:19 -05:00
|
|
|
- else
|
2016-03-21 05:07:53 -04:00
|
|
|
%span.assign-yourself
|
2016-04-07 07:09:31 -04:00
|
|
|
No assignee
|
2016-04-07 08:32:37 -04:00
|
|
|
- if can_edit_issuable
|
2016-04-07 07:09:31 -04:00
|
|
|
%a.js-assign-yourself{ href: '#' }
|
|
|
|
\- assign yourself
|
2015-12-10 13:01:49 -05:00
|
|
|
|
2016-02-25 05:35:52 -05:00
|
|
|
.selectbox.hide-collapsed
|
2016-03-19 20:19:51 -04:00
|
|
|
= f.hidden_field 'assignee_id', value: issuable.assignee_id, id: 'issue_assignee_id'
|
2016-03-29 11:26:59 -04:00
|
|
|
= dropdown_tag('Select assignee', options: { toggle_class: 'js-user-search js-author-search', title: 'Assign to', filter: true, dropdown_class: 'dropdown-menu-user dropdown-menu-selectable dropdown-menu-author', placeholder: 'Search users', data: { first_user: (current_user.username if current_user), current_user: true, project_id: (@project.id if @project), author_id: issuable.author_id, field_name: "#{issuable.to_ability_name}[assignee_id]", issue_update: issuable_json_path(issuable), ability_name: issuable.to_ability_name, null_user: true } })
|
2015-12-10 13:01:49 -05:00
|
|
|
|
2016-01-27 17:38:19 -05:00
|
|
|
.block.milestone
|
2016-01-28 00:06:36 -05:00
|
|
|
.sidebar-collapsed-icon
|
2016-02-17 09:02:34 -05:00
|
|
|
= icon('clock-o')
|
2016-01-28 20:36:48 -05:00
|
|
|
%span
|
|
|
|
- if issuable.milestone
|
|
|
|
= issuable.milestone.title
|
|
|
|
- else
|
|
|
|
No
|
2016-02-25 05:35:52 -05:00
|
|
|
.title.hide-collapsed
|
2016-03-04 12:37:07 -05:00
|
|
|
Milestone
|
2016-03-25 08:00:16 -04:00
|
|
|
= icon('spinner spin', class: 'block-loading')
|
2016-04-07 08:32:37 -04:00
|
|
|
- if can_edit_issuable
|
2016-03-04 12:37:07 -05:00
|
|
|
= link_to 'Edit', '#', class: 'edit-link pull-right'
|
|
|
|
.value.bold.hide-collapsed
|
2016-01-27 17:38:19 -05:00
|
|
|
- if issuable.milestone
|
2016-03-04 12:37:07 -05:00
|
|
|
= link_to namespace_project_milestone_path(@project.namespace, @project, issuable.milestone) do
|
|
|
|
= issuable.milestone.title
|
2015-12-10 15:06:26 -05:00
|
|
|
- else
|
2015-12-11 13:38:18 -05:00
|
|
|
.light None
|
2016-03-11 00:28:10 -05:00
|
|
|
|
2016-02-25 05:35:52 -05:00
|
|
|
.selectbox.hide-collapsed
|
2016-03-17 09:14:46 -04:00
|
|
|
= f.hidden_field 'milestone_id', value: issuable.milestone_id, id: nil
|
2016-03-25 08:00:16 -04:00
|
|
|
= dropdown_tag('Milestone', options: { title: 'Assign milestone', toggle_class: 'js-milestone-select js-extra-options', filter: true, dropdown_class: 'dropdown-menu-selectable', placeholder: 'Search milestones', data: { show_no: true, field_name: "#{issuable.to_ability_name}[milestone_id]", project_id: @project.id, issuable_id: issuable.id, milestones: namespace_project_milestones_path(@project.namespace, @project, :json), ability_name: issuable.to_ability_name, issue_update: issuable_json_path(issuable), use_id: true }})
|
2015-12-10 13:01:49 -05:00
|
|
|
|
2016-01-27 17:38:19 -05:00
|
|
|
- if issuable.project.labels.any?
|
2016-01-28 00:06:36 -05:00
|
|
|
.block.labels
|
2016-01-28 18:26:47 -05:00
|
|
|
.sidebar-collapsed-icon
|
|
|
|
= icon('tags')
|
2016-01-28 20:36:48 -05:00
|
|
|
%span
|
|
|
|
= issuable.labels.count
|
2016-02-25 05:35:52 -05:00
|
|
|
.title.hide-collapsed
|
2016-03-04 12:37:07 -05:00
|
|
|
Labels
|
2016-03-25 08:00:16 -04:00
|
|
|
= icon('spinner spin', class: 'block-loading')
|
2016-04-07 08:32:37 -04:00
|
|
|
- if can_edit_issuable
|
2016-03-04 12:37:07 -05:00
|
|
|
= link_to 'Edit', '#', class: 'edit-link pull-right'
|
2016-03-24 07:38:00 -04:00
|
|
|
.value.bold.issuable-show-labels.hide-collapsed{ class: ("has-labels" if issuable.labels.any?) }
|
2016-01-27 17:38:19 -05:00
|
|
|
- if issuable.labels.any?
|
|
|
|
- issuable.labels.each do |label|
|
2015-12-18 08:20:15 -05:00
|
|
|
= link_to_label(label, type: issuable.to_ability_name)
|
2016-01-27 17:38:19 -05:00
|
|
|
- else
|
|
|
|
.light None
|
2016-02-25 05:35:52 -05:00
|
|
|
.selectbox.hide-collapsed
|
2016-03-15 01:06:14 -04:00
|
|
|
- issuable.labels.each do |label|
|
2016-03-18 14:35:39 -04:00
|
|
|
= hidden_field_tag "#{issuable.to_ability_name}[label_names][]", label.id, id: nil
|
2016-03-12 15:37:02 -05:00
|
|
|
.dropdown
|
2016-04-12 00:19:47 -04:00
|
|
|
%button.dropdown-menu-toggle.js-label-select.js-multiselect.js-extra-options{type: "button", data: {toggle: "dropdown", field_name: "#{issuable.to_ability_name}[label_names][]", ability_name: issuable.to_ability_name, show_no: "true", show_any: "true", project_id: (@project.id if @project), issue_update: issuable_json_path(issuable), labels: (namespace_project_labels_path(@project.namespace, @project, :json) if @project)}}
|
2016-03-12 15:37:02 -05:00
|
|
|
%span.dropdown-toggle-text
|
|
|
|
Label
|
|
|
|
= icon('chevron-down')
|
|
|
|
.dropdown-menu.dropdown-select.dropdown-menu-paging.dropdown-menu-labels.dropdown-menu-selectable
|
|
|
|
.dropdown-page-one
|
2016-03-17 15:30:23 -04:00
|
|
|
= dropdown_title("Assign labels")
|
2016-03-12 15:37:02 -05:00
|
|
|
= 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
|
2016-04-12 00:19:47 -04:00
|
|
|
- if can? current_user, :admin_label, @project and @project
|
2016-04-14 13:57:54 -04:00
|
|
|
= render partial: "shared/issuable/label_page_create"
|
2015-12-10 13:01:49 -05:00
|
|
|
|
2016-01-27 17:38:19 -05:00
|
|
|
= render "shared/issuable/participants", participants: issuable.participants(current_user)
|
|
|
|
- if current_user
|
|
|
|
- subscribed = issuable.subscribed?(current_user)
|
2016-03-01 11:33:13 -05:00
|
|
|
.block.light.subscription{data: {url: toggle_subscription_path(issuable)}}
|
2016-01-28 18:26:47 -05:00
|
|
|
.sidebar-collapsed-icon
|
|
|
|
= icon('rss')
|
2016-02-25 05:35:52 -05:00
|
|
|
.title.hide-collapsed
|
2016-03-04 12:37:07 -05:00
|
|
|
Notifications
|
2016-01-27 17:38:19 -05:00
|
|
|
- subscribtion_status = subscribed ? 'subscribed' : 'unsubscribed'
|
2016-04-14 09:06:33 -04:00
|
|
|
%button.btn.btn-block.btn-gray.js-subscribe-button.issuable-subscribe-button.hide-collapsed{ type: "button" }
|
2016-01-27 17:38:19 -05:00
|
|
|
%span= subscribed ? 'Unsubscribe' : 'Subscribe'
|
2016-02-25 05:35:52 -05:00
|
|
|
.subscription-status.hide-collapsed{data: {status: subscribtion_status}}
|
2016-01-27 17:38:19 -05:00
|
|
|
.unsubscribed{class: ( 'hidden' if subscribed )}
|
|
|
|
You're not receiving notifications from this thread.
|
|
|
|
.subscribed{class: ( 'hidden' unless subscribed )}
|
|
|
|
You're receiving notifications because you're subscribed to this thread.
|
|
|
|
|
|
|
|
- project_ref = cross_project_reference(@project, issuable)
|
2016-01-28 00:06:36 -05:00
|
|
|
.block.project-reference
|
2016-01-28 18:26:47 -05:00
|
|
|
.sidebar-collapsed-icon
|
2016-02-05 19:43:18 -05:00
|
|
|
= clipboard_button(clipboard_text: project_ref)
|
2016-02-25 05:35:52 -05:00
|
|
|
.cross-project-reference.hide-collapsed
|
2016-01-27 17:38:19 -05:00
|
|
|
%span
|
|
|
|
Reference:
|
|
|
|
%cite{title: project_ref}
|
|
|
|
= project_ref
|
|
|
|
= clipboard_button(clipboard_text: project_ref)
|
2015-12-10 13:01:49 -05:00
|
|
|
|
2016-01-27 17:38:19 -05:00
|
|
|
:javascript
|
2016-03-22 15:18:29 -04:00
|
|
|
new MilestoneSelect('{"namespace":"#{@project.namespace.path}","path":"#{@project.path}"}');
|
2016-03-12 15:37:02 -05:00
|
|
|
new LabelsSelect();
|
2016-03-19 20:49:36 -04:00
|
|
|
new IssuableContext('#{current_user.to_json(only: [:username, :id, :name])}');
|
2016-03-21 05:07:53 -04:00
|
|
|
new Subscription('.subscription')
|
2016-04-12 08:34:03 -04:00
|
|
|
new Sidebar();
|