Comments (2)
Tried a quick mock up of a solution to this:
- add instancename to branding.yml
- add setting a variable with this in set_locale so it's available everywhere
- set it to "roadmap" if not set otherwise
- in assets/images create sub directories for the custom logos etc
seems to work ok so far
from roadmap.
Ok. I think I got it working with a minimal amount of modification to the underlying codebase. Please review and merge it in if it looks like a good route.
- I did some reading up on Rails' asset pipeline and discovered that anything placed in app/assets will override content in lib/assets. So I moved our current assets to lib/assets. Now, any files that appear in app/assets would be considered overrides to the default files.
- I set the application_controller.rb to check for templates in app/views/branded/ first. This will allow us to customize templates. Keep in mind that the location of the file must match the default one (e.g. to override app/views/layouts/_header.html.erb you would create an app/views/branded/layouts/_header.html.erb)
- I moved the static page content out of the large locale files and placed them into a new locales subdirectory called static_pages. I placed example files into that directory.
- I updated the gitignore file so that branded content in app/assets, app/views/branded and config/locales/static_pages/*.yml will be ignored
To test things out:
- just drop a new logo into app/assets/images/logo.jpg
- create a directory called app/views/branded and add a new projects/index.html.erb to it with 'Hello World' or something.
- Make copies of each of the config/locales/static_pages/ files (change the contents of one if you want to test that)
- Then pull up the site and verify that your new logo is being used and then login to make sure you see the 'Hello World' page
from roadmap.
Related Issues (20)
- Remove "You must answer at least ..." Message When default_percentage_answered is Set to Zero
- Update Handling of `contact_us_url` in `def app_email`
- API v0 wiki documentation update HOT 5
- API v1 wiki documentation issue HOT 5
- Same DB Being Used in Development and Test Environments HOT 1
- 500 Error When Using Language Selector Within Some URL Paths
- Add Terms and Conditions Acceptance Check When Account Is Created Via Invitation Link
- Confusion in feedback_complete email
- Unwanted Scrolling Behaviour Within Organisation Dropdowns
- The Plan Download exports fail to to list questions (unless unanswered box ticked)
- typo? HOT 1
- 4.2.0 CSS issues HOT 4
- Add pdf Format Handling For render_respond_to_format_with_error_message HOT 1
- Template.visibililty Checks Not Always Working as Expected
- TinyMCE Related Console Warnings HOT 4
- Migrate from Rails UJS to Turbo
- Address/Prevent DB Strings With Leading, Trailing, or Multiple Consecutive Spaces
- Error when testing orcid sandbox in dmproadmap 4.0.9
- Some Test Suite Files Missing `_spec.rb` Format and Not Being Executed
- Plan Collaborators With "Read only" Permissions Are Still Able to Add Contributors to a Plan HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from roadmap.