From 393fd2da0fb7b3185b936b99770155bc3402dab6 Mon Sep 17 00:00:00 2001
From: Antonio Terceiro
Date: Wed, 20 May 2009 15:50:12 -0300
Subject: [PATCH] ActionItem1047: better default formatting for CMS
---
app/helpers/application_helper.rb | 2 +-
app/views/box_organizer/_link_list_block.rhtml | 2 --
app/views/features/_features_table.rhtml | 21 ---------------------
app/views/features/_manage_community_fields.rhtml | 1 +
app/views/features/_manage_enterprise_fields.rhtml | 1 +
app/views/features/_manage_person_fields.rhtml | 1 +
app/views/features/index.rhtml | 47 ++++++++++++++++++++++++++++++++++++++++++++---
app/views/manage_products/index.rhtml | 23 ++++++++++++++++++-----
app/views/profile_editor/edit.rhtml | 11 ++++++-----
app/views/profile_members/index.rhtml | 8 +++++---
app/views/search/events.rhtml | 2 +-
app/views/themes/index.rhtml | 2 +-
po/pt_BR/noosfero.po | 4 ++--
public/stylesheets/common.css | 20 +++++++++++++++-----
public/stylesheets/controller_themes.css | 4 ----
15 files changed, 96 insertions(+), 53 deletions(-)
diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb
index 640cfa1..1754b20 100644
--- a/app/helpers/application_helper.rb
+++ b/app/helpers/application_helper.rb
@@ -217,7 +217,7 @@ module ApplicationHelper
if html_options.has_key?(:class)
the_class << ' ' << html_options[:class]
end
- link_to(content_tag('span', label), url, html_options.merge(:class => the_class ))
+ link_to(content_tag('span', label), url, html_options.merge(:class => the_class, :title => label))
end
def button_to_function(type, label, js_code, html_options = {}, &block)
diff --git a/app/views/box_organizer/_link_list_block.rhtml b/app/views/box_organizer/_link_list_block.rhtml
index de8f62c..0c1187b 100644
--- a/app/views/box_organizer/_link_list_block.rhtml
+++ b/app/views/box_organizer/_link_list_block.rhtml
@@ -1,4 +1,3 @@
-
<%= _('Links') %>
@@ -11,7 +10,6 @@
<% end %>
-
<%= link_to_function(_('New link'), nil, :class => 'button icon-add with-text') do |page|
page.insert_html :bottom, 'links', content_tag('tr', content_tag('td',text_field_tag('block[links][][name]')) + content_tag('td',text_field_tag('block[links][][address]', nil, :class => 'cel-address'))) +
diff --git a/app/views/features/_features_table.rhtml b/app/views/features/_features_table.rhtml
index 58a72eb..e69de29 100644
--- a/app/views/features/_features_table.rhtml
+++ b/app/views/features/_features_table.rhtml
@@ -1,21 +0,0 @@
-<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>
-
-
- <%= hidden_field_tag('environment[enabled_features][]', '') %>
- <% @features.each do |feature, text| %>
-
- <%= text %>
- <%= check_box_tag "environment[enabled_features][]", feature, @environment.enabled?(feature) %>
-
- <% end %>
-
-
-<%= labelled_form_field(_('Organization Approval Method'), select_organization_approval_method('environment', 'organization_approval_method')) %>
-
-
- <% button_bar do %>
- <%= submit_button('save', _('Save changes')) %>
- <% end %>
-
-
-<% end %>
diff --git a/app/views/features/_manage_community_fields.rhtml b/app/views/features/_manage_community_fields.rhtml
index 57b3aed..6eac4d7 100644
--- a/app/views/features/_manage_community_fields.rhtml
+++ b/app/views/features/_manage_community_fields.rhtml
@@ -36,6 +36,7 @@
<% button_bar do %>
<%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/features/_manage_enterprise_fields.rhtml b/app/views/features/_manage_enterprise_fields.rhtml
index 5a6869f..ea4435a 100644
--- a/app/views/features/_manage_enterprise_fields.rhtml
+++ b/app/views/features/_manage_enterprise_fields.rhtml
@@ -36,6 +36,7 @@
<% button_bar do %>
<%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/features/_manage_person_fields.rhtml b/app/views/features/_manage_person_fields.rhtml
index 8b1f1d7..272670d 100644
--- a/app/views/features/_manage_person_fields.rhtml
+++ b/app/views/features/_manage_person_fields.rhtml
@@ -42,6 +42,7 @@
<% button_bar do %>
<%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
<% end %>
diff --git a/app/views/features/index.rhtml b/app/views/features/index.rhtml
index b583d9f..f15b06e 100644
--- a/app/views/features/index.rhtml
+++ b/app/views/features/index.rhtml
@@ -1,7 +1,48 @@
+<%= _('System features') %>
+
<%= _('Enable/Disable features') %>
-<%= render :partial => 'features_table' %>
+
+<%= _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.
+
+Check all the features you want to enable for your environment, uncheck all the ones you don\'t want, and use the "Save changes" button to confirm your changes.') %>
+
+
+<% labelled_form_for(:environment, @environment, :url => {:action => 'update'}) do |f| %>
+
+
+
+ <%= _('Feature') %>
+ <%= _('Enabled?') %>
+
+ <%= hidden_field_tag('environment[enabled_features][]', '') %>
+ <% @features.each do |feature, text| %>
+
+ <%= text %>
+ <%= check_box_tag "environment[enabled_features][]", feature, @environment.enabled?(feature) %>
+
+ <% end %>
+
+
+<%= _('Configure features') %>
+
+
+
+ <%= _('Option') %>
+ <%= _('Choice') %>
+
+
+ <%= _('Organization Approval Method') %>
+ <%= select_organization_approval_method('environment', 'organization_approval_method') %>
+
+
+
-<%= help_textile _('Here you can enable or disable several features of your environment. Each feature represents some funcionality that your environment can use if you enable it.
+
+ <% button_bar do %>
+ <%= submit_button('save', _('Save changes')) %>
+ <%= button :back, _('Back to admin panel'), :controller => 'admin_panel', :action => 'index' %>
+ <% end %>
+
-Check all the features you want to enable for your environment, uncheck all the ones you don\'t want, and use the *"Save changes" button* to confirm your changes.'), _('Help'), :class => 'with-text' %>
+<% end %>
diff --git a/app/views/manage_products/index.rhtml b/app/views/manage_products/index.rhtml
index fa5d359..99dade0 100644
--- a/app/views/manage_products/index.rhtml
+++ b/app/views/manage_products/index.rhtml
@@ -6,6 +6,11 @@
<%= _('Price') %>
<%= _('Actions') %>
+ <% if @products.empty? %>
+
+ <%= _('(no product registered yet)') %>
+
+ <% end %>
<% @products.each do |product| %>
<%= link_to product.name, :action => 'show', :id => product %>
@@ -18,7 +23,10 @@
<% end %>
-<%= button :add, _('New product or service'), :action => 'new' %>
+<% button_bar do %>
+ <%= button :add, _('New product or service'), :action => 'new' %>
+ <%= button :back, _('Back'), { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' } %>
+<% end %>
@@ -29,6 +37,11 @@
<%= _('Raw material') %>
<%= _('Actions') %>
+ <% if @consumptions.empty? %>
+
+ <%= _('(no raw material registered yet)') %>
+
+ <% end %>
<% @consumptions.each do |consumption| %>
@@ -44,9 +57,9 @@
<% end %>
-<%= button :add, _('Add raw material'), :action => 'new_consumption' %>
+<% button_bar do %>
+ <%= button :add, _('Add raw material'), :action => 'new_consumption' %>
+ <%= button :back, _('Back'), { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' } %>
+<% end %>
-
-<%= link_to( ''+ _('Back') +' ', { :controller => 'profile_editor', :profile => @profile.identifier, :action => 'index' }, :class => 'button with-text icon-back' ) %>
-
diff --git a/app/views/profile_editor/edit.rhtml b/app/views/profile_editor/edit.rhtml
index e9f350c..4a23ae0 100644
--- a/app/views/profile_editor/edit.rhtml
+++ b/app/views/profile_editor/edit.rhtml
@@ -15,14 +15,13 @@
<%= _('Privacy options') %>
-
- <%= _('This profile is:') %>
-
<% if profile.person? %>
-
+
+ <%= _('This profile is:') %>
+
<%= radio_button 'profile_data', 'public_profile', 'true' %>
<%= _('Public') %>
@@ -48,7 +47,9 @@
<% else %>
-
+
+ <%= _('This profile is:') %>
+
<%= radio_button 'profile_data', 'public_profile', 'true' %>
<%= _('Public') %>
diff --git a/app/views/profile_members/index.rhtml b/app/views/profile_members/index.rhtml
index 1c5412f..29c842d 100644
--- a/app/views/profile_members/index.rhtml
+++ b/app/views/profile_members/index.rhtml
@@ -11,11 +11,13 @@
<%= m.name %>
- <%= button :edit, _('Edit'), :action => 'change_role', :id => m %>
- <%= button :delete, _('Remove'), :action => 'unassociate', :id => m %>
+ <%= button_without_text :edit, _('Edit'), :action => 'change_role', :id => m %>
+ <%= button_without_text :delete, _('Remove'), :action => 'unassociate', :id => m %>
<% end %>
-<%= link_to _('Back'), :controller => 'profile_editor' %>
+<% button_bar do %>
+ <%= button :back, _('Back'), :controller => 'profile_editor' %>
+<% end %>
diff --git a/app/views/search/events.rhtml b/app/views/search/events.rhtml
index 4383ba2..e262c9c 100644
--- a/app/views/search/events.rhtml
+++ b/app/views/search/events.rhtml
@@ -13,7 +13,7 @@
<%= link_to_next_month(params[:year], params[:month]) %>
-
+
<% @calendar.first(7).each do |day,event| %>
<%= show_day_of_week(day) %>
diff --git a/app/views/themes/index.rhtml b/app/views/themes/index.rhtml
index 532c408..7ae5906 100644
--- a/app/views/themes/index.rhtml
+++ b/app/views/themes/index.rhtml
@@ -1,6 +1,6 @@
<%= _('Editing Appearance') %>
-
+
diff --git a/po/pt_BR/noosfero.po b/po/pt_BR/noosfero.po
index 5cce4bc..374d7b1 100644
--- a/po/pt_BR/noosfero.po
+++ b/po/pt_BR/noosfero.po
@@ -13,7 +13,7 @@ msgid ""
msgstr ""
"Project-Id-Version: noosfero 0.17.0\n"
"POT-Creation-Date: 2009-05-18 19:12-0300\n"
-"PO-Revision-Date: 2009-05-18 19:49-0300\n"
+"PO-Revision-Date: 2009-05-20 15:36-0300\n"
"Last-Translator: Joenio Costa \n"
"Language-Team: LANGUAGE \n"
"MIME-Version: 1.0\n"
@@ -5467,7 +5467,7 @@ msgstr "Gerenciar campos de comunidade"
#: app/views/features/_features_table.rhtml:13
msgid "Organization Approval Method"
-msgstr "Métode de Aprovação da Organização"
+msgstr "Método de Aprovação de Organização"
#: app/views/themes/new.rhtml:1
msgid "Create new theme"
diff --git a/public/stylesheets/common.css b/public/stylesheets/common.css
index 84ef0c9..f6a3dd7 100644
--- a/public/stylesheets/common.css
+++ b/public/stylesheets/common.css
@@ -242,25 +242,35 @@ div#notice {
table {
border-collapse: collapse;
+ width: 100%;
}
th, td {
font-size: 14px;
padding: 2px 10px;
+ height: 26px;
}
th {
font-weight: bold;
+ border-bottom: 2px solid black;
}
-
-table.cms-articles {
- width: 100%;
+td {
+ border-bottom: 1px solid #e0e0e0;
}
-table.cms-articles th, table.cms-articles td {
- border: 1px solid #e0e0e0;
+tr:hover td {
+ background-color: #f0f0f0;
}
table.noborder th, table.noborder td{
border: none;
}
+table.noborder:hover td {
+ background: none;
+}
+table.noborder:hover td.selected,
+td.selected {
+ background: #ff9;
+ font-style: italic;
+}
/* for fields with auto-completion */
div.auto-complete {
diff --git a/public/stylesheets/controller_themes.css b/public/stylesheets/controller_themes.css
index d983329..fd007f2 100644
--- a/public/stylesheets/controller_themes.css
+++ b/public/stylesheets/controller_themes.css
@@ -114,7 +114,3 @@
width: 500px;
}
-td.selected {
- background: #ff9;
- font-style: italic;
-}
--
libgit2 0.21.2