From 7f622e2e6b49220666a9423bbf75af512a09cd86 Mon Sep 17 00:00:00 2001 From: Alasdair Smith Date: Fri, 1 Dec 2017 17:14:53 +0000 Subject: [PATCH] Conditionally show V1 dash link --- .../app/coffee/Features/Project/ProjectController.coffee | 1 + services/web/app/views/project/list.pug | 7 ++++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/services/web/app/coffee/Features/Project/ProjectController.coffee b/services/web/app/coffee/Features/Project/ProjectController.coffee index 9d9b7d9a13..38b2eb66c3 100644 --- a/services/web/app/coffee/Features/Project/ProjectController.coffee +++ b/services/web/app/coffee/Features/Project/ProjectController.coffee @@ -182,6 +182,7 @@ module.exports = ProjectController = hasSubscription: results.hasSubscription[0] isShowingV1Projects: results.v1Projects? noV1Connection: results.v1Projects?.noConnection + showV1DashLink: true # TODO: false if SL } if Settings?.algolia?.app_id? and Settings?.algolia?.read_only_api_key? diff --git a/services/web/app/views/project/list.pug b/services/web/app/views/project/list.pug index 48d2cf205a..6702527612 100644 --- a/services/web/app/views/project/list.pug +++ b/services/web/app/views/project/list.pug @@ -63,9 +63,10 @@ block content aside.project-list-sidebar.col-md-2.col-xs-3 include ./list/side-bar - .project-list-sidebar-v1-link.col-md-2.col-xs-3 - span Want to go back to the V1 dashboard? - a.btn.btn-default(href=settings.overleaf.host + "/dash") Go back to V1 + if showV1DashLink + .project-list-sidebar-v1-link.col-md-2.col-xs-3 + span Want to go back to the V1 dashboard? + a.btn.btn-default(href=settings.overleaf.host + "/dash") Go back to V1 .project-list-main.col-md-10.col-xs-9 include ./list/notifications