From 26ed950ef68f4a5d2c882d882e744a186d0d7f93 Mon Sep 17 00:00:00 2001 From: Matt Raible Date: Tue, 11 Aug 2026 16:36:00 -0600 Subject: [PATCH] Convert the admin and editor UI from Bootstrap 3 to Bootstrap 5.3 Restores the bootstrap form theme via struts2-bootstrap-plugin 6.1.0, which is Jakarta-native and emits Bootstrap 5 markup, and converts the JSPs and basic themes accordingly: class renames, data-bs-* attributes, navbar restructure, and bootstrap-icons in place of glyphicons. A tooltip.ftl template override emits data-bs-toggle so field help renders as opt-in Bootstrap tooltips initialised in roller.js. WebJar assets are served straight from META-INF/resources by the servlet container, so the webjars servlet is removed. The profile page shows the OIDC issuer and subject as separate read-only fields instead of the raw federated identity string. --- app/pom.xml | 12 +- .../resources/ApplicationResources.properties | 4 + .../resources/template/bootstrap/tooltip.ftl | 24 ++ .../webapp/WEB-INF/jsps/admin/CacheInfo.jsp | 2 +- .../WEB-INF/jsps/admin/GlobalConfig.jsp | 10 +- .../webapp/WEB-INF/jsps/admin/PingTargets.jsp | 12 +- .../WEB-INF/jsps/admin/PlanetConfig.jsp | 2 +- .../WEB-INF/jsps/admin/PlanetGroupSidebar.jsp | 2 +- .../WEB-INF/jsps/admin/PlanetGroupSubs.jsp | 18 +- .../jsps/admin/PlanetGroupSubsSidebar.jsp | 4 +- .../WEB-INF/jsps/admin/PlanetGroups.jsp | 4 +- .../webapp/WEB-INF/jsps/admin/UserAdmin.jsp | 2 +- .../WEB-INF/jsps/core/CreateDatabase.jsp | 2 +- .../webapp/WEB-INF/jsps/core/CreateWeblog.jsp | 31 +- .../main/webapp/WEB-INF/jsps/core/Login.jsp | 40 +-- .../webapp/WEB-INF/jsps/core/MainMenu.jsp | 32 +-- .../WEB-INF/jsps/core/MainMenuSidebar.jsp | 6 +- .../main/webapp/WEB-INF/jsps/core/Profile.jsp | 24 +- .../webapp/WEB-INF/jsps/core/Register.jsp | 18 +- .../main/webapp/WEB-INF/jsps/core/Setup.jsp | 26 +- .../WEB-INF/jsps/core/UpgradeDatabase.jsp | 8 +- .../webapp/WEB-INF/jsps/editor/Bookmarks.jsp | 28 +- .../WEB-INF/jsps/editor/BookmarksImport.jsp | 6 +- .../WEB-INF/jsps/editor/BookmarksSidebar.jsp | 4 +- .../webapp/WEB-INF/jsps/editor/Categories.jsp | 10 +- .../WEB-INF/jsps/editor/CategoriesSidebar.jsp | 2 +- .../webapp/WEB-INF/jsps/editor/Comments.jsp | 2 +- .../WEB-INF/jsps/editor/CommentsSidebar.jsp | 14 +- .../webapp/WEB-INF/jsps/editor/Entries.jsp | 22 +- .../WEB-INF/jsps/editor/EntriesSidebar.jsp | 14 +- .../webapp/WEB-INF/jsps/editor/EntryEdit.jsp | 86 +++--- .../WEB-INF/jsps/editor/EntryEditor.jsp | 24 +- .../WEB-INF/jsps/editor/EntrySidebar.jsp | 8 +- .../WEB-INF/jsps/editor/Maintenance.jsp | 6 +- .../WEB-INF/jsps/editor/MediaFileAdd.jsp | 29 +- .../editor/MediaFileAddExternalInclude.jsp | 124 ++++---- .../jsps/editor/MediaFileAddSuccess.jsp | 18 +- .../WEB-INF/jsps/editor/MediaFileEdit.jsp | 16 +- .../jsps/editor/MediaFileImageChooser.jsp | 266 +++++++++--------- .../WEB-INF/jsps/editor/MediaFileSidebar.jsp | 8 +- .../WEB-INF/jsps/editor/MediaFileView.jsp | 8 +- .../WEB-INF/jsps/editor/MemberResign.jsp | 4 +- .../webapp/WEB-INF/jsps/editor/Members.jsp | 4 +- .../WEB-INF/jsps/editor/MembersInvite.jsp | 7 +- .../WEB-INF/jsps/editor/MembersSidebar.jsp | 2 +- .../WEB-INF/jsps/editor/StylesheetEdit.jsp | 18 +- .../WEB-INF/jsps/editor/TemplateEdit.jsp | 28 +- .../webapp/WEB-INF/jsps/editor/Templates.jsp | 4 +- .../WEB-INF/jsps/editor/TemplatesSidebar.jsp | 4 +- .../webapp/WEB-INF/jsps/editor/ThemeEdit.jsp | 47 ++-- .../WEB-INF/jsps/editor/WeblogConfig.jsp | 4 +- .../jsps/editor/WeblogRemoveConfirm.jsp | 4 +- .../WEB-INF/jsps/tiles/bannerInstallation.jsp | 10 +- .../WEB-INF/jsps/tiles/bannerStatus.jsp | 66 ++--- .../main/webapp/WEB-INF/jsps/tiles/head.jsp | 6 +- .../main/webapp/WEB-INF/jsps/tiles/menu.jsp | 18 +- .../webapp/WEB-INF/jsps/tiles/messages.jsp | 12 +- .../WEB-INF/jsps/tiles/tiles-mainmenupage.jsp | 12 +- .../jsps/tiles/tiles-simple-tabbedpage.jsp | 4 +- .../WEB-INF/jsps/tiles/tiles-simplepage.jsp | 4 +- .../WEB-INF/jsps/tiles/tiles-tabbedpage.jsp | 12 +- .../main/webapp/roller-ui/styles/roller.css | 43 ++- app/src/main/webapp/theme/scripts/roller.js | 11 + 63 files changed, 698 insertions(+), 604 deletions(-) create mode 100644 app/src/main/resources/template/bootstrap/tooltip.ftl diff --git a/app/pom.xml b/app/pom.xml index e127402c0d..5d375b79f7 100644 --- a/app/pom.xml +++ b/app/pom.xml @@ -58,6 +58,8 @@ limitations under the License. 7.0.6 7.1.1 6.1.0 + 5.3.8 + 1.13.1 2.4.1 1.0.2 3.1.3 @@ -246,7 +248,6 @@ limitations under the License. ${struts.version} - @@ -255,12 +256,19 @@ limitations under the License. ${struts-bootstrap.version} + org.webjars bootstrap - 3.4.1 + ${bootstrap.version} + + + + org.webjars.npm + bootstrap-icons + ${bootstrap-icons.version} diff --git a/app/src/main/resources/ApplicationResources.properties b/app/src/main/resources/ApplicationResources.properties index 5041ab909a..5d8865556b 100644 --- a/app/src/main/resources/ApplicationResources.properties +++ b/app/src/main/resources/ApplicationResources.properties @@ -1348,6 +1348,10 @@ userSettings.email=Email userSettings.locale=Locale userSettings.timeZone=Timezone userSettings.openIdUrl=Federated Identity +userSettings.oidcIssuer=OIDC Issuer +userSettings.oidcSubject=OIDC Subject +userSettings.tip.oidcIssuer=The identity provider that authenticated you. Assigned at login and cannot be changed here. +userSettings.tip.oidcSubject=Your unique identifier at that identity provider. Assigned at login and cannot be changed here. userSettings.tip.username=Usernames can''t be changed. # ----------------------------------------------------------------- Your profile (profile.jsp) diff --git a/app/src/main/resources/template/bootstrap/tooltip.ftl b/app/src/main/resources/template/bootstrap/tooltip.ftl new file mode 100644 index 0000000000..90f72298cb --- /dev/null +++ b/app/src/main/resources/template/bootstrap/tooltip.ftl @@ -0,0 +1,24 @@ +<#-- + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. The ASF licenses this file to You + * under the Apache License, Version 2.0 (the "License"); you may not + * use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. For additional information regarding + * copyright in this work, please see the NOTICE file in the top level + * directory of this distribution. + * + * Overrides the struts2-bootstrap-plugin template, which still emits the + * pre-Bootstrap-5 "data-toggle" attribute. Bootstrap 5 reads "data-bs-toggle" + * and tooltips are opt-in, so roller.js initialises these. +--> +<#if attributes.tooltip?? && attributes.tooltip?has_content> + +<#t/> diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/CacheInfo.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/CacheInfo.jsp index 5e7e2ea5cc..a3fbda361c 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/CacheInfo.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/CacheInfo.jsp @@ -40,7 +40,7 @@ - + diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp index fc3494608e..957cd65a58 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/GlobalConfig.jsp @@ -69,8 +69,8 @@ <%-- "integer" use input type number --%> -
-
@@ -190,7 +190,7 @@ - diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetConfig.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetConfig.jsp index 936a42629b..3221fb2e6a 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetConfig.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetConfig.jsp @@ -68,6 +68,6 @@ - "/> + "/> diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSidebar.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSidebar.jsp index 970ad33b49..f164ca41b7 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSidebar.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSidebar.jsp @@ -29,6 +29,6 @@ - + Create new Custom Planet Group diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubs.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubs.jsp index be7ee804a4..3444e849a2 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubs.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubs.jsp @@ -49,11 +49,11 @@ <%-- only show edit form for custom group --%> -
-
+
+

