stable

Clone or download

Read-only

User can decide to hide the project banner

While it's not yet possible to close or open the project banner directly from the web UI, this contribution takes into account that a user might have closed the banner to stop seeing it on every pages of the project. If the project message is updated by a project admin, this choice is lost so the user can see the updated project banner. To test, you can set a project banner via the REST API with the REST endpoint PUT /projects/:project_id/banner and hide the banner for a specific user by setting a user pref with the name project_banner_<project_id> to the value "hidden". Part of story #12264: display a custom banner inside project pages Change-Id: Iddd99af4eb716a63b8fbe5c74b6b28029cc80a25

Modified Files

Name
M src/common/Project/Banner/BannerDao.php +41 −5 Go to diff View file
A src/common/Project/Banner/BannerDisplay.php +65 −0 Go to diff View file
M src/common/Project/Banner/BannerRetriever.php +22 −1 Go to diff View file
M src/common/layout/BaseLayout.php +4 −2 Go to diff View file
M src/www/themes/BurningParrot/BurningParrotTheme.php +1 −1 Go to diff View file
M src/www/themes/BurningParrot/CurrentProjectNavbarInfoPresenter.php +8 −2 Go to diff View file
M src/www/themes/BurningParrot/css/includes/_navbar.scss +13 −0 Go to diff View file
M src/www/themes/BurningParrot/css/includes/_project-banner.scss +4 −0 Go to diff View file
M src/www/themes/BurningParrot/templates/header.mustache +1 −1 Go to diff View file
M src/www/themes/BurningParrot/templates/navbar/current-project-nav.mustache +1 −1 Go to diff View file
M src/www/themes/FlamingParrot/ContainerPresenter.class.php +8 −2 Go to diff View file
M src/www/themes/FlamingParrot/CurrentProjectNavbarInfoPresenter.php +9 −5 Go to diff View file
M src/www/themes/FlamingParrot/FlamingParrot_Theme.class.php +4 −4 Go to diff View file
M src/www/themes/FlamingParrot/css/utils/_navbar.scss +13 −0 Go to diff View file
M src/www/themes/FlamingParrot/css/utils/_project-banner.scss +4 −0 Go to diff View file
M src/www/themes/FlamingParrot/templates/container.mustache +1 −1 Go to diff View file
M src/www/themes/FlamingParrot/templates/navbar.mustache +1 −1 Go to diff View file
A tests/phpunit/common/Project/Banner/BannerDisplayTest.php +46 −0 Go to diff View file
A tests/phpunit/common/Project/Banner/BannerRetrieverTest.php +119 −0 Go to diff View file