Commit 9df326c8dcab6cfa8149eb1d8faebbba25d6f581
1 parent
b706b378
Exists in
master
and in
29 other branches
ActionItem0: Refactoring pluginm
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@165 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
11 changed files
with
34 additions
and
27 deletions
Show diff stats
app/controllers/account_controller.rb
app/controllers/edit_template_controller.rb
... | ... | @@ -2,11 +2,7 @@ class EditTemplateController < ApplicationController |
2 | 2 | |
3 | 3 | uses_flexible_template :edit => true, :owner => 'owner' |
4 | 4 | |
5 | - def flexible_template_owner | |
6 | - Profile.find(1) | |
7 | - end | |
8 | - | |
9 | - def flexible_template_dict(str) | |
5 | + def flexible_template_block_dict(str) | |
10 | 6 | { |
11 | 7 | 'MainBlock' => _("Main Block"), |
12 | 8 | 'ListBlock' => _("List Block"), |
... | ... | @@ -14,5 +10,4 @@ class EditTemplateController < ApplicationController |
14 | 10 | }[str] || str |
15 | 11 | end |
16 | 12 | |
17 | - | |
18 | 13 | end | ... | ... |
app/helpers/edit_template_helper.rb
1 | 1 | # Methods added to this helper will be available to all templates in the application. |
2 | 2 | module EditTemplateHelper |
3 | + def flexible_template_block_dict(str) | |
4 | + { | |
5 | + 'MainBlock' => _("Main Block"), | |
6 | + 'ListBlock' => _("List Block"), | |
7 | + 'LinkBlock' => _("Link Block") | |
8 | + }[str] || str | |
9 | + end | |
3 | 10 | |
4 | 11 | end | ... | ... |
app/views/edit_template/index.rhtml
1 | -<%= link_to _('Show Layout'), :controller => 'home' %> | |
2 | -<%= link_to _('Edit Layout'), :controller => 'edit_template' %> | |
1 | +mxendo o contedudo para ver como fica a parada toda | |
2 | +mxendo o contedudo para ver como fica a parada toda | |
3 | +mxendo o contedudo para ver como fica a parada toda | |
4 | +mxendo o contedudo para ver como fica a parada toda | |
5 | +mxendo o contedudo para ver como fica a parada toda | |
6 | +mxendo o contedudo para ver como fica a parada toda | |
7 | +mxendo o contedudo para ver como fica a parada toda | |
8 | +mxendo o contedudo para ver como fica a parada toda | |
9 | +mxendo o contedudo para ver como fica a parada toda | |
10 | +mxendo o contedudo para ver como fica a parada toda | |
11 | +mxendo o contedudo para ver como fica a parada toda | |
12 | +mxendo o contedudo para ver como fica a parada toda | |
13 | +mxendo o contedudo para ver como fica a parada toda | |
3 | 14 | |
4 | -<%= select_template %> | |
5 | -<%= select_theme %> | |
6 | -<%= select_icons_theme %> | |
7 | -<%= display_icon('back')%> | ... | ... |
app/views/layouts/application.rhtml
1 | 1 | <html> |
2 | 2 | <head> |
3 | 3 | <%= javascript_include_tag :defaults %> |
4 | - <%= javascript_include_tag_template %> | |
5 | - <%= stylesheet_link_tag_template %> | |
6 | - <%= stylesheet_link_tag_theme %> | |
4 | + <%= javascript_include_tag_for_template %> | |
5 | + <%= stylesheet_link_tag_for_template %> | |
6 | + <%= stylesheet_link_tag_for_theme %> | |
7 | 7 | |
8 | 8 | </head> |
9 | 9 | |
... | ... | @@ -26,13 +26,13 @@ |
26 | 26 | <div id='notice'> |
27 | 27 | <%= flash[:notice] %> |
28 | 28 | </div> |
29 | - | |
30 | 29 | <a name='main_content'/> |
31 | 30 | <%= display_boxes(yield) %> |
32 | 31 | |
33 | 32 | <div id="footer"> |
34 | 33 | <a name='footer'/> |
35 | 34 | <%= footer %> |
35 | + <%= display_icon('back')%> | |
36 | 36 | </div> |
37 | 37 | </div> |
38 | 38 | </div> | ... | ... |
db/migrate/002_create_profiles.rb
... | ... | @@ -7,7 +7,7 @@ class CreateProfiles < ActiveRecord::Migration |
7 | 7 | t.column :user_id, :integer |
8 | 8 | t.column :template, :string, :default => "default" |
9 | 9 | t.column :theme, :string, :default => "default" |
10 | - t.column :icons_theme, :string, :default => "default" | |
10 | + t.column :icon_theme, :string, :default => "default" | |
11 | 11 | end |
12 | 12 | end |
13 | 13 | ... | ... |
lib/extended_tag.rb
public/templates/default/stylesheets/style.css
public/themes/default/default.css
public/themes/pink/pink.css
test/fixtures/profiles.yml
... | ... | @@ -6,7 +6,7 @@ johndoe: |
6 | 6 | virtual_community_id: 1 |
7 | 7 | user_id: 1 |
8 | 8 | template: 'default' |
9 | - icons_theme: 'default' | |
9 | + icon_theme: 'default' | |
10 | 10 | theme: 'default' |
11 | 11 | joerandomhacker: |
12 | 12 | id: 2 |
... | ... | @@ -15,7 +15,7 @@ joerandomhacker: |
15 | 15 | virtual_community_id: 1 |
16 | 16 | user_id: 2 |
17 | 17 | template: 'simple' |
18 | - icons_theme: 'simple' | |
18 | + icon_theme: 'simple' | |
19 | 19 | theme: 'simple' |
20 | 20 | john_and_joe: |
21 | 21 | id: 3 |
... | ... | @@ -23,7 +23,7 @@ john_and_joe: |
23 | 23 | identifier: john_and_joe |
24 | 24 | virtual_community_id: 1 |
25 | 25 | template: 'simple' |
26 | - icons_theme: 'simple' | |
26 | + icon_theme: 'simple' | |
27 | 27 | theme: 'simple' |
28 | 28 | ze: |
29 | 29 | id: 4 |
... | ... | @@ -31,5 +31,5 @@ ze: |
31 | 31 | identifier: ze |
32 | 32 | virtual_community_id: 1 |
33 | 33 | template: 'default' |
34 | - icons_theme: 'default' | |
34 | + icon_theme: 'default' | |
35 | 35 | theme: 'default' | ... | ... |