Commit 6fe12b677abb0d2732bfcab5f53a57e9de2b5a4f

Authored by AntonioTerceiro
1 parent c0a5f9dd

ActionItem93: cosmetic stuff, adding links



git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1031 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/application_helper.rb
@@ -268,21 +268,7 @@ module ApplicationHelper @@ -268,21 +268,7 @@ module ApplicationHelper
268 end 268 end
269 269
270 def text_editor(object, method, filter_type_method = nil, options = {}) 270 def text_editor(object, method, filter_type_method = nil, options = {})
271 - filter_type =  
272 - if filter_type_method.blank?  
273 - ''  
274 - else  
275 - instance_variable_get("@#{object}").send(filter_type_method)  
276 - end  
277 - if filter_type == '[No Filter]' || filter_type.blank?  
278 - html_class = "tiny_mce_editor"  
279 - if options[:class]  
280 - html_class << " #{options[:class]}"  
281 - end  
282 - text_area(object, method, { :size => '72x12' }.merge(options).merge({:class => html_class}))  
283 - else  
284 - text_area(object, method, { :size => '72x12' }.merge(options))  
285 - end 271 + text_area(object, method, { :rows => 10, :cols => 64 }.merge(options))
286 end 272 end
287 273
288 def file_manager(&block) 274 def file_manager(&block)
@@ -318,6 +304,10 @@ module ApplicationHelper @@ -318,6 +304,10 @@ module ApplicationHelper
318 design_display_button(type, label, url, { :class => 'with_text' }.merge(html_options)) 304 design_display_button(type, label, url, { :class => 'with_text' }.merge(html_options))
319 end 305 end
320 306
  307 + def submit_button(type, label, html_options = {})
  308 + design_display_button_submit(type, label, { :class => 'with_text' }.merge(html_options))
  309 + end
  310 +
321 def button_to_function(type, label, js_code, html_options = {}) 311 def button_to_function(type, label, js_code, html_options = {})
322 #design_display_function_button(type, label, js_code, { :class => 'with_text' }.merge(html_options)) 312 #design_display_function_button(type, label, js_code, { :class => 'with_text' }.merge(html_options))
323 html_options[:class] = "" unless html_options[:class] 313 html_options[:class] = "" unless html_options[:class]
@@ -330,7 +320,7 @@ module ApplicationHelper @@ -330,7 +320,7 @@ module ApplicationHelper
330 end 320 end
331 321
332 def button_bar(options = {}, &block) 322 def button_bar(options = {}, &block)
333 - concat(content_tag('div', capture(&block) + tag('br', :style => 'clear: left;'), options), block.binding) 323 + concat(content_tag('div', capture(&block) + tag('br', :style => 'clear: left;'), { :class => 'button-bar' }.merge(options)), block.binding)
334 end 324 end
335 325
336 def link_to_category(category) 326 def link_to_category(category)
app/models/person.rb
@@ -53,7 +53,4 @@ class Person &lt; Profile @@ -53,7 +53,4 @@ class Person &lt; Profile
53 end 53 end
54 end 54 end
55 55
56 - def person?  
57 - true  
58 - end  
59 end 56 end
app/models/profile.rb
@@ -143,7 +143,17 @@ class Profile &lt; ActiveRecord::Base @@ -143,7 +143,17 @@ class Profile &lt; ActiveRecord::Base
143 environment 143 environment
144 end 144 end
145 145
  146 + # returns +false+
146 def person? 147 def person?
147 - false 148 + self.kind_of?(Person)
148 end 149 end
  150 +
  151 + def enterprise?
  152 + self.kind_of?(Enterprise)
  153 + end
  154 +
  155 + def organization?
  156 + self.kind_of?(Organization)
  157 + end
  158 +
149 end 159 end
app/views/cms/text_html_new.rhtml
@@ -8,10 +8,10 @@ @@ -8,10 +8,10 @@
8 8
9 <%= f.text_field('name', :size => '64') %> 9 <%= f.text_field('name', :size => '64') %>
10 10
11 - <%= f.text_area('abstract', :cols => 64, :rows => 5) %>  
12 -  
13 <%= f.text_field('tag_list', :size => 64, :title => _('Separate tags with commas')) %> 11 <%= f.text_field('tag_list', :size => 64, :title => _('Separate tags with commas')) %>
14 12
  13 + <%= f.text_area('abstract', :cols => 64, :rows => 5) %>
  14 +
15 <%= f.text_area('body', :cols => 64) %> 15 <%= f.text_area('body', :cols => 64) %>
16 16
17 <%= design_display_button_submit('save', _('Save')) %> 17 <%= design_display_button_submit('save', _('Save')) %>
app/views/enterprise_registration/basic_information.rhtml
@@ -28,9 +28,9 @@ @@ -28,9 +28,9 @@
28 28
29 <%= f.select('region_id', @regions) %> 29 <%= f.select('region_id', @regions) %>
30 30
31 - <div>  
32 - <%= submit_tag _('Register') %>  
33 - <%= link_to _('Cancel'), :action => 'index' %>  
34 - </div> 31 + <% button_bar do %>
  32 + <%= submit_button('save', _('Register')) %>
  33 + <%= button 'cancel', _('Cancel'), :action => 'index' %>
  34 + <% end %>
