summaryrefslogtreecommitdiff
path: root/app/views/shared/issuable/_sidebar.html.haml
diff options
context:
space:
mode:
authorFilipa Lacerda <filipa@gitlab.com>2017-03-29 13:41:12 +0000
committerFilipa Lacerda <filipa@gitlab.com>2017-03-29 13:41:12 +0000
commit412c9e8b9510608dcd9975997f5fb9f6efebb515 (patch)
tree472e1af9f1435d716ea1569a7bf8992739fb3cac /app/views/shared/issuable/_sidebar.html.haml
parent03c24c331853cc777f2f9d91de2edbe40019c3fb (diff)
parent89d1a1c097df179d021168ac6f7feddbc8507b9c (diff)
downloadgitlab-ce-412c9e8b9510608dcd9975997f5fb9f6efebb515.tar.gz
Merge branch 'create-collapsed-todo-button' into 'master'
Added initial todo functionality to collapsed sidebar Closes #24805 See merge request !7827
Diffstat (limited to 'app/views/shared/issuable/_sidebar.html.haml')
-rw-r--r--app/views/shared/issuable/_sidebar.html.haml11
1 files changed, 4 insertions, 7 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml
index f19f362f514..92d2d93a732 100644
--- a/app/views/shared/issuable/_sidebar.html.haml
+++ b/app/views/shared/issuable/_sidebar.html.haml
@@ -13,15 +13,12 @@
%a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", "aria-label" => "Toggle sidebar" }
= sidebar_gutter_toggle_icon
- if current_user
- %button.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo{ type: "button", "aria-label" => (todo.nil? ? "Add todo" : "Mark done"), data: { todo_text: "Add todo", mark_text: "Mark done", issuable_id: issuable.id, issuable_type: issuable.class.name.underscore, url: namespace_project_todos_path(@project.namespace, @project), delete_path: (dashboard_todo_path(todo) if todo) } }
- %span.js-issuable-todo-text
- - if todo
- Mark done
- - else
- Add todo
- = icon('spin spinner', class: 'hidden js-issuable-todo-loading', 'aria-hidden': 'true')
+ = render "shared/issuable/sidebar_todo", todo: todo, issuable: issuable
= form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, format: :json, html: { class: 'issuable-context-form inline-update js-issuable-update' } do |f|
+ - if current_user
+ .block.todo.hide-expanded
+ = render "shared/issuable/sidebar_todo", todo: todo, issuable: issuable, is_collapsed: true
.block.assignee
.sidebar-collapsed-icon.sidebar-collapsed-user{ data: { toggle: "tooltip", placement: "left", container: "body" }, title: (issuable.assignee.name if issuable.assignee) }
- if issuable.assignee