From 3fbdf98c9a5553bfb5dba18f12c079b86ae65a10 Mon Sep 17 00:00:00 2001 From: David Pursehouse Date: Thu, 7 Feb 2019 10:46:20 +0900 Subject: [PATCH] Remove remnants of project-specific themes support Project-specific themes were only implemented in the GWT UI, which has been removed. Remove the ThemeInfo entity, and no longer include the 'theme' field in the ConfigInfo entity returned by the project config REST API endpoint. This is a breaking change for any client that still uses that endpoint. The custom site header HTML, footer HTML, and CSS files are still used by login screens and the internally managed Gitweb server. Update the theme documentation to mention this. PolyGerrit has site-wide theme support, but it is not documented in the existing config-themes.txt, and adding it is not within the scope of this change. Change-Id: Ibe824a9416fac65bd365407b8ce22e03515b5b52 --- Documentation/config-themes.txt | 20 +++---- Documentation/intro-project-owner.txt | 12 ---- Documentation/rest-api-projects.txt | 18 ------ .../extensions/api/projects/ConfigInfo.java | 1 - .../extensions/api/projects/ThemeInfo.java | 29 ---------- .../gerrit/server/config/SitePaths.java | 5 +- .../gerrit/server/project/ProjectState.java | 56 ------------------- .../restapi/project/ConfigInfoImpl.java | 1 - .../server/permissions/RefControlTest.java | 3 - 9 files changed, 8 insertions(+), 137 deletions(-) delete mode 100644 java/com/google/gerrit/extensions/api/projects/ThemeInfo.java diff --git a/Documentation/config-themes.txt b/Documentation/config-themes.txt index 38bfc46e3b..a83c747a52 100644 --- a/Documentation/config-themes.txt +++ b/Documentation/config-themes.txt @@ -4,34 +4,28 @@ Gerrit supports some customization of the HTML it sends to the browser, allowing organizations to alter the look and feel of the application to fit with their general scheme. -Configuration can either be sitewide or per-project. Projects without a -specified theme inherit from their parents, or from the sitewide theme -for `All-Projects`. +== HTML Header/Footer and CSS -Sitewide themes are stored in `'$site_path'/etc`, and per-project -themes are stored in `'$site_path'/themes/{project-name}`. Files are -only served from a single theme directory; if you want to modify or -extend an inherited theme, you must copy it into the appropriate -per-project directory. - -== HTML Header/Footer +The HTML header, footer and CSS may be customized for login +screens (LDAP, OAuth, OpenId) and the internally managed +Gitweb servlet. At startup Gerrit reads the following files (if they exist) and uses them to customize the HTML page it sends to clients: -* `/GerritSiteHeader.html` +* `etc/GerritSiteHeader.html` + HTML is inserted below the menu bar, but above any page content. This is a good location for an organizational logo, or links to other systems like bug tracking. -* `/GerritSiteFooter.html` +* `etc/GerritSiteFooter.html` + HTML is inserted at the bottom of the page, below all other content, but just above the footer rule and the "Powered by Gerrit Code Review (v....)" message shown at the extreme bottom. -* `/GerritSite.css` +* `etc/GerritSite.css` + The CSS rules are inlined into the top of the HTML page, inside of a `