Editable Templates - Loader & template components
Review Request #2186 — Created March 4, 2011 and discarded
Extension template loader implemented. admin/dashboard.html broken into: - admin/dashboard.html - admin/dashboard/dashboard_manage.html - admin/dashboard/dashboard_news.html - admin/dashboard/dashboard_server_info.html for easier extension.
Manual: - created a dashboard_extension.html with no {% extends ...%} -> correctly loads the blank page in place of the dashboard - created a dashboard_extension.html with {% extends ...%} -> correctly extends the original dashboard - created a dashboard_manage_extension.html with no {% extends ...%} (both with and without the dashboard_extension.html) correctly displays all of the dashboard excluding the dashboard_manage.html - created a dashboard_manage_extension.html with {% extends ...%} (both with and without the dashboard_extension.html) correctly displays the original dashboard with the manage extension
TC
- Change Summary:
-
Continuing to break templates into more easily extendable components as well as testing the extension functionality. Templates broken down: - admin/dashboard.html - admin/database.html - admin/index.html - admin/base_site.html - base.html - accounts/prefs.html - accounts/register.html
- Diff:
-
Revision 2 (+393 -217)
TC
- Change Summary:
-
- updated the diff to include all of the templates/admin/ changes that were made
- Diff:
-
Revision 3 (+411 -243)
TC
- Change Summary:
-
Added in documentation on how to extend a template along with a simple example
- Diff:
-
Revision 4 (+450 -243)
-
-
Make sure all the trailing whitespace is removed. Also, it doesn't look like this file will actually parse properly when generating the docs. Please install Python Sphinx and generate the docs with "make html" (in the docs/manual directory). You'll get warnings/errors for anything that's wrong. You should also be able to find the resulting HTML files and view them in a browser.
-
-
-
-
Alignment problem. First line should only be one line long. I'd make it a very brief summary, and go into more detail on subsequent lines.
-
-
I still don't think we need to mangle the names here. If done right, a file can just be called "foo.html" and won't need to be "foo_extended.html." The "reviewboard/" prefix trick should be sufficient.
-
Every one of these new files should have the new content in a block. That way, templates can subclass these and override or augment the content.
-
-
-
-
-
-
-
-
-
TC
- Change Summary:
-
Went through the review and made the requested changes to templates and the template loader.
- Diff:
-
Revision 5 (+652 -295)
TC
- Diff:
-
Revision 6 (+655 -295)
TC
- Change Summary:
-
Updated the template-extension documentation to include nice formatting.
- Diff:
-
Revision 7 (+660 -295)
TC
- Change Summary:
-
Changed the base_banner.html to include two blocks (one for the banner image, the other for the title).
- Diff:
-
Revision 8 (+666 -296)
-
Just one code comment.
-
Combine these into one big docstring, like this: """ Template loader that loads extended templates. If a template is specified as "original.html", this loader will look first for "original_extended.html" """
-
Can you go through each changed template and make sure that without any extensions, the pages look the same as they did before this change?
TC
- Change Summary:
-
Updated the template loader comments to the desired format.
- Diff:
-
Revision 9 (+668 -296)