35 35
36 <% end %> 36 <% end %>
app/views/layouts/application.rhtml
@@ -42,6 +42,7 @@ @@ -42,6 +42,7 @@
42 </div><!-- accessibility_menu --> 42 </div><!-- accessibility_menu -->
43 43
44 <div id='top_bar' class='category<%= category_color %>'> 44 <div id='top_bar' class='category<%= category_color %>'>
  45 + <%= image_tag 'noosfero.png', :style => 'float: left;' %>
45 <div id='path_category'> 46 <div id='path_category'>
46 <% if @category %> 47 <% if @category %>
47 <%= @category.full_name %> 48 <%= @category.full_name %>
app/views/profile_editor/index.rhtml
@@ -13,15 +13,16 @@ @@ -13,15 +13,16 @@
13 13
14 <%= file_manager_button(_('Manage Content'), 'icons-app/cms.png', :controller => 'cms') %> 14 <%= file_manager_button(_('Manage Content'), 'icons-app/cms.png', :controller => 'cms') %>
15 15
16 - <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') %> 16 + <%= file_manager_button(_('Change Password'), 'icons-app/change-password.png', :controller => 'account', :action => 'change_password') if profile.person? %>
17 17
18 - <%= file_manager_button(_('Manage Products'), 'icons-app/products.png', :controller => 'manage_products') if @profile.kind_of?(Enterprise) %> 18 + <%= file_manager_button(_('Manage Products'), 'icons-app/products.png', :controller => 'manage_products') if profile.enterprise? %>
19 19
20 <% end %> 20 <% end %>
21 21
22 -<!--  
23 -<p> <%= link_to _('Edit Visual Design'), :action => 'design_editor' %> </p>  
24 -<p> <%= link_to _('Menage content'), :controller => 'cms' %> </p>  
25 --->  
26 -  
27 <h2><%= _('My organizations') %></h2> 22 <h2><%= _('My organizations') %></h2>
  23 +
  24 +<% file_manager do %>
  25 +
  26 + <%= file_manager_button(_('Register a new Enterprise'), 'icons-app/enterprise-registration.png', :controller => 'enterprise_registration') %>
  27 +
  28 +<% end %>
public/images/icons-app/README
1 dlg-neu icons in Noosfero 1 dlg-neu icons in Noosfero
2 ========================= 2 =========================
3 3
4 -The icons in this directory are taken from the dlg-neu icon theme for GNOME, 4 +The icons in this directory are taken from the icon themes for GNOME,
5 section "apps/". We take the SVG files and convert to 64x64 PNG images, so 5 section "apps/". We take the SVG files and convert to 64x64 PNG images, so
6 these icons are in fact derived works based on dlg-neu's SVG files. 6 these icons are in fact derived works based on dlg-neu's SVG files.
7 7
8 Structure 8 Structure
9 ========= 9 =========
10 10
11 -To keep a trace back to dlg-neu theme, when rasterizing the SVG files we keep 11 +To keep a trace back to the theme theme, when rasterizing the SVG files we keep
12 the original filenames (replacing .svg by .png, obviously) and create symbolic 12 the original filenames (replacing .svg by .png, obviously) and create symbolic
13 links with names more sensible for Noosfero. 13 links with names more sensible for Noosfero.
14 14
  15 +Source for icons
  16 +================
  17 +
  18 +Icon Theme
  19 +------------------------------ -------
  20 +gnome-settings-background.png dlg-neu
  21 +gnome-settings-theme.png Nuovo
  22 +password.png dlg-neu
  23 +abiword_48.png dlg-neu
  24 +gnome-other.png Nuovo
  25 +user_icon.png dlg-neu
  26 +
15 Icons rasterization 27 Icons rasterization
16 =================== 28 ===================
17 29
public/images/icons-app/enterprise-registration.png 0 → 120000
@@ -0,0 +1 @@ @@ -0,0 +1 @@
  1 +gnome-settings-theme.png
0 \ No newline at end of file 2 \ No newline at end of file
public/images/icons-app/gnome-settings-theme.png 0 → 100644

2.23 KB

public/stylesheets/button.css
  1 +.button-bar {
  2 + margin-top: 1em;
  3 +}
  4 +
1 .button { 5 .button {
2 border: none; 6 border: none;
3 margin-left: 5px; 7 margin-left: 5px;
public/stylesheets/common.css
@@ -123,6 +123,7 @@ div.file-manager-button a { @@ -123,6 +123,7 @@ div.file-manager-button a {
123 padding: 3px; 123 padding: 3px;
124 height: 80px; 124 height: 80px;
125 overflow: hidden; 125 overflow: hidden;
  126 + background: white;
126 } 127 }
127 128
128 div.file-manager 129 div.file-manager