Proposal: Template Editor Enhancements
Status |
Proposed for 4.0 |
Target Release |
4.0 |
Original Authors |
DaveJohnson |
Abstract
This is a proposal to make some minor usability and functionality improvements to the UI of the Template Editor pages. The functionality improvements allow a user to set the content-type and language for a page, with together make it possible to take advantage of the Roller rendering system's pluggable renderers.
Requirements
Templates page
- Remove Navbar, Hidden page and Edit columns
- Add Content-Type column where removed columns were
- Add icon to column one and make page name link to edit page
- Show hidden pages in italics and with different icon
Template Editor page
- Add proper subtitle and tip like all other page
- Create advanced settings area for things most users don't use.
- Provide up/down expand/contract buttons for template text area on Template Editor page.
- Provide link to page generated by template
- Provide feed-back to show users what the page URL will look like
- Provide content-type field for each page template.
- Text field and combo-box with options:
- Page (text/html)
- CSS (text/style)
- JavaScript (text/script)
- Custom... (launches pop-up allows entering custom content-type).
- Text field and combo-box with options:
- Provide language field for each page template.
- Combo-box with options:
- Velocity
- (list of others specified in startup configuration).
- Combo-box with options:
All template pages:
- Switch out Struts logic tags for JSTL
- Use page model approach like other pages
Issues
None.
Design
List and describe new manager methods, Struts actions, JSP pages, macros, etc.
Database changes
- New table column webpage.outputtype which specifies MIME content-type that is generated by the template. If this is null or an empty-string then rendering system will assume text/html.
New Configuration properties
- Startup-configuration: new property rendering.templateLanguages, which lists the languages to be allowed in the Edit-Templates page.
Struts JSP and Action changes
- edit-page.jsp: Changes to meed requirements above. See screen-shots below.
- edit-pages.jsp: Changes to meet requiremets above. See screen-shots below.
- WeblogTemplateFormAction.java: Changes to meet requirements above.
Rendering system changes
- PageServlet.java: Use content-type specified by page, guess based on file extension of templates link or default to "text/html"
Edit-Pages screen-shot
NOTES:
- Name link leads to edit page, different icon used for hidden pages
- Link link opens page in pop-up window (i.e. target="_blank")
- In remove column: hover-over for lock is "Required", hover-over for remove is "Remove"
Edit-Page screen-shot
NOTES:
- If page is required we mention that in the help tip
- Link is reflected in URL and updated as user types
- If link is un-changed, then "launch" will launch it in a pop-up window
- Note up/down buttons at bottom right of text-area
- Advanced Settings is a "toggle-control" like those on Weblog-Edit page
- Content type combo-box has "Custom..." option to allow additional types
Comments
Other can leave comments here.