Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 193
- Log:
First stage commit of Typo 4.1, modified for the ROOL site.
Includes all local modifications but a final pass needs to be
made to delete any files left over from earlier Typo versions
that shouldn't be here anymore. See the 'tags' section of the
repository for a clean Typo 4.1 tree.Note that symlinks to shared files in the RISC OS Open theme
directory have been deliberately included this time around; I
decided that on balance it was better to leave them in as
placeholders, since unlike symlinks in app/views/shared, the
Typo theme structure is not a standard Rails concept.
- Author:
- rool
- Date:
- Wed Apr 04 18:51:02 +0100 2007
- Size:
- 1084 Bytes
1 | module SidebarHelper |
2 | def render_sidebars |
3 | this_blog.sidebars.inject('') do |acc, sb| |
4 | @sidebar = sb |
5 | sb.parse_request(contents, params) |
6 | controller.response.lifetime = sb.lifetime if sb.lifetime |
7 | acc + render_sidebar(sb) |
8 | end |
9 | end |
10 | |
11 | def render_sidebar(sidebar) |
12 | if sidebar.view_root |
13 | # Allow themes to override sidebar views |
14 | view_root = File.expand_path(sidebar.view_root) |
15 | rails_root = File.expand_path(RAILS_ROOT) |
16 | if view_root =~ /^#{Regexp.escape(rails_root)}/ |
17 | new_root = view_root[rails_root.size..-1] |
18 | new_root.sub! %r{^/?vendor/}, "" |
19 | new_root.sub! %r{/views}, "" |
20 | new_root = File.join(this_blog.current_theme.path, "views", new_root) |
21 | view_root = new_root if File.exists?(File.join(new_root, "content.rhtml")) |
22 | end |
23 | render_to_string(:file => "#{view_root}/content.rhtml", |
24 | :locals => sidebar.to_locals_hash) |
25 | else |
26 | render_to_string(:partial => sidebar.content_partial, |
27 | :locals => sidebar.to_locals_hash) |
28 | end |
29 | end |
30 | |
31 | end |