Commit f8de6d1b315f64e99988e3c4cffb6bea6fadca61
1 parent
2b429040
Exists in
master
and in
28 other branches
Changing screen to edit templates
(ActionItem2378)
Showing
2 changed files
with
39 additions
and
9 deletions
Show diff stats
app/views/templates/index.html.erb
| 1 | 1 | <h1><%= _('Edit Templates') %></h1> |
| 2 | 2 | |
| 3 | +<%= _('Manage the templates used on creation of profiles') %> | |
| 4 | + | |
| 3 | 5 | <% list_of_templates = [[_('Person') , Person.templates , 'person' ], |
| 4 | 6 | [_('Community') , Community.templates , 'community' ], |
| 5 | 7 | [_('Enterprise'), Enterprise.templates, 'enterprise']] %> |
| 6 | 8 | |
| 7 | -<ul> | |
| 8 | - <% list_of_templates.each do |title, templates, kind|%> | |
| 9 | - <li><%= title %></li> | |
| 9 | +<% list_of_templates.each do |title, templates, kind|%> | |
| 10 | + <div class='template-kind'> | |
| 11 | + <h2><%= title %></h2> | |
| 12 | + <%= button :add, _('New...'), {:action => "create_#{kind}_template"}, :title => _("Create a new template for %s") % title.downcase %> | |
| 10 | 13 | <ul> |
| 11 | 14 | <% templates.each do |template| %> |
| 12 | - <li><%= link_to(template.name, {:controller => 'profile_editor', :profile => template.identifier}) %></li> | |
| 15 | + <li> | |
| 16 | + <%= image_tag "icons-app/#{kind}-icon.png" %> | |
| 17 | + <%= link_to(template.name, {:controller => 'profile_editor', :profile => template.identifier}, :title => _('Edit template "%s"') % template.name ) %> | |
| 18 | + </li> | |
| 13 | 19 | <% end %> |
| 14 | - <li><strong> | |
| 15 | - <%= link_to(_('New...'), {:action => "create_#{kind}_template"}) %> | |
| 16 | - </strong></li> | |
| 17 | 20 | </ul> |
| 18 | - <% end %> | |
| 19 | -</ul> | |
| 21 | + </div> | |
| 22 | +<% end %> | |
| 23 | + | |
| 24 | +<% button_bar do %> | |
| 25 | + <%= button :back, _('Back to admin panel'), :controller => 'admin_panel' %> | |
| 26 | +<% end %> | ... | ... |
public/stylesheets/application.css
| ... | ... | @@ -5928,6 +5928,29 @@ h1#agenda-title { |
| 5928 | 5928 | font-size: 20px; |
| 5929 | 5929 | } |
| 5930 | 5930 | |
| 5931 | +/* Templates */ | |
| 5932 | + | |
| 5933 | +.controller-templates .template-kind { | |
| 5934 | + border-bottom: 1px solid #CCC; | |
| 5935 | +} | |
| 5936 | + | |
| 5937 | +.controller-templates .template-kind ul { | |
| 5938 | + padding-left: 5px; | |
| 5939 | +} | |
| 5940 | + | |
| 5941 | +.controller-templates .template-kind li { | |
| 5942 | + list-style: none; | |
| 5943 | + padding: 3px; | |
| 5944 | +} | |
| 5945 | + | |
| 5946 | +.controller-templates .template-kind li:hover { | |
| 5947 | + background-color: #f0f0f0; | |
| 5948 | +} | |
| 5949 | + | |
| 5950 | +.controller-templates .template-kind li a { | |
| 5951 | + font-size: 13px; | |
| 5952 | +} | |
| 5953 | + | |
| 5931 | 5954 | /* }}} */ |
| 5932 | 5955 | |
| 5933 | 5956 | #alt-beautify { | ... | ... |