diff --git a/app/controllers/public/account_controller.rb b/app/controllers/public/account_controller.rb index fe2b195..b9b4cbe 100644 --- a/app/controllers/public/account_controller.rb +++ b/app/controllers/public/account_controller.rb @@ -36,7 +36,7 @@ class AccountController < PublicController @user.person.environment = environment @user.person.save! self.current_user = @user - redirect_back_or_default(:controller => 'account', :action => 'index') + redirect_back_or_default(homepage_path(:profile => current_user.login)) flash[:notice] = _("Thanks for signing up!") end rescue ActiveRecord::RecordInvalid diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 764b4d4..36da6e9 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -112,7 +112,6 @@ module ApplicationHelper # TODO: add the actual links # TODO: test this helper - # FIXME: uncomment "My enterprises" links def user_links links = [ ( link_to_homepage( _('My account') )), @@ -124,7 +123,7 @@ module ApplicationHelper end def about_document - Article.find_all_by_title('About').select do |a| + Article.find_all_by_title(_('About')).select do |a| a.full_path.split(/\//).shift == 'noosfero' end[0] end @@ -216,7 +215,9 @@ module ApplicationHelper ] end + #FIXME: about_links should be shown even if the user isn't logged in def user_options + return [] unless logged_in? profile = Profile.find_by_identifier(params[:profile]) case params[:controller] when 'admin_panel' @@ -245,7 +246,10 @@ module ApplicationHelper end def accessibility_link - link_to _('Accessibility') + doc = Article.find_all_by_title(_('Accessibility')).select do |a| + a.full_path.split(/\//).shift == 'noosfero' + end[0] + link_to_document doc, _('Accessibility') if doc end def footer diff --git a/app/views/content_viewer/view_page.rhtml b/app/views/content_viewer/view_page.rhtml index 81b1512..85e8983 100644 --- a/app/views/content_viewer/view_page.rhtml +++ b/app/views/content_viewer/view_page.rhtml @@ -2,11 +2,16 @@ <% if @page.parent && !@page.parent.full_path.blank? %> <%= link_to_document(@page.parent, _('Up')) %> -