diff options
author | Phil Hughes <me@iamphill.com> | 2016-10-20 08:54:33 +0100 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2016-10-20 08:54:33 +0100 |
commit | 29645f06e7889fe85bb155abaa0f361f8680311b (patch) | |
tree | 6dc442e40471790e0b74babc165618b4e095a068 /app/views/projects/boards/components | |
parent | 344154e9068945af2874d6cb253457fb90fef3f3 (diff) | |
download | gitlab-ce-29645f06e7889fe85bb155abaa0f361f8680311b.tar.gz |
Hides/shows the boards sidebar
Rather than constructing & then deconstructing, we know just hide & show
the sidebar. This is done so we dont' have a memory leak on the frontend
with objects getting created.
Diffstat (limited to 'app/views/projects/boards/components')
3 files changed, 7 insertions, 6 deletions
diff --git a/app/views/projects/boards/components/_sidebar.html.haml b/app/views/projects/boards/components/_sidebar.html.haml index 9616ee5b795..f0c0c6953e0 100644 --- a/app/views/projects/boards/components/_sidebar.html.haml +++ b/app/views/projects/boards/components/_sidebar.html.haml @@ -1,6 +1,6 @@ %board-sidebar{ "inline-template" => true, ":current-user" => "#{current_user.to_json(only: [:username, :id, :name], methods: [:avatar_url]) if current_user}" } - %aside.right-sidebar.right-sidebar-expanded.issue-boards-sidebar{ "v-if" => "showSidebar" } + %aside.right-sidebar.right-sidebar-expanded.issue-boards-sidebar{ "v-show" => "showSidebar" } .issuable-sidebar .block.issuable-sidebar-header %span.issuable-header-text.hide-collapsed.pull-left diff --git a/app/views/projects/boards/components/sidebar/_due_date.html.haml b/app/views/projects/boards/components/sidebar/_due_date.html.haml index 91b4a572ee4..c7da1d0d4ac 100644 --- a/app/views/projects/boards/components/sidebar/_due_date.html.haml +++ b/app/views/projects/boards/components/sidebar/_due_date.html.haml @@ -10,10 +10,11 @@ No due date %span.bold{ "v-if" => "issue.dueDate" } {{ issue.dueDate | due-date }} - %span.no-value.js-remove-due-date-holder{ "v-if" => "issue.dueDate" } - \- - %a.js-remove-due-date{ href: "#", role: "button" } - remove due date + - if can?(current_user, :admin_issue, @project) + %span.no-value.js-remove-due-date-holder{ "v-if" => "issue.dueDate" } + \- + %a.js-remove-due-date{ href: "#", role: "button" } + remove due date - if can?(current_user, :admin_issue, @project) .selectbox %input{ type: "hidden", diff --git a/app/views/projects/boards/components/sidebar/_labels.html.haml b/app/views/projects/boards/components/sidebar/_labels.html.haml index 0e2ea74ec41..a6d2c3c300c 100644 --- a/app/views/projects/boards/components/sidebar/_labels.html.haml +++ b/app/views/projects/boards/components/sidebar/_labels.html.haml @@ -5,7 +5,7 @@ - if can?(current_user, :admin_issue, @project) = link_to "Edit", "#", class: "edit-link pull-right" .value.issuable-show-labels - %span.no-value{ "v-if" => "issue.labels.length === 0" } + %span.no-value{ "v-if" => "issue.labels && issue.labels.length === 0" } None %a{ href: "#", "v-for" => "label in issue.labels" } |