diff --git a/app/assets/stylesheets/common/_header.scss b/app/assets/stylesheets/common/_header.scss index ccd36b1b..dc5a9daa 100644 --- a/app/assets/stylesheets/common/_header.scss +++ b/app/assets/stylesheets/common/_header.scss @@ -34,6 +34,10 @@ } } + .brandDisabled { + pointer-events: none; + } + .navbarToggler { @extend .navbar-toggler; diff --git a/app/assets/stylesheets/components/Board.scss b/app/assets/stylesheets/components/Board.scss index 3b14eea8..f356ad68 100644 --- a/app/assets/stylesheets/components/Board.scss +++ b/app/assets/stylesheets/components/Board.scss @@ -56,6 +56,18 @@ .anonymousFeedbackLink { @extend .my-2; } + + /* style lists */ + ul { + width: fit-content; + margin: 0 auto; + margin-bottom: 1rem; + li { + text-align: left; + position: relative; + left: -8px; + } + } } .sidebarFilters { diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 2e3c1956..59b030cb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -2,6 +2,7 @@ require 'uri' class ApplicationController < ActionController::Base include ApplicationHelper + include HeaderHelper include Pundit::Authorization rescue_from Pundit::NotAuthorizedError, with: :user_not_authorized diff --git a/app/helpers/header_helper.rb b/app/helpers/header_helper.rb new file mode 100644 index 00000000..70a201cc --- /dev/null +++ b/app/helpers/header_helper.rb @@ -0,0 +1,11 @@ +module HeaderHelper + def get_url_for_logo + if Current.tenant.tenant_setting.logo_links_to == "root_page" + @header_full_urls ? get_url_for(method(:root_url)) : root_path + elsif Current.tenant.tenant_setting.logo_links_to == "custom_url" + Current.tenant.tenant_setting.logo_custom_url + else + nil + end + end +end \ No newline at end of file diff --git a/app/javascript/components/SiteSettings/General/GeneralSiteSettingsP.tsx b/app/javascript/components/SiteSettings/General/GeneralSiteSettingsP.tsx index 77b3cf69..b4ad7971 100644 --- a/app/javascript/components/SiteSettings/General/GeneralSiteSettingsP.tsx +++ b/app/javascript/components/SiteSettings/General/GeneralSiteSettingsP.tsx @@ -13,6 +13,9 @@ import { TENANT_SETTING_BRAND_DISPLAY_NONE, TENANT_SETTING_COLLAPSE_BOARDS_IN_HEADER_NO_COLLAPSE, TENANT_SETTING_COLLAPSE_BOARDS_IN_HEADER_ALWAYS_COLLAPSE, + TENANT_SETTING_LOGO_LINKS_TO_ROOT_PAGE, + TENANT_SETTING_LOGO_LINKS_TO_CUSTOM_URL, + TENANT_SETTING_LOGO_LINKS_TO_NOTHING, } from '../../../interfaces/ITenantSetting'; import { DangerText, SmallMutedText } from '../../common/CustomTexts'; import { getLabel, getValidationMessage } from '../../../helpers/formUtils'; @@ -31,6 +34,8 @@ export interface ISiteSettingsGeneralForm { isPrivate: boolean; allowAnonymousFeedback: boolean; feedbackApprovalPolicy: string; + logoLinksTo: string; + logoCustomUrl?: string; showRoadmapInHeader: boolean; collapseBoardsInHeader: string; showVoteCount: boolean; @@ -58,6 +63,8 @@ interface Props { isPrivate: boolean, allowAnonymousFeedback: boolean, feedbackApprovalPolicy: string, + logoLinksTo: string, + logoCustomUrl: string, showRoadmapInHeader: boolean, collapseBoardsInHeader: string, showVoteCount: boolean, @@ -94,6 +101,8 @@ const GeneralSiteSettingsP = ({ isPrivate: originForm.isPrivate, allowAnonymousFeedback: originForm.allowAnonymousFeedback, feedbackApprovalPolicy: originForm.feedbackApprovalPolicy, + logoLinksTo: originForm.logoLinksTo, + logoCustomUrl: originForm.logoCustomUrl, showRoadmapInHeader: originForm.showRoadmapInHeader, collapseBoardsInHeader: originForm.collapseBoardsInHeader, showVoteCount: originForm.showVoteCount, @@ -114,6 +123,8 @@ const GeneralSiteSettingsP = ({ data.isPrivate, data.allowAnonymousFeedback, data.feedbackApprovalPolicy, + data.logoLinksTo, + data.logoCustomUrl, data.showRoadmapInHeader, data.collapseBoardsInHeader, data.showVoteCount, @@ -301,29 +312,59 @@ const GeneralSiteSettingsP = ({