index.rhtml
2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<h1><%= _('Editing Appearance') %></h1>
<table style='margin:auto'>
<tr>
<td colspan='6'>
<h2><%= _('Select template') %></h2>
</td>
</tr>
<% for templates in @layout_templates.in_groups_of(3) %>
<tr>
<% for template in templates %>
<%
selected = (!template.nil? && (@current_template == template.id))
%>
<td>
<% if template %>
<%= image_tag("/designs/templates/#{template.id}/thumbnail.png", :alt => _('The "%s" template')) %>
<% end %>
</td>
<td <%= 'class="selected template"' if selected %>>
<% if template %>
<strong><%= template.id %> <%= _('(current)') if selected %></strong>
<br/>
<%= link_to(_('Use this template'), :action => 'set_layout_template', :id => template.id) unless selected %>
<% end %>
</td>
<td>
</td>
<% end %>
</tr>
<% end %>
<tr>
<td colspan='6'>
<h2><%= _('Select theme') %></h2>
</td>
</tr>
<% for themes in @themes.in_groups_of(3) %>
<tr>
<% for theme in themes %>
<%
selected = (!theme.nil? && (theme.id == @current_theme))
%>
<td>
<%# FIXME add proper thumbnails %>
<% if theme %>
<%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) %>
<% end %>
</td>
<td <%= 'class="selected theme"' if selected %>>
<% if theme %>
<strong><%= theme.name %> <%= _('(current)') if selected %></strong><br/>
<%= link_to(_('Use this theme'), :action => 'set', :id => theme.id) unless selected %>
<% end %>
</td>
<td>
</td>
<% end %>
</tr>
<tr><td colspan='3'> </td></tr>
<% end %>
<tr>
<td colspan='6'>
<h2><%= _('My themes') %></h2>
</td>
</tr>
<% for themes in profile.themes.in_groups_of(3) %>
<tr>
<% for theme in themes %>
<td>
<%# FIXME add proper thumbnails %>
<%= image_tag('/images/icons-app/design-editor.png', :alt => (_('The "%s" theme.') % theme.name)) if theme %>
</td>
<td>
<strong><%= theme.name if theme%></strong><br/>
<%= link_to(_('Edit this theme'), :action => 'edit', :id => theme.id) if theme %>
<br/>
<%= link_to(_('Test this theme'), :action => 'start_test', :id => theme.id) if theme %>
</td>
<td>
</td>
<% end %>
</tr>
<tr><td colspan='3'> </td></tr>
<% end %>
</table>
<% button_bar do %>
<%= lightbox_button(:add, _('New theme ...'), :action => 'new') %>
<%= button(:back, _('Back'), :controller => 'profile_editor', :action => 'index') %>
<% end %>