Commit 6fe12b677abb0d2732bfcab5f53a57e9de2b5a4f
1 parent
c0a5f9dd
Exists in
staging
and in
42 other branches
ActionItem93: cosmetic stuff, adding links
git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1031 3f533792-8f58-4932-b0fe-aaf55b0a4547
Showing
12 changed files
with
52 additions
and
35 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -268,21 +268,7 @@ module ApplicationHelper |
268 | 268 | end |
269 | 269 | |
270 | 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 | 272 | end |
287 | 273 | |
288 | 274 | def file_manager(&block) |
... | ... | @@ -318,6 +304,10 @@ module ApplicationHelper |
318 | 304 | design_display_button(type, label, url, { :class => 'with_text' }.merge(html_options)) |
319 | 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 | 311 | def button_to_function(type, label, js_code, html_options = {}) |
322 | 312 | #design_display_function_button(type, label, js_code, { :class => 'with_text' }.merge(html_options)) |
323 | 313 | html_options[:class] = "" unless html_options[:class] |
... | ... | @@ -330,7 +320,7 @@ module ApplicationHelper |
330 | 320 | end |
331 | 321 | |
332 | 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 | 324 | end |
335 | 325 | |
336 | 326 | def link_to_category(category) | ... | ... |
app/models/person.rb
app/models/profile.rb
... | ... | @@ -143,7 +143,17 @@ class Profile < ActiveRecord::Base |
143 | 143 | environment |
144 | 144 | end |
145 | 145 | |
146 | + # returns +false+ | |
146 | 147 | def person? |
147 | - false | |
148 | + self.kind_of?(Person) | |
148 | 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 | 159 | end | ... | ... |
app/views/cms/text_html_new.rhtml
... | ... | @@ -8,10 +8,10 @@ |
8 | 8 | |
9 | 9 | <%= f.text_field('name', :size => '64') %> |
10 | 10 | |
11 | - <%= f.text_area('abstract', :cols => 64, :rows => 5) %> | |
12 | - | |
13 | 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 | 15 | <%= f.text_area('body', :cols => 64) %> |
16 | 16 | |
17 | 17 | <%= design_display_button_submit('save', _('Save')) %> | ... | ... |
app/views/enterprise_registration/basic_information.rhtml
... | ... | @@ -28,9 +28,9 @@ |
28 | 28 | |
29 | 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 | 36 | <% end %> | ... | ... |
app/views/layouts/application.rhtml
app/views/profile_editor/index.rhtml
... | ... | @@ -13,15 +13,16 @@ |
13 | 13 | |
14 | 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 | 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 | 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 | 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 | 5 | section "apps/". We take the SVG files and convert to 64x64 PNG images, so |
6 | 6 | these icons are in fact derived works based on dlg-neu's SVG files. |
7 | 7 | |
8 | 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 | 12 | the original filenames (replacing .svg by .png, obviously) and create symbolic |
13 | 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 | 27 | Icons rasterization |
16 | 28 | =================== |
17 | 29 | ... | ... |
2.23 KB
public/stylesheets/button.css