diff --git a/app/controllers/profile_admin/membership_editor_controller.rb b/app/controllers/profile_admin/membership_editor_controller.rb index 005836e..d6b8bbe 100644 --- a/app/controllers/profile_admin/membership_editor_controller.rb +++ b/app/controllers/profile_admin/membership_editor_controller.rb @@ -7,7 +7,7 @@ class MembershipEditorController < ProfileAdminController protect [:index, :new_enterprise, :create_enterprise ], 'edit_profile', :profile def index - @memberships = current_user.person.memberships + @memberships = current_user.person.enterprises_memberships end def new_enterprise diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 641b1a3..2db8f2b 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -123,7 +123,7 @@ module ApplicationHelper end def about_document - Article.find_all_by_title(_('About')).select do |a| + Article.find_all_by_slug(_('about')).select do |a| a.full_path.split(/\//).shift == 'noosfero' end[0] end @@ -249,7 +249,7 @@ module ApplicationHelper # end def accessibility_link - doc = Article.find_all_by_title(_('Accessibility')).select do |a| + doc = Article.find_all_by_slug(_('accessibility')).select do |a| a.full_path.split(/\//).shift == 'noosfero' end[0] link_to_document doc, _('Accessibility') if doc diff --git a/app/models/person.rb b/app/models/person.rb index 5d2f660..d9ca38e 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -26,8 +26,13 @@ class Person < Profile :all, :conditions => self.class.conditions_for_profiles(conditions, self), :joins => "LEFT JOIN role_assignments ON profiles.id = role_assignments.resource_id AND role_assignments.resource_type = \'#{Profile.base_class.name}\'", - :select => 'profiles.*').uniq.select{|p|p.class == Enterprise} + :select => 'profiles.*').uniq end + + def enterprises_memberships + memberships.select{|p|p.class == Enterprise} + end + def info person_info diff --git a/po/noosfero.pot b/po/noosfero.pot index 0a632e9..4f8a43d 100644 --- a/po/noosfero.pot +++ b/po/noosfero.pot @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: noosfero 0.3.0\n" -"POT-Creation-Date: 2007-10-20 03:04-0300\n" +"POT-Creation-Date: 2007-10-22 14:20-0300\n" "PO-Revision-Date: 2007-08-30 18:47-0300\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -82,15 +82,15 @@ msgstr "" msgid "Could not update the enterprise" msgstr "" -#: app/controllers/profile_admin/enterprise_editor_controller.rb:34 +#: app/controllers/profile_admin/enterprise_editor_controller.rb:35 msgid "Enterprise sucessfully erased from the system" msgstr "" -#: app/controllers/profile_admin/enterprise_editor_controller.rb:44 +#: app/controllers/profile_admin/enterprise_editor_controller.rb:45 msgid "Enterprise successfuly activacted" msgstr "" -#: app/controllers/profile_admin/enterprise_editor_controller.rb:46 +#: app/controllers/profile_admin/enterprise_editor_controller.rb:47 msgid "Failed to activate the enterprise" msgstr "" @@ -331,19 +331,19 @@ msgstr "" msgid "Task|Code" msgstr "" -#: app/models/task.rb:81 +#: app/models/task.rb:86 msgid "Generic task" msgstr "" -#: app/models/task.rb:88 +#: app/models/task.rb:93 msgid "The task was created at %s" msgstr "" -#: app/models/task.rb:94 +#: app/models/task.rb:99 msgid "The task was finished at %s" msgstr "" -#: app/models/task.rb:100 +#: app/models/task.rb:105 msgid "The task was cancelled at %s" msgstr "" @@ -720,10 +720,14 @@ msgstr "" msgid "Admin" msgstr "" -#: app/helpers/application_helper.rb:120 app/helpers/application_helper.rb:126 +#: app/helpers/application_helper.rb:120 msgid "About" msgstr "" +#: app/helpers/application_helper.rb:126 +msgid "about" +msgstr "" + #: app/helpers/application_helper.rb:144 app/views/account/login.rhtml:1 msgid "Login" msgstr "" @@ -773,10 +777,6 @@ msgstr "" msgid "Edit informations" msgstr "" -#: app/helpers/application_helper.rb:194 -msgid "Exclude" -msgstr "" - #: app/helpers/application_helper.rb:200 #: app/views/account/new_password.rhtml:13 #: app/views/account/change_password.rhtml:1 @@ -800,7 +800,11 @@ msgstr "" msgid "Change icon theme" msgstr "" -#: app/helpers/application_helper.rb:252 app/helpers/application_helper.rb:255 +#: app/helpers/application_helper.rb:252 +msgid "accessibility" +msgstr "" + +#: app/helpers/application_helper.rb:255 msgid "Accessibility" msgstr "" @@ -1156,6 +1160,7 @@ msgid "Dear %s," msgstr "" #: app/views/task_mailer/task_created.text.plain.rhtml:6 +#: app/views/task_mailer/target_notification.rhtml:6 #: app/views/task_mailer/task_finished.text.plain.rhtml:6 #: app/views/task_mailer/task_cancelled.text.plain.rhtml:6 msgid "%s environment system" diff --git a/po/pt_BR/noosfero.po b/po/pt_BR/noosfero.po index 5468f82..5aedd0d 100644 --- a/po/pt_BR/noosfero.po +++ b/po/pt_BR/noosfero.po @@ -9,8 +9,8 @@ msgid "" msgstr "" "Project-Id-Version: noosfero 0.3.0\n" -"POT-Creation-Date: 2007-10-20 03:04-0300\n" -"PO-Revision-Date: 2007-10-19 21:25-0300\n" +"POT-Creation-Date: 2007-10-22 14:20-0300\n" +"PO-Revision-Date: 2007-10-22 14:23-0300\n" "Last-Translator: Rafael Tavares Bomfim \n" "Language-Team: \n" "MIME-Version: 1.0\n" @@ -85,15 +85,15 @@ msgstr "Esta ação não está disponível para \"%s\"." msgid "Could not update the enterprise" msgstr "Não pôde modificar o empreendimento" -#: app/controllers/profile_admin/enterprise_editor_controller.rb:34 +#: app/controllers/profile_admin/enterprise_editor_controller.rb:35 msgid "Enterprise sucessfully erased from the system" msgstr "Empreendimento ativado com sucesso" -#: app/controllers/profile_admin/enterprise_editor_controller.rb:44 +#: app/controllers/profile_admin/enterprise_editor_controller.rb:45 msgid "Enterprise successfuly activacted" msgstr "Empreendimento ativado com sucesso" -#: app/controllers/profile_admin/enterprise_editor_controller.rb:46 +#: app/controllers/profile_admin/enterprise_editor_controller.rb:47 msgid "Failed to activate the enterprise" msgstr "Falhou em ativar o empreendimento" @@ -340,19 +340,19 @@ msgstr "Alvo" msgid "Task|Code" msgstr "Código" -#: app/models/task.rb:81 +#: app/models/task.rb:86 msgid "Generic task" msgstr "Tarefa genérica" -#: app/models/task.rb:88 +#: app/models/task.rb:93 msgid "The task was created at %s" msgstr "A tarefa foi criada em %s" -#: app/models/task.rb:94 +#: app/models/task.rb:99 msgid "The task was finished at %s" msgstr "A tarefa foi finalizada em %s" -#: app/models/task.rb:100 +#: app/models/task.rb:105 msgid "The task was cancelled at %s" msgstr "A tarefa foi cancelada em %s" @@ -741,10 +741,15 @@ msgstr "Meus Empreendimentos" msgid "Admin" msgstr "Administrador" -#: app/helpers/application_helper.rb:120 app/helpers/application_helper.rb:126 +#: app/helpers/application_helper.rb:120 msgid "About" msgstr "Sobre" +#: app/helpers/application_helper.rb:126 +#, fuzzy +msgid "about" +msgstr "sobre" + #: app/helpers/application_helper.rb:144 app/views/account/login.rhtml:1 msgid "Login" msgstr "Entrar" @@ -794,10 +799,6 @@ msgstr "Gerenciar conteúdo" msgid "Edit informations" msgstr "Editar informações" -#: app/helpers/application_helper.rb:194 -msgid "Exclude" -msgstr "Excluir" - #: app/helpers/application_helper.rb:200 #: app/views/account/new_password.rhtml:13 #: app/views/account/change_password.rhtml:1 @@ -821,7 +822,12 @@ msgstr "Mude o tema de bloco" msgid "Change icon theme" msgstr "Mudar tema do ícone" -#: app/helpers/application_helper.rb:252 app/helpers/application_helper.rb:255 +#: app/helpers/application_helper.rb:252 +#, fuzzy +msgid "accessibility" +msgstr "acessibilidade" + +#: app/helpers/application_helper.rb:255 msgid "Accessibility" msgstr "Acessibilidade" @@ -1179,6 +1185,7 @@ msgid "Dear %s," msgstr "Caro %s," #: app/views/task_mailer/task_created.text.plain.rhtml:6 +#: app/views/task_mailer/target_notification.rhtml:6 #: app/views/task_mailer/task_finished.text.plain.rhtml:6 #: app/views/task_mailer/task_cancelled.text.plain.rhtml:6 msgid "%s environment system" @@ -1865,6 +1872,9 @@ msgstr "Editando %s" msgid "Categories" msgstr "Categorias" +#~ msgid "Exclude" +#~ msgstr "Excluir" + #~ msgid "Main content block" #~ msgstr "Bloco de conteúdo principal" diff --git a/test/unit/profile_test.rb b/test/unit/profile_test.rb index 3e937dd..a35d85e 100644 --- a/test/unit/profile_test.rb +++ b/test/unit/profile_test.rb @@ -80,7 +80,7 @@ class ProfileTest < Test::Unit::TestCase pr = Profile.create(:name => 'composite_profile', :identifier => 'composite') pe = User.create(:login => 'aff', :email => 'aff@pr.coop', :password => 'blih', :password_confirmation => 'blih').person - member_role = Role.new(:name => 'member') + member_role = Role.new(:name => 'new_member_role') assert member_role.save assert pr.affiliate(pe, member_role) -- libgit2 0.21.2