From bbb97bed26019c650242e72057078c7c59077c4d Mon Sep 17 00:00:00 2001 From: Thomas Date: Tue, 1 Feb 2022 11:55:18 +0100 Subject: [PATCH] Merge pull request #6558 from overleaf/tm-wfh2021-ended Remove notifications for WFH2021 offer, revert side-bar to old Upgrade notice GitOrigin-RevId: d5f0bb34b40605a335d48b1d2db54df8fab9224a --- .../app/views/project/list/notifications.pug | 19 ------------------- .../web/app/views/project/list/side-bar.pug | 15 +++++---------- .../views/subscriptions/plans-marketing.pug | 9 --------- .../project-list/notifications-controller.js | 13 ------------- 4 files changed, 5 insertions(+), 51 deletions(-) diff --git a/services/web/app/views/project/list/notifications.pug b/services/web/app/views/project/list/notifications.pug index 3d238d7c1e..28a1ab2d7f 100644 --- a/services/web/app/views/project/list/notifications.pug +++ b/services/web/app/views/project/list/notifications.pug @@ -251,22 +251,3 @@ include ../../_mixins/reconfirm_affiliation ng-if="userEmail.samlIdentifier && userEmail.samlIdentifier.providerId === reconfirmedViaSAML" ) +reconfirmedAffiliationNotification() - - - var hasPaidAffiliation = userAffiliations.some(affiliation => affiliation.licence && affiliation.licence !== 'free') - if settings.enableSubscriptions && !hasSubscription && !hasPaidAffiliation - ul.list-unstyled( - ng-controller="DismissableNotificationsController", - ng-cloak - ) - li.notification-entry( - ng-if="shouldShowNotification && projects.length > 0" - ) - .alert.alert-info - .notification-body - span Ending Soon: Our WFH2021 discounts are available until January 31st 2022. - .notification-action - a.pull-right.btn.btn-sm.btn-info(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Dash-Banner") Upgrade - .notification-close - button(ng-click="dismiss()").close.pull-right - span(aria-hidden="true") × - span.sr-only #{translate("close")} diff --git a/services/web/app/views/project/list/side-bar.pug b/services/web/app/views/project/list/side-bar.pug index 31138ee81b..14a1fe75e4 100644 --- a/services/web/app/views/project/list/side-bar.pug +++ b/services/web/app/views/project/list/side-bar.pug @@ -134,16 +134,11 @@ if (isOverleaf) href="/user/settings" ) Add Affiliation - //- .row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered - //- hr - //- p.small #{translate("on_free_sl")} - //- p - //- a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")} - //- p.small.text-centered - //- | #{translate("or_unlock_features_bonus")} - //- a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}. .row-spaced(ng-if="hasProjects && userHasNoSubscription && !userOnPayingUniversity", ng-cloak).text-centered hr - p.small Ending Soon: Our WFH2021 discounts are available until January 31st 2022. + p.small #{translate("on_free_sl")} p - a(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Dash-Sidebar").btn.btn-primary Upgrade + a(href="/user/subscription/plans" ng-click="upgradeSubscription()").btn.btn-primary #{translate("upgrade")} + p.small.text-centered + | #{translate("or_unlock_features_bonus")} + a(href="/user/bonus" ng-click="share()") #{translate("sharing_sl")}. diff --git a/services/web/app/views/subscriptions/plans-marketing.pug b/services/web/app/views/subscriptions/plans-marketing.pug index 58c71bbe43..5f16b5e5d8 100644 --- a/services/web/app/views/subscriptions/plans-marketing.pug +++ b/services/web/app/views/subscriptions/plans-marketing.pug @@ -14,15 +14,6 @@ block append meta block content main.content.content-alt#main-content - .container - .user-notifications - ul.list-unstyled(ng-cloak) - li.notification-entry - .alert.alert-info - .notification-body - span Ending Soon: Our WFH2021 discounts are available until January 31st 2022. - .notification-action - a.btn.btn-sm.btn-info(href="https://www.overleaf.com/events/wfh2021" event-tracking="Event-Pages" event-tracking-trigger="click" event-tracking-ga="WFH-Offer-Click" event-tracking-label="Plans-Banner") Upgrade .content-page .plans .container(ng-cloak) diff --git a/services/web/frontend/js/main/project-list/notifications-controller.js b/services/web/frontend/js/main/project-list/notifications-controller.js index 500b712994..9a34fff5ee 100644 --- a/services/web/frontend/js/main/project-list/notifications-controller.js +++ b/services/web/frontend/js/main/project-list/notifications-controller.js @@ -23,19 +23,6 @@ App.controller('NotificationsController', function ($scope, $http) { } }) -App.controller( - 'DismissableNotificationsController', - function ($scope, localStorage) { - $scope.shouldShowNotification = - localStorage('dismissed-covid-19-notification-extended') !== true - - $scope.dismiss = () => { - localStorage('dismissed-covid-19-notification-extended', true) - $scope.shouldShowNotification = false - } - } -) - App.controller('ProjectInviteNotificationController', function ($scope, $http) { // Shortcuts for translation keys $scope.projectName = $scope.notification.messageOpts.projectName