Commit b3806ad264168246ec1ccfaf80723371e6669f79

Authored by Rodrigo Souto
1 parent 2f737f2c

Adding name config for templates

app/models/layout_template.rb
... ... @@ -15,6 +15,10 @@ class LayoutTemplate
15 15 @id = id
16 16 end
17 17  
  18 + def name
  19 + @config['name']
  20 + end
  21 +
18 22 def title
19 23 @config['title']
20 24 end
... ...
app/views/themes/index.rhtml
... ... @@ -12,7 +12,7 @@
12 12 "/designs/templates/#{template.id}/thumbnail.png",
13 13 :alt => _('The "%s" template')) +
14 14 '<div class="opt-info">'.html_safe +
15   - content_tag('strong', template.id, :class => 'name') +
  15 + content_tag('strong', template.name, :class => 'name') +
16 16 ' <br/> '.html_safe
17 17  
18 18 if @current_template == template.id # selected
... ...
public/designs/templates/2leftbars/config.yml
  1 +name: "2 Left Bars"
1 2 title: "2 sidebars at left of content"
2 3 description: "A template with 2 sidebars at left of content"
3 4 number_of_boxes: 3
... ...
public/designs/templates/default/config.yml
  1 +name: "Default"
1 2 title: "Default Style 3 columns"
2 3 description: "A theme default with 3 columns"
3 4 number_of_boxes: 3
... ...
public/designs/templates/leftbar/config.yml
  1 +name: "Left Bar"
1 2 title: "Left bar"
2 3 description: "A template with the menu bar at the left"
3 4 number_of_boxes: 2
... ...
public/designs/templates/rightbar/config.yml
  1 +name: "Right Bar"
1 2 title: "Right bar"
2 3 description: "A template with the menu bar at the right"
3 4 number_of_boxes: 2
... ...