Bug 972890

Summary: Allow styles and scripts to be injected into every community page by an admin
Product: OKD Reporter: Clayton Coleman <ccoleman>
Component: WebsiteAssignee: Clayton Coleman <ccoleman>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 2.xCC: yujzhang
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-06-24 14:46:57 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

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

https://github.com/openshift/li/commit/027a03b4983f9452dc7d3824c050b8b58e6ffdae
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.