Bug 972890 - Allow styles and scripts to be injected into every community page by an admin
Summary: Allow styles and scripts to be injected into every community page by an admin
Alias: None
Product: OKD
Classification: Red Hat
Component: Website (Show other bugs)
(Show other bugs)
Version: 2.x
Hardware: Unspecified Unspecified
Target Milestone: ---
: ---
Assignee: Clayton Coleman
QA Contact: libra bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2013-06-10 18:25 UTC by Clayton Coleman
Modified: 2015-05-15 01:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-06-24 14:46:57 UTC
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Clayton Coleman 2013-06-10 18:25:56 UTC
There should be an element on every page that can be globally altered to inject styles and scripting before or after the page is rendered.  The "site information" variables are insufficient because they are run through filter_xss_admin which removes styles/script tags.  We should add our own custom variables via one of our modules (redhat_frontpage probably) and allow an admin to set them at any time.

This will allow us to address issues faster during upgrades, or to tweak styles to fix bugs.

Comment 1 Clayton Coleman 2013-06-11 20:26:47 UTC
Fixed in https://github.com/openshift/li/pull/1609

Comment 2 Clayton Coleman 2013-06-11 20:29:21 UTC
This change adds a new block (you will have to create it manually in a devenv based on the latest devdump) that will be shown on every page.

Go to "Blocks -> Add Block", create and save it, verify that it has the ID "8".  Go back and edit again, set input type to raw html, then add HTML to that section.  Save the block, go to the homepage.  The raw html in the block should be displayed in the section at the top of the page.

In addition, this pull request adds support for displaying the <meta description> for search engine support based on the site_mission variable.  To test, go to "Site Information" and set the site mission statement.  The homepage should have a <meta name="description" content="...."> value set based on the mission statement.  Other pages should not have this value.

Comment 3 openshift-github-bot 2013-06-11 23:43:05 UTC
Commit pushed to master at https://github.com/openshift/li

Bug 972890 - Allow homepage to have a meta description (site_mission) and inject content onto every page

Allows us to easily bring css, markup, and javascript into the pgae if necessary.

Comment 4 Yujie Zhang 2013-06-13 09:21:17 UTC
Tested above steps on devenv_3355, the block and meta content can be added to home page successfully,so verify this bug, thanks.

Note You need to log in before you can comment on or make changes to this bug.