Changesets can be listed by changeset number.
The Git repository is here.
- Revision:
- 15
- Log:
Attempt to update Typo to a Typo SVN HEAD release from around the
time the prototype installation was set up on the RISC OS Open Limited
web site. Timestamps place this at 04-Jul so a revision from 05-Jul or
earlier was pulled and copied over the 2.6.0 tarball stable code.
- Author:
- adh
- Date:
- Sat Jul 22 23:27:35 +0100 2006
- Size:
- 3133 Bytes
1 | module Admin::BaseHelper |
2 | |
3 | def render_flash |
4 | output = [] |
5 | |
6 | for key,value in flash |
7 | output << "<span class=\"#{key.to_s.downcase}\">#{value}</span>" |
8 | end if flash |
9 | |
10 | output.join("<br/>\n") |
11 | end |
12 | |
13 | def render_tasks |
14 | output = [] |
15 | |
16 | for key,value in @tasks |
17 | output << "<a href=\"#{value}\">#{key}</a>" |
18 | end if @tasks |
19 | |
20 | output.join("<br/>\n") |
21 | end |
22 | |
23 | def current_user_notice |
24 | unless session[:user] |
25 | link_to "log in", :controller => "/accounts", :action=>"login" |
26 | else |
27 | link_to "log out", :controller => "/accounts", :action=>"logout" |
28 | end |
29 | end |
30 | |
31 | def tab(label, options = {}) |
32 | if controller.controller_name =~ /#{options[:controller].split('/').last}/ |
33 | content_tag :li, link_to(label, options, {"class"=> "active"}), {"class"=> "active"} |
34 | else |
35 | content_tag :li, link_to(label, options) |
36 | end |
37 | end |
38 | |
39 | def cancel(url = {:action => 'list'}) |
40 | link_to "Cancel", url |
41 | end |
42 | |
43 | def save(val = "Store") |
44 | '<input type="submit" value="' + val + '" class="primary" />' |
45 | end |
46 | |
47 | def confirm_delete(val = "Delete") |
48 | '<input type="submit" value="' + val + '" />' |
49 | end |
50 | |
51 | def link_to_show(record) |
52 | link_to image_tag('go'), :action => 'show', :id => record.id |
53 | end |
54 | |
55 | def link_to_edit(record) |
56 | link_to image_tag('go'), :action => 'edit', :id => record.id |
57 | end |
58 | |
59 | def link_to_destroy(record) |
60 | link_to image_tag('delete'), :action => 'destroy', :id => record.id |
61 | end |
62 | |
63 | def text_filter_options |
64 | TextFilter.find(:all).collect do |filter| |
65 | [ filter.description, filter ] |
66 | end |
67 | end |
68 | |
69 | def alternate_class |
70 | @class = @class != '' ? '' : 'class="shade"' |
71 | end |
72 | |
73 | def reset_alternation |
74 | @class = nil |
75 | end |
76 | |
77 | def task_quickpost(title) |
78 | content_tag :li, link_to_function(title, toggle_effect('quick-post', 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4")) |
79 | end |
80 | |
81 | def task_quicknav(title) |
82 | content_tag :li, link_to_function(title, toggle_effect('quick-navigate', 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4")) |
83 | end |
84 | |
85 | def task_overview |
86 | task('Back to overview', 'list') |
87 | end |
88 | |
89 | def task_new(title) |
90 | task(title, 'new') |
91 | end |
92 | |
93 | def task_destroy(title, id) |
94 | task(title, 'destroy', id) |
95 | end |
96 | |
97 | def task_edit(title, id) |
98 | task(title, 'edit', id) |
99 | end |
100 | |
101 | def task_show(title, id) |
102 | task(title, 'show', id) |
103 | end |
104 | |
105 | def task_help(title, id) |
106 | task(title, 'show_help', id) |
107 | end |
108 | |
109 | def task(title, action, id = nil) |
110 | content_tag :li, link_to(title, :action => action, :id => id) |
111 | end |
112 | |
113 | def task_add_resource_metadata(title,id) |
114 | link_to_function(title, toggle_effect('add-resource-metadata-' + id.to_s, 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4")) |
115 | end |
116 | |
117 | def task_edit_resource_metadata(title,id) |
118 | link_to_function(title, toggle_effect('edit-resource-metadata-' + id.to_s, 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4")) |
119 | end |
120 | |
121 | def task_edit_resource_mime(title,id) |
122 | link_to_function(title, toggle_effect('edit-resource-mime-' + id.to_s, 'Effect.BlindUp', "duration:0.4", "Effect.BlindDown", "duration:0.4")) |
123 | end |
124 | end |