OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
Use standard banner with custom colors
Oliver Günther549df0ad14bb
diff --git a/app/components/enterprise_edition/banner_component.html.erb b/app/components/enterprise_edition/banner_component.html.erbindex 5123bca9211..7bc4c1f1399 100644--- a/app/components/enterprise_edition/banner_component.html.erb+++ b/app/components/enterprise_edition/banner_component.html.erb@@ -1,29 +1,47 @@<%=- grid_layout("op-ee-banner", **@system_arguments) do |grid|- grid.with_area(:"icon-container") do- content_tag :div, class: "op-ee-banner--shield" do- render(- Primer::Beta::Octicon.new(- icon: "op-enterprise-addons",- size: :medium,- classes: "op-ee-banner--icon"- )- )+ render(Primer::Alpha::Banner.new(+ classes: "op-enterprise-banner",+ full: false,+ icon: :"op-enterprise-addons",+ mb: 2+ )) do+ flex_layout do |flex|+ flex.with_row do+ render(Primer::Beta::Text.new(font_weight: :bold)) { title }end- end- grid.with_area(:"title-container") { render(Primer::Beta::Text.new) { title } }- grid.with_area(:"description-container") do- if features.present?- concat render(Primer::Beta::Text.new) { description }- concat content_tag(:ul) { safe_join features.map { |text| render(Primer::Beta::Text.new(tag: :li)) { text } } }- else++ flex.with_row(mt: 1) dorender(Primer::Beta::Text.new) { description }end- end- grid.with_area(:"link-container") do- render(Primer::Beta::Link.new(href: href)) do |link|- link.with_trailing_visual_icon(icon: "link-external")- link_title++ if features.present?+ flex.with_row do+ content_tag(:ul) { safe_join features.map { |text| render(Primer::Beta::Text.new(tag: :li)) { text } } }+ end+ end++ flex.with_row(mt: 2, flex_layout: true, align_items: :center) do |buttons|+ buttons.with_column do+ helpers.angular_component_tag("opce-free-trial-button")+ end++ buttons.with_column(ml: 1) do+ render(Primer::Beta::Button.new(+ tag: :a,+ href: OpenProject::Static::Links.links[:pricing][:href],+ target: "_blank",+ classes: "upsale-colored-background",+ title: t("admin.enterprise.buttons.upgrade"),+ aria_label: t("admin.enterprise.buttons.upgrade"),+ )) { t("admin.enterprise.buttons.upgrade") }+ end++ buttons.with_column(ml: 1) do+ render(Primer::Beta::Link.new(href:)) do |link|+ link.with_trailing_visual_icon(icon: "link-external")+ link_title+ end+ endendendenddiff --git a/app/components/enterprise_edition/banner_component.sass b/app/components/enterprise_edition/banner_component.sassindex 2d69234897d..c4ba4d8b311 100644--- a/app/components/enterprise_edition/banner_component.sass+++ b/app/components/enterprise_edition/banner_component.sass@@ -28,41 +28,9 @@/ ++/-$op-ee-banner--shield-width: 32px+.op-enterprise-banner+ border-color: var(--borderColor-severe-muted)+ background: white-// This is not named op-enterprise-banner because as of now, there is still a legacy angular component that uses that block name.-.op-ee-banner- display: grid- grid-template-columns: $op-ee-banner--shield-width auto auto- grid-template-areas: "icon-container title-container" "icon-container description-container" "icon-container link-container"- grid-column-gap: 0.5rem- justify-content: left- @media screen and (min-width: $breakpoint-md)- grid-template-areas: "icon-container title-container title-container" "icon-container description-container link-container"-- &--icon-container- @extend .upsale-colored- align-self: start- justify-self: center-- &--shield- @extend .upsale-border-colored- width: $op-ee-banner--shield-width- height: 42px- border-width: 10px 5px 10px 5px- border-radius: 0 0 10px 10px- border-style: solid- display: flex- align-items: center- justify-content: center-- &--icon- width: $op-ee-banner--shield-width- height: $op-ee-banner--shield-width-- &--title-container+ .Banner-visual .octicon@extend .upsale-colored- font-weight: bold-- &--link-container- align-self: startdiff --git a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.htmlindex d6679b3cf5b..5342ba5ee8c 100644--- a/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html+++ b/frontend/src/app/features/enterprise/free-trial-button/free-trial-button.component.html@@ -4,7 +4,7 @@<buttontype="button"[disabled]="trialRequested"- class="Button--primary Button--medium Button"+ class="Button--secondary Button--medium Button"(click)="openTrialModal()">{{ text.button_trial }}diff --git a/frontend/src/global_styles/content/_enterprise.sass b/frontend/src/global_styles/content/_enterprise.sassindex fb456195d23..833441c7f33 100644--- a/frontend/src/global_styles/content/_enterprise.sass+++ b/frontend/src/global_styles/content/_enterprise.sass@@ -53,14 +53,14 @@align-items: center.upsale-colored- color: $spot-color-feedback-warning-dark+ color: var(--enterprise-upsale-color).upsale-colored-background- background: $spot-color-feedback-warning-dark !important+ background: var(--enterprise-upsale-color) !importantcolor: white !important.upsale-border-colored- border-color: $spot-color-feedback-warning-dark+ border-color: var(--enterprise-upsale-color).widget-box--blocks--upsale-titlefont-weight: 400diff --git a/frontend/src/global_styles/openproject/_variable_defaults.scss b/frontend/src/global_styles/openproject/_variable_defaults.scssindex 785af0a2b1f..a590eda1e50 100644--- a/frontend/src/global_styles/openproject/_variable_defaults.scss+++ b/frontend/src/global_styles/openproject/_variable_defaults.scss@@ -137,4 +137,5 @@--split-screen-width: 550px;--full-view-split-right-width: 550px;--gantt-split-width: 50%;+ --enterprise-upsale-color: #FB8F44;}