From a560bd2f0c151395c0d59a6d5c9865f871eed16d Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Wed, 26 Jul 2023 10:16:57 +0200 Subject: [PATCH] Move css from custom file. Issue #3296 --- hypha/apply/funds/views.py | 4 ++-- hypha/static_src/sass/components/_link.scss | 8 +++++--- hypha/static_src/sass/custom/_custom.scss | 6 +----- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/hypha/apply/funds/views.py b/hypha/apply/funds/views.py index 6c907c34ee..bcaeeef4b6 100644 --- a/hypha/apply/funds/views.py +++ b/hypha/apply/funds/views.py @@ -1746,11 +1746,11 @@ def withdraw(self, request, *args, **kwargs): if not settings.ENABLE_SUBMISSION_WITHDRAWAL: raise PermissionDenied - obj = self.get_object() - if not request.user.is_applicant: raise PermissionDenied + obj = self.get_object() + withdraw_actions = [action for action in obj.workflow[obj.status].transitions.keys() if 'withdraw' in action] if len(withdraw_actions) > 0: diff --git a/hypha/static_src/sass/components/_link.scss b/hypha/static_src/sass/components/_link.scss index 7c57ec755b..b1a11869a6 100644 --- a/hypha/static_src/sass/components/_link.scss +++ b/hypha/static_src/sass/components/_link.scss @@ -92,7 +92,8 @@ } &--edit-submission, - &--delete-submission { + &--delete-submission, + &--withdraw-submission { display: flex; align-items: center; font-weight: $weight--bold; @@ -111,12 +112,13 @@ } } - &--delete-submission { + &--delete-submission, + &--withdraw-submission { margin-inline-end: 1rem; padding-inline-end: 1rem; border-inline-end: 2px solid $color--mid-grey; - &:only-child { + &:last-child { border-inline-end: 0; padding-inline-end: 0; margin-inline-end: 0; diff --git a/hypha/static_src/sass/custom/_custom.scss b/hypha/static_src/sass/custom/_custom.scss index 55e678b65a..061b3d43d2 100644 --- a/hypha/static_src/sass/custom/_custom.scss +++ b/hypha/static_src/sass/custom/_custom.scss @@ -1,5 +1 @@ -.link--withdraw-submission { - margin-right: 1rem; - padding-right: 1rem; - font-weight: 700; -} +// stylelint-disable no-empty-source