From b08cd44c8107555c25be73fce9e99470c7731e67 Mon Sep 17 00:00:00 2001 From: AurelioAHeckert Date: Thu, 1 May 2008 21:29:05 +0000 Subject: [PATCH] ActionItem360: Layout Zen3 50% --- app/helpers/application_helper.rb | 35 ++++++++++++++++++++++++++++++++--- app/helpers/assets_helper.rb | 6 +++++- app/views/layouts/application.rhtml | 13 ++++++++----- public/artwork/screens/layout-Zen3.svg | 1922 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/themes/zen3/images/bg-down.png | Bin 0 -> 283 bytes public/designs/themes/zen3/images/bg-footer.png | Bin 0 -> 309 bytes public/designs/themes/zen3/images/bg-top.png | Bin 0 -> 323 bytes public/designs/themes/zen3/images/helper-exclamation.gif | Bin 0 -> 1698 bytes public/designs/themes/zen3/images/helper-question.gif | Bin 0 -> 1729 bytes public/designs/themes/zen3/images/logo-bg.gif | Bin 0 -> 24494 bytes public/designs/themes/zen3/images/menu-bg.png | Bin 0 -> 232 bytes public/designs/themes/zen3/images/menu-logo.png | Bin 0 -> 4633 bytes public/designs/themes/zen3/images/search-light.gif | Bin 0 -> 139 bytes public/designs/themes/zen3/images/search.gif | Bin 0 -> 139 bytes public/designs/themes/zen3/stylesheets/common.css | 15 +++++++++++++++ public/designs/themes/zen3/stylesheets/help.css | 22 ++++++++++++++++++++++ public/designs/themes/zen3/stylesheets/menu.css | 149 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ public/designs/themes/zen3/theme.yml | 3 ++- public/javascripts/auto-open-menu.js | 6 +++++- public/javascripts/default-config.js | 7 +++++++ public/javascripts/menu.js | 3 ++- public/javascripts/noosfero-show-help.js | 4 ++-- public/stylesheets/help.css | 2 +- 23 files changed, 2172 insertions(+), 15 deletions(-) create mode 100644 public/artwork/screens/layout-Zen3.svg create mode 100644 public/designs/themes/zen3/images/bg-down.png create mode 100644 public/designs/themes/zen3/images/bg-footer.png create mode 100644 public/designs/themes/zen3/images/bg-top.png create mode 100644 public/designs/themes/zen3/images/helper-exclamation.gif create mode 100644 public/designs/themes/zen3/images/helper-question.gif create mode 100644 public/designs/themes/zen3/images/logo-bg.gif create mode 100644 public/designs/themes/zen3/images/menu-bg.png create mode 100644 public/designs/themes/zen3/images/menu-logo.png create mode 100644 public/designs/themes/zen3/images/search-light.gif create mode 100644 public/designs/themes/zen3/images/search.gif create mode 100644 public/designs/themes/zen3/stylesheets/common.css create mode 100644 public/designs/themes/zen3/stylesheets/help.css create mode 100644 public/designs/themes/zen3/stylesheets/menu.css create mode 100644 public/javascripts/default-config.js diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 0c6f1fc..b33fc85 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -493,14 +493,43 @@ module ApplicationHelper content_tag('div', result) end - def theme_javascript() + def theme_option( opt=nil ) conf = RAILS_ROOT.to_s() + '/public/designs/themes/' + current_theme.to_s() + '/theme.yml' - js = File.exists?(conf) ? YAML.load_file(conf)['js'] : [] + if File.exists?(conf) + opt ? YAML.load_file(conf)[opt.to_s()] : YAML.load_file(conf) + else + nil + end + end + + def theme_opt_menu_search + opt = theme_option( :menu_search ) + if opt == 'none' + "" + elsif opt == 'simple_search' + s = _('Search...') + '' + else #opt == 'lightbox_link' is default + lightbox_link_to ''+ _('Search'), { + :controller => 'search', + :action => 'popup', + :category_path => (@category ? @category.explode_path : []) }, + :id => 'open_search' + end + end + + def theme_javascript html = [] - js.each do |file| + theme_option(:js).each do |file| file = '/designs/themes/'+ current_theme.to_s() + '/javascript/'+ file +'.js' if File.exists? RAILS_ROOT.to_s() +'/public'+ file diff --git a/app/helpers/assets_helper.rb b/app/helpers/assets_helper.rb index 7534c51..2257cb2 100644 --- a/app/helpers/assets_helper.rb +++ b/app/helpers/assets_helper.rb @@ -12,7 +12,11 @@ module AssetsHelper [ options.merge(:asset => 'comments'), "icon-menu-comments", _('Comments') ], ].map do |target,css_class,name| - content_tag('li', link_to(content_tag('span', '', :class => css_class) + name, target)) + content_tag('li', + link_to( + content_tag('span', '', :class => css_class) + + content_tag('strong', name), + target )) end.join("\n") end diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index 66113c7..feac27c 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -78,6 +78,9 @@
+
+
+
BETA
@@ -97,13 +100,10 @@
<%= render :file => 'shared/user_menu' %> - <%= - lightbox_link_to ''+ _('Search'), - { :controller => 'search', :action => 'popup', :category_path => (@category ? @category.explode_path : []) }, :id => 'open_search' - %> + <%= theme_opt_menu_search %>
- <%= _('Help') %> @@ -132,6 +132,9 @@
+
+
+