From 2971155ccb5e76cd998cb5422f2fe47885e151ed Mon Sep 17 00:00:00 2001 From: Vincent Latombe Date: Sat, 9 Sep 2023 05:48:51 +0200 Subject: [PATCH] Make branding overridable in signin/login page (#8462) * Move resources from DefaultSimplePageDecorator to SimplePageDecorator to ease implementation. --- .../jenkins/model/SimplePageDecorator.java | 19 ++++++++++++ .../HudsonPrivateSecurityRealm/signup.jelly | 9 ++---- .../jenkins/model/Jenkins/login.jelly | 9 ++---- .../SimplePageDecorator/simple-branding.jelly | 30 +++++++++++++++++++ .../simple-head.jelly | 0 .../simple-header.jelly | 0 .../simple-header_fr.properties | 0 .../simple-header_it.properties | 0 .../simple-header_ja.properties | 0 .../simple-header_pl.properties | 0 .../simple-header_pt_BR.properties | 0 .../simple-header_tr.properties | 0 .../simple-header_zh_TW.properties | 0 13 files changed, 55 insertions(+), 12 deletions(-) create mode 100644 core/src/main/resources/jenkins/model/SimplePageDecorator/simple-branding.jelly rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-head.jelly (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header.jelly (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_fr.properties (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_it.properties (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_ja.properties (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_pl.properties (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_pt_BR.properties (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_tr.properties (100%) rename core/src/main/resources/jenkins/model/{DefaultSimplePageDecorator => SimplePageDecorator}/simple-header_zh_TW.properties (100%) diff --git a/core/src/main/java/jenkins/model/SimplePageDecorator.java b/core/src/main/java/jenkins/model/SimplePageDecorator.java index 7a0639ee774a..29e08679506c 100644 --- a/core/src/main/java/jenkins/model/SimplePageDecorator.java +++ b/core/src/main/java/jenkins/model/SimplePageDecorator.java @@ -35,6 +35,25 @@ *

* This class provides a few hooks to augment the HTML of the login page. * + *

+ *
simple-branding.jelly
+ *
+ * This view contributes to the branding section, usually located on the left side of the login/register pages. + *
+ *
simple-footer.jelly
+ *
+ * This view contributes to the footer section, located below the login/register form. + *
+ *
simple-head.jelly
+ *
+ * This view contributes to the head section. + *
+ *
simple-header.jelly
+ *
+ * This view contributes to the header section just above the login/register form. + *
+ *
+ * * @since 2.128 */ public class SimplePageDecorator extends Descriptor implements ExtensionPoint, Describable { diff --git a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly index 1e550e3a1497..52e13b720fc7 100644 --- a/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly +++ b/core/src/main/resources/hudson/security/HudsonPrivateSecurityRealm/signup.jelly @@ -48,19 +48,16 @@ THE SOFTWARE. - +