diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-07 11:44:01 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-14 10:36:07 +0300 |
commit | f67b06ada016915211e84a7d12a063aa25e422f3 (patch) | |
tree | 25b94f817c9971c5e347530cce1732f34ffd80f7 /app/views/shared | |
parent | f34af6b83cc2663bb8a076f4df9c82047e5511ab (diff) |
Manually create todo for issuable
Added a button into the sidebar for issues & merge requests to allow users to manually create todo items
Closes #15045
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/issuable/_sidebar.html.haml | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index fb906de829a..25d830b6e49 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -1,9 +1,20 @@ +- todo = has_todo(issuable) %aside.right-sidebar{ class: sidebar_gutter_collapsed_class } .issuable-sidebar - can_edit_issuable = can?(current_user, :"admin_#{issuable.to_ability_name}", @project) .block.issuable-sidebar-header - %a.gutter-toggle.pull-right.js-sidebar-toggle{href: '#'} + %span.issuable-header-text.hide-collapsed.pull-left + Todo + %button.gutter-toggle.pull-right.js-sidebar-toggle{ type: "button", aria: { label: "Toggle sidebar" } } = sidebar_gutter_toggle_icon + %button.btn.btn-default.issuable-header-btn.pull-right.js-issuable-todo{ type: "button", data: { todo_text: "Add Todo", mark_text: "Mark Done", id: (todo.id unless todo.nil?), url: issuable_todo_path(issuable) } } + - if todo.nil? + %span + Add Todo + - else + %span + Mark Done + = icon('spin spinner', class: 'hidden js-issuable-todo-loading') = form_for [@project.namespace.becomes(Namespace), @project, issuable], remote: true, format: :json, html: {class: 'issuable-context-form inline-update js-issuable-update'} do |f| .block.assignee |