-
+
@@ -61,7 +61,7 @@ - + @@ -76,12 +76,12 @@ tooltip="%{getText('planetGroups.tip.handle')}"/> -
- +
+
- + - '"/> @@ -127,7 +127,7 @@ ${fn:substring(feedURL, 0, 100)} ')"> - + diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubsSidebar.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubsSidebar.jsp index a46e1bb90f..458d8bbb9d 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubsSidebar.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroupSubsSidebar.jsp @@ -29,7 +29,7 @@ + theme="bootstrap" style="margin-top:1em" cssClass="form-horizontal"> @@ -38,7 +38,7 @@

- +
diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroups.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroups.jsp index 6223ee319d..320677229c 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroups.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/PlanetGroups.jsp @@ -44,14 +44,14 @@ - + ')"> - + diff --git a/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp b/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp index 59fd609554..bf719f8dcf 100644 --- a/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/admin/UserAdmin.jsp @@ -38,7 +38,7 @@ - diff --git a/app/src/main/webapp/WEB-INF/jsps/core/CreateDatabase.jsp b/app/src/main/webapp/WEB-INF/jsps/core/CreateDatabase.jsp index 66db1ca148..99f17af0fa 100644 --- a/app/src/main/webapp/WEB-INF/jsps/core/CreateDatabase.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/core/CreateDatabase.jsp @@ -55,7 +55,7 @@ - + diff --git a/app/src/main/webapp/WEB-INF/jsps/core/CreateWeblog.jsp b/app/src/main/webapp/WEB-INF/jsps/core/CreateWeblog.jsp index 48c4f08f16..e6d161f444 100644 --- a/app/src/main/webapp/WEB-INF/jsps/core/CreateWeblog.jsp +++ b/app/src/main/webapp/WEB-INF/jsps/core/CreateWeblog.jsp @@ -34,7 +34,7 @@ name="bean.handle" size="30" maxlength="30" onkeyup="handlePreview(this)" data-msg-required="%{getText('CreateWeblog.error.handleNull')}" required="required"/> -
+
:  @@ -59,24 +59,28 @@ tooltip="%{getText('createWebsite.tip.timezone')}" name="bean.timeZone" size="1" list="timeZonesList"/> -
-