diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index d802927..ae1c334 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -451,10 +451,14 @@ module ApplicationHelper end attr_reader :environment - def select_categories(object_name) + def select_categories(object_name, title=nil, title_size=4) + if title.nil? + title = _('Categories') + end + object = instance_variable_get("@#{object_name}") - result = content_tag 'h4', _('Categories') + result = content_tag 'h'+title_size.to_s(), title result << javascript_tag( 'function open_close_cat( link ) { var div = link.parentNode.getElementsByTagName("div")[0]; var end = function(){ diff --git a/app/helpers/profile_helper.rb b/app/helpers/profile_helper.rb index 65aba03..938c228 100644 --- a/app/helpers/profile_helper.rb +++ b/app/helpers/profile_helper.rb @@ -5,14 +5,19 @@ module ProfileHelper if info.nil? content_tag('div', _('This profile does not have any public information')) else - table_rows = '' + table_rows = content_tag( 'tr', + content_tag( 'th', + "\n" + + button( :edit, _('edit your informations'), :controller => 'profile_editor', :action => 'edit' ) + + "\n", + :colspan => 2, :class => 'header' ) + ) + "\n" info.summary.each do |item| name = item[0] value = item[1] if value.is_a?(Proc) value = self.instance_eval(value) end - table_rows << content_tag('tr', content_tag('th', name) + content_tag('td', value)) table_rows << "\n" end diff --git a/app/views/admin_panel/index.rhtml b/app/views/admin_panel/index.rhtml index b07afe4..f5ccc30 100644 --- a/app/views/admin_panel/index.rhtml +++ b/app/views/admin_panel/index.rhtml @@ -1,4 +1,4 @@ -/
<%= _('You, as an environment administrator, has the following options:')%>
diff --git a/app/views/layouts/application.rhtml b/app/views/layouts/application.rhtml index d8d1b90..757edd9 100644 --- a/app/views/layouts/application.rhtml +++ b/app/views/layouts/application.rhtml @@ -107,12 +107,12 @@ -