Bug 972890 - Allow styles and scripts to be injected into every community page by an admin
Allow styles and scripts to be injected into every community page by an admin
Status: CLOSED CURRENTRELEASE
Product: OpenShift Origin
Classification: Red Hat
Component: Website (Show other bugs)
2.x
Unspecified Unspecified
unspecified Severity medium
: ---
: ---
Assigned To: Clayton Coleman
libra bugs
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 14:25 EDT by Clayton Coleman
Modified: 2015-05-14 21:23 EDT (History)
1 user (show)

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


Attachments (Terms of Use)

  None (edit)
Description Clayton Coleman 2013-06-10 14:25:56 EDT
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 16:26:47 EDT
Fixed in https://github.com/openshift/li/pull/1609
Comment 2 Clayton Coleman 2013-06-11 16:29:21 EDT
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 19:43:05 EDT
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 05:21:17 EDT
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.