Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 373
- Log:
Initial import of Radiant 0.9.1, which is now packaged as a gem. This is an
import of the tagged 0.9.1 source checked out from GitHub, which isn't quite
the same as the gem distribution - but it doesn't seem to be available in an
archived form and the installed gem already has modifications, so this is
the closest I can get.
- Author:
- rool
- Date:
- Mon Mar 21 13:40:05 +0000 2011
- Size:
- 1911 Bytes
1 | module Admin::NodeHelper |
2 | |
3 | def render_node(page, locals = {}) |
4 | @current_node = page |
5 | locals.reverse_merge!(:level => 0, :simple => false).merge!(:page => page) |
6 | render :partial => 'node', :locals => locals |
7 | end |
8 | |
9 | def show_all? |
10 | @controller.action_name == 'remove' |
11 | end |
12 | |
13 | def expanded_rows |
14 | unless @expanded_rows |
15 | @expanded_rows = case |
16 | when rows = cookies[:expanded_rows] |
17 | rows.split(',').map { |x| Integer(x) rescue nil }.compact |
18 | else |
19 | [] |
20 | end |
21 | |
22 | if homepage and !@expanded_rows.include?(homepage.id) |
23 | @expanded_rows << homepage.id |
24 | end |
25 | end |
26 | @expanded_rows |
27 | end |
28 | |
29 | def expanded |
30 | show_all? || expanded_rows.include?(@current_node.id) |
31 | end |
32 | |
33 | def padding_left(level) |
34 | (level * 23) + 9 |
35 | end |
36 | |
37 | def children_class |
38 | unless @current_node.children.empty? |
39 | if expanded |
40 | " children_visible" |
41 | else |
42 | " children_hidden" |
43 | end |
44 | else |
45 | " no_children" |
46 | end |
47 | end |
48 | |
49 | def virtual_class |
50 | @current_node.virtual? ? " virtual": "" |
51 | end |
52 | |
53 | def expander(level) |
54 | unless @current_node.children.empty? or level == 0 |
55 | image((expanded ? "collapse" : "expand"), |
56 | :class => "expander", :alt => 'toggle children', |
57 | :title => '') |
58 | else |
59 | "" |
60 | end |
61 | end |
62 | |
63 | def icon |
64 | icon_name = @current_node.virtual? ? 'virtual_page' : 'page' |
65 | image(icon_name, :class => "icon", :alt => '', :title => '') |
66 | end |
67 | |
68 | def node_title |
69 | %{<span class="title">#{ h(@current_node.title) }</span>} |
70 | end |
71 | |
72 | def page_type |
73 | display_name = @current_node.class.display_name |
74 | if display_name == 'Page' |
75 | "" |
76 | else |
77 | %{<span class="info">(#{ h(display_name) })</span>} |
78 | end |
79 | end |
80 | |
81 | def spinner |
82 | image('spinner.gif', |
83 | :class => 'busy', :id => "busy_#{@current_node.id}", |
84 | :alt => "", :title => "", |
85 | :style => 'display: none;') |
86 | end |
87 | end |