diff options
author | Phil Hughes <me@iamphill.com> | 2016-06-07 12:54:02 +0300 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-06-14 10:36:07 +0300 |
commit | 04c199a0ab2db012e8c5a190ce2836f22e846305 (patch) | |
tree | a009c654e89fa5155d071c8888943f586c3c578e /app/views/shared | |
parent | a1be3241ec1f91182435a10615beac15fcfe235a (diff) |
Fixed bug with sidebar when user is not logged in
Diffstat (limited to 'app/views/shared')
-rw-r--r-- | app/views/shared/issuable/_sidebar.html.haml | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/app/views/shared/issuable/_sidebar.html.haml b/app/views/shared/issuable/_sidebar.html.haml index baeee7f57ec..e3aacb50c97 100644 --- a/app/views/shared/issuable/_sidebar.html.haml +++ b/app/views/shared/issuable/_sidebar.html.haml @@ -3,18 +3,20 @@ .issuable-sidebar - can_edit_issuable = can?(current_user, :"admin_#{issuable.to_ability_name}", @project) .block.issuable-sidebar-header - %span.issuable-header-text.hide-collapsed.pull-left - Todo + - if current_user + %span.issuable-header-text.hide-collapsed.pull-left + Todo %a.gutter-toggle.pull-right.js-sidebar-toggle{ role: "button", href: "#", 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') + - if current_user + %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 |