Commit e5fb01d63bf2302ec6e002b831cf7223525f632c
Exists in
master
and in
27 other branches
Merge branch 'master' into not_destroy_user_with_moderate_task
Showing
18 changed files
with
135 additions
and
137 deletions
Show diff stats
app/helpers/cms_helper.rb
@@ -9,12 +9,6 @@ module CmsHelper | @@ -9,12 +9,6 @@ module CmsHelper | ||
9 | mime_type.gsub('/', '_').gsub('-', '') | 9 | mime_type.gsub('/', '_').gsub('-', '') |
10 | end | 10 | end |
11 | 11 | ||
12 | - def add_upload_file_field(name, locals) | ||
13 | - button_to_function :add, name, nil do |page| | ||
14 | - page.insert_html :bottom, :uploaded_files, CGI::escapeHTML(render(:partial => 'upload_file', :locals => locals, :object => UploadedFile.new)) | ||
15 | - end | ||
16 | - end | ||
17 | - | ||
18 | def pagination_links(collection, options={}) | 12 | def pagination_links(collection, options={}) |
19 | options = {:previous_label => '« ', :next_label => ' »', :page_links => false}.merge(options) | 13 | options = {:previous_label => '« ', :next_label => ' »', :page_links => false}.merge(options) |
20 | will_paginate(collection, options) | 14 | will_paginate(collection, options) |
app/models/add_friend.rb
@@ -4,7 +4,7 @@ class AddFriend < Task | @@ -4,7 +4,7 @@ class AddFriend < Task | ||
4 | 4 | ||
5 | validates_presence_of :requestor_id, :target_id | 5 | validates_presence_of :requestor_id, :target_id |
6 | 6 | ||
7 | - validates_uniqueness_of :target_id, :scope => [ :requestor_id ] | 7 | + validates_uniqueness_of :target_id, scope: [ :requestor_id, :status ], if: proc{ |t| t.status == Task::Status::ACTIVE } |
8 | 8 | ||
9 | validates_length_of :group_for_person, :group_for_friend, :maximum => 150, :allow_nil => true | 9 | validates_length_of :group_for_person, :group_for_friend, :maximum => 150, :allow_nil => true |
10 | 10 |
app/models/main_block.rb
@@ -24,4 +24,10 @@ class MainBlock < Block | @@ -24,4 +24,10 @@ class MainBlock < Block | ||
24 | ['always', 'except_home_page'] | 24 | ['always', 'except_home_page'] |
25 | end | 25 | end |
26 | 26 | ||
27 | + def display_user_options | ||
28 | + @display_user_options = { | ||
29 | + 'all' => _('All users') | ||
30 | + } | ||
31 | + end | ||
32 | + | ||
27 | end | 33 | end |
app/models/person.rb
@@ -150,7 +150,7 @@ roles] } | @@ -150,7 +150,7 @@ roles] } | ||
150 | end | 150 | end |
151 | 151 | ||
152 | def already_request_friendship?(person) | 152 | def already_request_friendship?(person) |
153 | - person.tasks.find_by_requestor_id(self.id, :conditions => { :type => 'AddFriend' }) | 153 | + person.tasks.where(requestor_id: self.id, type: 'AddFriend', status: Task::Status::ACTIVE).first |
154 | end | 154 | end |
155 | 155 | ||
156 | def remove_friend(friend) | 156 | def remove_friend(friend) |
app/views/cms/_upload_file.html.erb
app/views/cms/_upload_file_form.html.erb
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | <%= hidden_field_tag('back_to', @back_to) %> | 13 | <%= hidden_field_tag('back_to', @back_to) %> |
14 | 14 | ||
15 | <% button_bar do %> | 15 | <% button_bar do %> |
16 | - <%= add_upload_file_field(_('More files'), {:size => size}) %> | 16 | + <%= button_to_function :add, _('More files'), "add_new_file_fields()" %> |
17 | <% if @back_to %> | 17 | <% if @back_to %> |
18 | <%= submit_button :save, _('Upload'), :cancel => @back_to %> | 18 | <%= submit_button :save, _('Upload'), :cancel => @back_to %> |
19 | <% else %> | 19 | <% else %> |
app/views/layouts/application-ng.html.erb
@@ -5,7 +5,6 @@ | @@ -5,7 +5,6 @@ | ||
5 | <%= yield(:feeds) %> | 5 | <%= yield(:feeds) %> |
6 | <!--<meta http-equiv="refresh" content="1"/>--> | 6 | <!--<meta http-equiv="refresh" content="1"/>--> |
7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> | 7 | <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> |
8 | - <meta name="description" content="<%= @environment.name %>" /> | ||
9 | 8 | ||
10 | <!-- site root --> | 9 | <!-- site root --> |
11 | <meta property="noosfero:root" content="<%= Noosfero.root %>"/> | 10 | <meta property="noosfero:root" content="<%= Noosfero.root %>"/> |
plugins/custom_forms/lib/custom_forms_plugin/submission.rb
@@ -5,7 +5,7 @@ class CustomFormsPlugin::Submission < Noosfero::Plugin::ActiveRecord | @@ -5,7 +5,7 @@ class CustomFormsPlugin::Submission < Noosfero::Plugin::ActiveRecord | ||
5 | # validation is done manually, see below | 5 | # validation is done manually, see below |
6 | has_many :answers, :class_name => 'CustomFormsPlugin::Answer', :dependent => :destroy, :validate => false | 6 | has_many :answers, :class_name => 'CustomFormsPlugin::Answer', :dependent => :destroy, :validate => false |
7 | 7 | ||
8 | - attr_accessible :form, :profile | 8 | + attr_accessible :form, :profile, :author_name, :author_email |
9 | 9 | ||
10 | validates_presence_of :form | 10 | validates_presence_of :form |
11 | validates_presence_of :author_name, :author_email, :if => lambda {|submission| submission.profile.nil?} | 11 | validates_presence_of :author_name, :author_email, :if => lambda {|submission| submission.profile.nil?} |
@@ -13,13 +13,16 @@ class CustomFormsPlugin::Submission < Noosfero::Plugin::ActiveRecord | @@ -13,13 +13,16 @@ class CustomFormsPlugin::Submission < Noosfero::Plugin::ActiveRecord | ||
13 | validates_format_of :author_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda {|submission| !submission.author_email.blank?}) | 13 | validates_format_of :author_email, :with => Noosfero::Constants::EMAIL_FORMAT, :if => (lambda {|submission| !submission.author_email.blank?}) |
14 | validate :check_answers | 14 | validate :check_answers |
15 | 15 | ||
16 | - def self.human_attribute_name(attrib) | ||
17 | - if /\d+/ =~ attrib and (f = CustomFormsPlugin::Field.find_by_id(attrib.to_i)) | 16 | + def self.human_attribute_name_with_customization(attrib, options={}) |
17 | + if /\d+/ =~ attrib and (f = CustomFormsPlugin::Field.find_by_id(attrib.to_s)) | ||
18 | f.name | 18 | f.name |
19 | else | 19 | else |
20 | - attrib | 20 | + _(self.human_attribute_name_without_customization(attrib)) |
21 | end | 21 | end |
22 | end | 22 | end |
23 | + class << self | ||
24 | + alias_method_chain :human_attribute_name, :customization | ||
25 | + end | ||
23 | 26 | ||
24 | before_create do |submission| | 27 | before_create do |submission| |
25 | if submission.profile | 28 | if submission.profile |
plugins/custom_forms/test/functional/custom_forms_plugin_profile_controller_test.rb
@@ -40,6 +40,19 @@ class CustomFormsPluginProfileControllerTest < ActionController::TestCase | @@ -40,6 +40,19 @@ class CustomFormsPluginProfileControllerTest < ActionController::TestCase | ||
40 | assert_redirected_to :action => 'show' | 40 | assert_redirected_to :action => 'show' |
41 | end | 41 | end |
42 | 42 | ||
43 | + should 'display errors if user is not logged in and author_name is not uniq' do | ||
44 | + logout | ||
45 | + form = CustomFormsPlugin::Form.create(:profile => profile, :name => 'Free Software') | ||
46 | + field = CustomFormsPlugin::TextField.create(:name => 'Name', :form => form) | ||
47 | + submission = CustomFormsPlugin::Submission.create(:form => form, :author_name => "john", :author_email => 'john@example.com') | ||
48 | + | ||
49 | + assert_no_difference 'CustomFormsPlugin::Submission.count' do | ||
50 | + post :show, :profile => profile.identifier, :id => form.id, :author_name => "john", :author_email => 'john@example.com', :submission => {field.id.to_s => 'Noosfero'} | ||
51 | + end | ||
52 | + assert_equal "Submission could not be saved", session[:notice] | ||
53 | + assert_tag :tag => 'div', :attributes => { :class => 'errorExplanation', :id => 'errorExplanation' } | ||
54 | + end | ||
55 | + | ||
43 | should 'disable fields if form expired' do | 56 | should 'disable fields if form expired' do |
44 | form = CustomFormsPlugin::Form.create!(:profile => profile, :name => 'Free Software', :begining => Time.now + 1.day) | 57 | form = CustomFormsPlugin::Form.create!(:profile => profile, :name => 'Free Software', :begining => Time.now + 1.day) |
45 | form.fields << CustomFormsPlugin::TextField.create(:name => 'Field Name', :form => form, :default_value => "First Field") | 58 | form.fields << CustomFormsPlugin::TextField.create(:name => 'Field Name', :form => form, :default_value => "First Field") |
po/de/noosfero.po
@@ -2942,10 +2942,6 @@ msgstr "Karte" | @@ -2942,10 +2942,6 @@ msgstr "Karte" | ||
2942 | msgid "Full" | 2942 | msgid "Full" |
2943 | msgstr "Vollständig" | 2943 | msgstr "Vollständig" |
2944 | 2944 | ||
2945 | -#: app/helpers/search_helper.rb:104 | ||
2946 | -msgid "Display" | ||
2947 | -msgstr "Anzeige" | ||
2948 | - | ||
2949 | #: app/helpers/search_helper.rb:118 app/helpers/users_helper.rb:16 | 2945 | #: app/helpers/search_helper.rb:118 app/helpers/users_helper.rb:16 |
2950 | #: app/views/tasks/index.html.erb:26 app/views/tasks/index.html.erb:41 | 2946 | #: app/views/tasks/index.html.erb:26 app/views/tasks/index.html.erb:41 |
2951 | #: app/views/memberships/index.html.erb:16 | 2947 | #: app/views/memberships/index.html.erb:16 |
@@ -3000,19 +2996,6 @@ msgstr "Aktivere Unternehmen aus dem Netzwerk" | @@ -3000,19 +2996,6 @@ msgstr "Aktivere Unternehmen aus dem Netzwerk" | ||
3000 | msgid "More popular enterprises from network" | 2996 | msgid "More popular enterprises from network" |
3001 | msgstr "Beliebtere Unternehmen aus dem Netzwerk" | 2997 | msgstr "Beliebtere Unternehmen aus dem Netzwerk" |
3002 | 2998 | ||
3003 | -#: app/helpers/search_helper.rb:23 app/helpers/search_helper.rb:113 | ||
3004 | -#, fuzzy | ||
3005 | -msgid "Compact" | ||
3006 | -msgstr "Berechnung" | ||
3007 | - | ||
3008 | -#: app/helpers/search_helper.rb:55 | ||
3009 | -msgid ", " | ||
3010 | -msgstr ", " | ||
3011 | - | ||
3012 | -#: app/helpers/search_helper.rb:56 | ||
3013 | -msgid "search in all categories" | ||
3014 | -msgstr "In allen Kategorien suchen" | ||
3015 | - | ||
3016 | #: app/helpers/boxes_helper.rb:106 | 2999 | #: app/helpers/boxes_helper.rb:106 |
3017 | msgid "This block is invisible. Your visitors will not see it." | 3000 | msgid "This block is invisible. Your visitors will not see it." |
3018 | msgstr "Dieser Bereich ist nicht sichtbar. Ihre Kunden werden ihn nicht sehen." | 3001 | msgstr "Dieser Bereich ist nicht sichtbar. Ihre Kunden werden ihn nicht sehen." |
@@ -3389,11 +3372,6 @@ msgstr "Aktiviert um" | @@ -3389,11 +3372,6 @@ msgstr "Aktiviert um" | ||
3389 | msgid "Deativated users" | 3372 | msgid "Deativated users" |
3390 | msgstr "Nutzer verwalten" | 3373 | msgstr "Nutzer verwalten" |
3391 | 3374 | ||
3392 | -#: app/helpers/users_helper.rb:16 app/views/tasks/index.html.erb:26 | ||
3393 | -#: app/views/tasks/index.html.erb:41 app/views/memberships/index.html.erb:16 | ||
3394 | -msgid "Filter" | ||
3395 | -msgstr "Filter" | ||
3396 | - | ||
3397 | #: app/helpers/forms_helper.rb:62 | 3375 | #: app/helpers/forms_helper.rb:62 |
3398 | msgid "Select the State" | 3376 | msgid "Select the State" |
3399 | msgstr "Wählen Sie das Bundesland" | 3377 | msgstr "Wählen Sie das Bundesland" |
@@ -9909,45 +9887,6 @@ msgstr "" | @@ -9909,45 +9887,6 @@ msgstr "" | ||
9909 | "\">GNU Affero General Public License</a> Version 3 oder einer späteren " | 9887 | "\">GNU Affero General Public License</a> Version 3 oder einer späteren " |
9910 | "Version lizenziert ist." | 9888 | "Version lizenziert ist." |
9911 | 9889 | ||
9912 | -#~ msgid "More recent contents from network" | ||
9913 | -#~ msgstr "Neueste Inhalte aus dem Netzwerk" | ||
9914 | - | ||
9915 | -#~ msgid "More viewed contents from network" | ||
9916 | -#~ msgstr "Meistgesehene Inhalte aus dem Netzwerk" | ||
9917 | - | ||
9918 | -#~ msgid "Most commented contents from network" | ||
9919 | -#~ msgstr "Meistkommentierte Inhalte aus dem Netzwerk" | ||
9920 | - | ||
9921 | -#~ msgid "More recent people from network" | ||
9922 | -#~ msgstr "Neuere Leute aus dem Netzwerk" | ||
9923 | - | ||
9924 | -#~ msgid "More active people from network" | ||
9925 | -#~ msgstr "Aktivere Leute aus dem Netzwerk" | ||
9926 | - | ||
9927 | -#~ msgid "More popular people from network" | ||
9928 | -#~ msgstr "Populärere Leute aus dem Netzwerk" | ||
9929 | - | ||
9930 | -#~ msgid "More recent communities from network" | ||
9931 | -#~ msgstr "Neuere Gemeinschaften aus dem Netzwerk" | ||
9932 | - | ||
9933 | -#~ msgid "More active communities from network" | ||
9934 | -#~ msgstr "Aktivere Gemeinschaften aus dem Netzwerk" | ||
9935 | - | ||
9936 | -#~ msgid "More popular communities from network" | ||
9937 | -#~ msgstr "Populärere Gemeinschaften aus dem Netzwerk" | ||
9938 | - | ||
9939 | -#, fuzzy | ||
9940 | -#~ msgid "More recent enterprises from network" | ||
9941 | -#~ msgstr "Neueste Inhalte aus dem Netzwerk" | ||
9942 | - | ||
9943 | -#, fuzzy | ||
9944 | -#~ msgid "More active enterprises from network" | ||
9945 | -#~ msgstr "Aktivere Leute aus dem Netzwerk" | ||
9946 | - | ||
9947 | -#, fuzzy | ||
9948 | -#~ msgid "More popular enterprises from network" | ||
9949 | -#~ msgstr "Populärere Leute aus dem Netzwerk" | ||
9950 | - | ||
9951 | #~ msgid "starting chat with %{name}" | 9890 | #~ msgid "starting chat with %{name}" |
9952 | #~ msgstr "starte Chat mit %{name}" | 9891 | #~ msgstr "starte Chat mit %{name}" |
9953 | 9892 |
po/it/noosfero-doc.po
@@ -3,18 +3,20 @@ | @@ -3,18 +3,20 @@ | ||
3 | # This file is distributed under the same license as noosfero itself. | 3 | # This file is distributed under the same license as noosfero itself. |
4 | # Daniela Feitosa <danielafeitos@colivre.coop.br>, 2012. | 4 | # Daniela Feitosa <danielafeitos@colivre.coop.br>, 2012. |
5 | # | 5 | # |
6 | -#, fuzzy | ||
7 | msgid "" | 6 | msgid "" |
8 | msgstr "" | 7 | msgstr "" |
9 | "Project-Id-Version: noosfero 0.36.6\n" | 8 | "Project-Id-Version: noosfero 0.36.6\n" |
10 | "POT-Creation-Date: 2013-12-10 15:48-0300\n" | 9 | "POT-Creation-Date: 2013-12-10 15:48-0300\n" |
11 | -"PO-Revision-Date: 2014-03-23 17:10-0300\n" | ||
12 | -"Last-Translator: Daniela Feitosa <danielafeitosa@colivre.coop.br>\n" | ||
13 | -"Language-Team: LANGUAGE TEAM <LL@li.org>\n" | ||
14 | -"Language: \n" | 10 | +"PO-Revision-Date: 2015-03-16 22:47+0200\n" |
11 | +"Last-Translator: TWS <tablettws@gmail.com>\n" | ||
12 | +"Language-Team: Italian " | ||
13 | +"<https://hosted.weblate.org/projects/noosfero/documentation/it/>\n" | ||
14 | +"Language: it\n" | ||
15 | "MIME-Version: 1.0\n" | 15 | "MIME-Version: 1.0\n" |
16 | "Content-Type: text/plain; charset=UTF-8\n" | 16 | "Content-Type: text/plain; charset=UTF-8\n" |
17 | "Content-Transfer-Encoding: 8bit\n" | 17 | "Content-Transfer-Encoding: 8bit\n" |
18 | +"Plural-Forms: nplurals=2; plural=n != 1;\n" | ||
19 | +"X-Generator: Weblate 2.3-dev\n" | ||
18 | 20 | ||
19 | #. type: Content of: <h1> | 21 | #. type: Content of: <h1> |
20 | #: doc/noosfero/plugins/send_email.en.xhtml:1 | 22 | #: doc/noosfero/plugins/send_email.en.xhtml:1 |
@@ -1274,7 +1276,7 @@ msgstr "" | @@ -1274,7 +1276,7 @@ msgstr "" | ||
1274 | #: doc/noosfero/user/sending-messages.en.xhtml:14 | 1276 | #: doc/noosfero/user/sending-messages.en.xhtml:14 |
1275 | #: doc/noosfero/user/sending-scraps.en.xhtml:13 | 1277 | #: doc/noosfero/user/sending-scraps.en.xhtml:13 |
1276 | msgid "Description" | 1278 | msgid "Description" |
1277 | -msgstr "" | 1279 | +msgstr "Descrizione" |
1278 | 1280 | ||
1279 | #. type: Content of: <ol><li> | 1281 | #. type: Content of: <ol><li> |
1280 | #: doc/noosfero/enterprise/editing-appearance.en.xhtml:18 | 1282 | #: doc/noosfero/enterprise/editing-appearance.en.xhtml:18 |
po/it/noosfero.po
@@ -7,28 +7,28 @@ msgid "" | @@ -7,28 +7,28 @@ msgid "" | ||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: 1.0-690-gcb6e853\n" | 8 | "Project-Id-Version: 1.0-690-gcb6e853\n" |
9 | "POT-Creation-Date: 2015-03-05 12:10-0300\n" | 9 | "POT-Creation-Date: 2015-03-05 12:10-0300\n" |
10 | -"PO-Revision-Date: 2014-10-30 14:14+0200\n" | ||
11 | -"Last-Translator: Michal Čihař <michal@cihar.com>\n" | ||
12 | -"Language-Team: Italian <https://hosted.weblate.org/projects/noosfero/" | ||
13 | -"noosfero/it/>\n" | 10 | +"PO-Revision-Date: 2015-03-16 23:06+0200\n" |
11 | +"Last-Translator: TWS <tablettws@gmail.com>\n" | ||
12 | +"Language-Team: Italian " | ||
13 | +"<https://hosted.weblate.org/projects/noosfero/noosfero/it/>\n" | ||
14 | "Language: it\n" | 14 | "Language: it\n" |
15 | "MIME-Version: 1.0\n" | 15 | "MIME-Version: 1.0\n" |
16 | "Content-Type: text/plain; charset=UTF-8\n" | 16 | "Content-Type: text/plain; charset=UTF-8\n" |
17 | "Content-Transfer-Encoding: 8bit\n" | 17 | "Content-Transfer-Encoding: 8bit\n" |
18 | "Plural-Forms: nplurals=2; plural=n != 1;\n" | 18 | "Plural-Forms: nplurals=2; plural=n != 1;\n" |
19 | -"X-Generator: Weblate 2.0-dev\n" | 19 | +"X-Generator: Weblate 2.3-dev\n" |
20 | 20 | ||
21 | #: app/models/approve_comment.rb:17 | 21 | #: app/models/approve_comment.rb:17 |
22 | msgid "Anonymous" | 22 | msgid "Anonymous" |
23 | -msgstr "" | 23 | +msgstr "Anonimo" |
24 | 24 | ||
25 | #: app/models/approve_comment.rb:25 app/models/approve_article.rb:17 | 25 | #: app/models/approve_comment.rb:25 app/models/approve_article.rb:17 |
26 | msgid "Article removed." | 26 | msgid "Article removed." |
27 | -msgstr "" | 27 | +msgstr "Articolo Rimosso." |
28 | 28 | ||
29 | #: app/models/approve_comment.rb:33 | 29 | #: app/models/approve_comment.rb:33 |
30 | msgid "New comment to article" | 30 | msgid "New comment to article" |
31 | -msgstr "" | 31 | +msgstr "Nuovo Commento nell'articolo" |
32 | 32 | ||
33 | #: app/models/approve_comment.rb:49 app/models/approve_comment.rb:51 | 33 | #: app/models/approve_comment.rb:49 app/models/approve_comment.rb:51 |
34 | msgid "%{requestor} commented on the article: %{linked_subject}." | 34 | msgid "%{requestor} commented on the article: %{linked_subject}." |
@@ -36,7 +36,7 @@ msgstr "" | @@ -36,7 +36,7 @@ msgstr "" | ||
36 | 36 | ||
37 | #: app/models/approve_comment.rb:55 app/models/approve_article.rb:77 | 37 | #: app/models/approve_comment.rb:55 app/models/approve_article.rb:77 |
38 | msgid "The article was removed." | 38 | msgid "The article was removed." |
39 | -msgstr "" | 39 | +msgstr "L'articolo è stato rimosso." |
40 | 40 | ||
41 | #: app/models/approve_comment.rb:81 | 41 | #: app/models/approve_comment.rb:81 |
42 | msgid "%{requestor} wants to comment the article: %{article}." | 42 | msgid "%{requestor} wants to comment the article: %{article}." |
@@ -50,6 +50,8 @@ msgstr "" | @@ -50,6 +50,8 @@ msgstr "" | ||
50 | msgid "" | 50 | msgid "" |
51 | "You need to login on %{system} in order to approve or reject this comment." | 51 | "You need to login on %{system} in order to approve or reject this comment." |
52 | msgstr "" | 52 | msgstr "" |
53 | +"Devi connetterti su %{system} per poter approvare oppure rigettare questo " | ||
54 | +"commento." | ||
53 | 55 | ||
54 | #: app/models/approve_comment.rb:94 | 56 | #: app/models/approve_comment.rb:94 |
55 | msgid "" | 57 | msgid "" |
@@ -58,14 +60,21 @@ msgid "" | @@ -58,14 +60,21 @@ msgid "" | ||
58 | "\n" | 60 | "\n" |
59 | "%{comment} " | 61 | "%{comment} " |
60 | msgstr "" | 62 | msgstr "" |
63 | +"Il tuo commento su questo articolo \"%{article}\" è stato approvato. Ecco " | ||
64 | +"qui il commento lasciato dall'Amministratore che ha approvato il tuo " | ||
65 | +"commentot:↵\n" | ||
66 | +"↵\n" | ||
67 | +"%{comment} " | ||
61 | 68 | ||
62 | #: app/models/approve_comment.rb:96 | 69 | #: app/models/approve_comment.rb:96 |
63 | msgid "Your request for comment the article \"%{article}\" was approved." | 70 | msgid "Your request for comment the article \"%{article}\" was approved." |
64 | msgstr "" | 71 | msgstr "" |
72 | +"La richiesta per commentare questo articolo \"%{article}\" è stata approvata." | ||
65 | 73 | ||
66 | #: app/models/approve_comment.rb:101 | 74 | #: app/models/approve_comment.rb:101 |
67 | msgid "Your request for commenting the article \"%{article}\" was rejected." | 75 | msgid "Your request for commenting the article \"%{article}\" was rejected." |
68 | msgstr "" | 76 | msgstr "" |
77 | +"La richiesta per commentare questo articolo \"%{article}\" è stata rigettata." | ||
69 | 78 | ||
70 | #: app/models/approve_comment.rb:103 | 79 | #: app/models/approve_comment.rb:103 |
71 | msgid "" | 80 | msgid "" |
@@ -74,6 +83,10 @@ msgid "" | @@ -74,6 +83,10 @@ msgid "" | ||
74 | "\n" | 83 | "\n" |
75 | "%{reject_explanation}" | 84 | "%{reject_explanation}" |
76 | msgstr "" | 85 | msgstr "" |
86 | +"Ecco la spiegazione del rigetto lasciata dall' Amministratore che ha " | ||
87 | +"rigettato il tuo commento: ↵\n" | ||
88 | +"↵\n" | ||
89 | +"%{reject_explanation}" | ||
77 | 90 | ||
78 | #: app/models/comment.rb:4 app/models/article.rb:171 | 91 | #: app/models/comment.rb:4 app/models/article.rb:171 |
79 | #: app/views/content_viewer/_comment_form.html.erb:70 | 92 | #: app/views/content_viewer/_comment_form.html.erb:70 |
@@ -91,7 +104,7 @@ msgstr "" | @@ -91,7 +104,7 @@ msgstr "" | ||
91 | #: app/views/cms/publish.html.erb:43 app/views/cms/publish.html.erb:59 | 104 | #: app/views/cms/publish.html.erb:43 app/views/cms/publish.html.erb:59 |
92 | #: app/views/comment/_comment_form.html.erb:77 | 105 | #: app/views/comment/_comment_form.html.erb:77 |
93 | msgid "Title" | 106 | msgid "Title" |
94 | -msgstr "" | 107 | +msgstr "Titolo" |
95 | 108 | ||
96 | #: app/models/comment.rb:5 app/models/product.rb:4 app/models/category.rb:6 | 109 | #: app/models/comment.rb:5 app/models/product.rb:4 app/models/category.rb:6 |
97 | #: app/models/article.rb:16 app/models/profile.rb:15 | 110 | #: app/models/article.rb:16 app/models/profile.rb:15 |
@@ -111,12 +124,12 @@ msgstr "" | @@ -111,12 +124,12 @@ msgstr "" | ||
111 | #: app/views/enterprise_validation/_details.html.erb:3 | 124 | #: app/views/enterprise_validation/_details.html.erb:3 |
112 | #: app/views/contact/sender/notification.html.erb:11 | 125 | #: app/views/contact/sender/notification.html.erb:11 |
113 | msgid "Name" | 126 | msgid "Name" |
114 | -msgstr "" | 127 | +msgstr "Nome" |
115 | 128 | ||
116 | #: app/models/comment.rb:6 app/models/article.rb:18 app/models/article.rb:38 | 129 | #: app/models/comment.rb:6 app/models/article.rb:18 app/models/article.rb:38 |
117 | #: app/models/scrap.rb:6 | 130 | #: app/models/scrap.rb:6 |
118 | msgid "Content" | 131 | msgid "Content" |
119 | -msgstr "" | 132 | +msgstr "Contenuto" |
120 | 133 | ||
121 | #: app/models/comment.rb:32 | 134 | #: app/models/comment.rb:32 |
122 | msgid "{fn} can only be informed for unauthenticated authors" | 135 | msgid "{fn} can only be informed for unauthenticated authors" |
@@ -124,11 +137,11 @@ msgstr "" | @@ -124,11 +137,11 @@ msgstr "" | ||
124 | 137 | ||
125 | #: app/models/comment.rb:71 | 138 | #: app/models/comment.rb:71 |
126 | msgid "(removed user)" | 139 | msgid "(removed user)" |
127 | -msgstr "" | 140 | +msgstr "(utente rimosso)" |
128 | 141 | ||
129 | #: app/models/comment.rb:71 | 142 | #: app/models/comment.rb:71 |
130 | msgid "(unauthenticated user)" | 143 | msgid "(unauthenticated user)" |
131 | -msgstr "" | 144 | +msgstr "(utente non autenticato)" |
132 | 145 | ||
133 | #: app/models/product.rb:5 app/models/organization.rb:108 | 146 | #: app/models/product.rb:5 app/models/organization.rb:108 |
134 | #: app/models/certifier.rb:7 app/views/search/_article_description.html.erb:4 | 147 | #: app/models/certifier.rb:7 app/views/search/_article_description.html.erb:4 |
@@ -137,120 +150,129 @@ msgstr "" | @@ -137,120 +150,129 @@ msgstr "" | ||
137 | #: app/views/cms/_uploaded_file.html.erb:5 | 150 | #: app/views/cms/_uploaded_file.html.erb:5 |
138 | #: app/views/manage_products/show.html.erb:32 | 151 | #: app/views/manage_products/show.html.erb:32 |
139 | msgid "Description" | 152 | msgid "Description" |
140 | -msgstr "" | 153 | +msgstr "Descrizione" |
141 | 154 | ||
142 | #: app/models/product.rb:104 app/helpers/display_helper.rb:42 | 155 | #: app/models/product.rb:104 app/helpers/display_helper.rb:42 |
143 | #: app/helpers/display_helper.rb:51 | 156 | #: app/helpers/display_helper.rb:51 |
144 | msgid "Uncategorized product" | 157 | msgid "Uncategorized product" |
145 | -msgstr "" | 158 | +msgstr "Prodotto senza categoria" |
146 | 159 | ||
147 | #: app/models/product.rb:244 | 160 | #: app/models/product.rb:244 |
148 | msgid "0%" | 161 | msgid "0%" |
149 | -msgstr "" | 162 | +msgstr "0%" |
150 | 163 | ||
151 | #: app/models/product.rb:245 | 164 | #: app/models/product.rb:245 |
152 | msgid "25%" | 165 | msgid "25%" |
153 | -msgstr "" | 166 | +msgstr "25%" |
154 | 167 | ||
155 | #: app/models/product.rb:246 | 168 | #: app/models/product.rb:246 |
156 | msgid "50%" | 169 | msgid "50%" |
157 | -msgstr "" | 170 | +msgstr "50%" |
158 | 171 | ||
159 | #: app/models/product.rb:247 | 172 | #: app/models/product.rb:247 |
160 | msgid "75%" | 173 | msgid "75%" |
161 | -msgstr "" | 174 | +msgstr "75%" |
162 | 175 | ||
163 | #: app/models/product.rb:248 | 176 | #: app/models/product.rb:248 |
164 | msgid "100%" | 177 | msgid "100%" |
165 | -msgstr "" | 178 | +msgstr "100%" |
166 | 179 | ||
167 | #: app/models/invite_member.rb:20 | 180 | #: app/models/invite_member.rb:20 |
168 | msgid "Community invitation" | 181 | msgid "Community invitation" |
169 | -msgstr "" | 182 | +msgstr "Invito della Comunità" |
170 | 183 | ||
171 | #: app/models/invite_member.rb:28 | 184 | #: app/models/invite_member.rb:28 |
172 | msgid "%{requestor} invited you to join %{linked_subject}." | 185 | msgid "%{requestor} invited you to join %{linked_subject}." |
173 | -msgstr "" | 186 | +msgstr "%{requestor} sei stato invitato ad entrare %{linked_subject}." |
174 | 187 | ||
175 | #: app/models/invite_member.rb:40 | 188 | #: app/models/invite_member.rb:40 |
176 | msgid "%{requestor} invited you to join %{community}." | 189 | msgid "%{requestor} invited you to join %{community}." |
177 | msgstr "" | 190 | msgstr "" |
191 | +"%{requestor} sei stato invitato ad entrare nella comunità %{community}.." | ||
178 | 192 | ||
179 | #: app/models/invite_member.rb:45 | 193 | #: app/models/invite_member.rb:45 |
180 | msgid "%{requestor} is inviting you to join \"%{community}\" on %{system}." | 194 | msgid "%{requestor} is inviting you to join \"%{community}\" on %{system}." |
181 | msgstr "" | 195 | msgstr "" |
196 | +"%{requestor} sei stato invitato a far parte della comunità \"%{community}\" " | ||
197 | +"nel sistema %{system}." | ||
182 | 198 | ||
183 | #: app/models/invite_member.rb:57 app/models/invite_friend.rb:37 | 199 | #: app/models/invite_member.rb:57 app/models/invite_friend.rb:37 |
184 | msgid "Hello <friend>," | 200 | msgid "Hello <friend>," |
185 | -msgstr "" | 201 | +msgstr "Ciao <amico>," |
186 | 202 | ||
187 | #: app/models/invite_member.rb:58 | 203 | #: app/models/invite_member.rb:58 |
188 | msgid "<user> is inviting you to join \"<community>\" on <environment>." | 204 | msgid "<user> is inviting you to join \"<community>\" on <environment>." |
189 | msgstr "" | 205 | msgstr "" |
206 | +"<user> è stato invitato a far parte della comunità \"<community>\" su " | ||
207 | +"<environment>." | ||
190 | 208 | ||
191 | #: app/models/invite_member.rb:59 app/models/invite_friend.rb:39 | 209 | #: app/models/invite_member.rb:59 app/models/invite_friend.rb:39 |
192 | msgid "To accept the invitation, please follow this link:" | 210 | msgid "To accept the invitation, please follow this link:" |
193 | -msgstr "" | 211 | +msgstr "Per accettare questo invito, segui questo link per favore:" |
194 | 212 | ||
195 | #: app/models/my_network_block.rb:6 app/models/my_network_block.rb:10 | 213 | #: app/models/my_network_block.rb:6 app/models/my_network_block.rb:10 |
196 | msgid "My network" | 214 | msgid "My network" |
197 | -msgstr "" | 215 | +msgstr "La mia Rete" |
198 | 216 | ||
199 | #: app/models/my_network_block.rb:14 | 217 | #: app/models/my_network_block.rb:14 |
200 | msgid "This block displays some info about your networking." | 218 | msgid "This block displays some info about your networking." |
201 | -msgstr "" | 219 | +msgstr "Questo blocco mostra alcune informazioni riguardo la tua Rete." |
202 | 220 | ||
203 | #: app/models/sellers_search_block.rb:6 | 221 | #: app/models/sellers_search_block.rb:6 |
204 | msgid "Search for enterprises and products" | 222 | msgid "Search for enterprises and products" |
205 | -msgstr "" | 223 | +msgstr "Ricerca per Prodotti e Aziende" |
206 | 224 | ||
207 | #: app/models/sellers_search_block.rb:10 | 225 | #: app/models/sellers_search_block.rb:10 |
208 | msgid "Products/Enterprises search" | 226 | msgid "Products/Enterprises search" |
209 | -msgstr "" | 227 | +msgstr "Ricerca Prodotti o di Aziende" |
210 | 228 | ||
211 | #: app/models/sellers_search_block.rb:14 | 229 | #: app/models/sellers_search_block.rb:14 |
212 | msgid "Search for sellers" | 230 | msgid "Search for sellers" |
213 | -msgstr "" | 231 | +msgstr "Ricerca per Venditori" |
214 | 232 | ||
215 | #: app/models/sellers_search_block.rb:18 | 233 | #: app/models/sellers_search_block.rb:18 |
216 | msgid "This block presents a search engine for products." | 234 | msgid "This block presents a search engine for products." |
217 | -msgstr "" | 235 | +msgstr "Questo blocco presenta un motore di ricerca per prodotti." |
218 | 236 | ||
219 | #: app/models/categories_block.rb:4 | 237 | #: app/models/categories_block.rb:4 |
220 | msgid "Generic category" | 238 | msgid "Generic category" |
221 | -msgstr "" | 239 | +msgstr "Categoria Generica" |
222 | 240 | ||
223 | #: app/models/categories_block.rb:5 app/helpers/categories_helper.rb:6 | 241 | #: app/models/categories_block.rb:5 app/helpers/categories_helper.rb:6 |
224 | #: app/views/enterprise_registration/basic_information.html.erb:25 | 242 | #: app/views/enterprise_registration/basic_information.html.erb:25 |
225 | msgid "Region" | 243 | msgid "Region" |
226 | -msgstr "" | 244 | +msgstr "Regione" |
227 | 245 | ||
228 | #: app/models/categories_block.rb:6 app/views/manage_products/index.html.erb:5 | 246 | #: app/models/categories_block.rb:6 app/views/manage_products/index.html.erb:5 |
229 | msgid "Product" | 247 | msgid "Product" |
230 | -msgstr "" | 248 | +msgstr "Prodotto" |
231 | 249 | ||
232 | #: app/models/categories_block.rb:14 app/models/categories_block.rb:18 | 250 | #: app/models/categories_block.rb:14 app/models/categories_block.rb:18 |
233 | msgid "Categories Menu" | 251 | msgid "Categories Menu" |
234 | -msgstr "" | 252 | +msgstr "Menu Categorie" |
235 | 253 | ||
236 | #: app/models/categories_block.rb:22 | 254 | #: app/models/categories_block.rb:22 |
237 | msgid "This block presents the categories like a web site menu." | 255 | msgid "This block presents the categories like a web site menu." |
238 | -msgstr "" | 256 | +msgstr "Questo blocco presenta le categorie come un menu di un sito Internet." |
239 | 257 | ||
240 | #: app/models/contact_list.rb:18 | 258 | #: app/models/contact_list.rb:18 |
241 | msgid "" | 259 | msgid "" |
242 | "There was an error while authenticating. Did you enter correct login and " | 260 | "There was an error while authenticating. Did you enter correct login and " |
243 | "password?" | 261 | "password?" |
244 | msgstr "" | 262 | msgstr "" |
263 | +"C'è stato un errore durante l'autenticazione. Hai utilizzato la giusta Login " | ||
264 | +"e Password?" | ||
245 | 265 | ||
246 | #: app/models/contact_list.rb:25 | 266 | #: app/models/contact_list.rb:25 |
247 | msgid "" | 267 | msgid "" |
248 | "There was an error while looking for your contact list. Please, try again" | 268 | "There was an error while looking for your contact list. Please, try again" |
249 | msgstr "" | 269 | msgstr "" |
270 | +"C'è stato un errore mentre cercavi la tua lista di contatti. Per favore, " | ||
271 | +"prova ancora" | ||
250 | 272 | ||
251 | #: app/models/uploaded_file.rb:12 | 273 | #: app/models/uploaded_file.rb:12 |
252 | msgid "File" | 274 | msgid "File" |
253 | -msgstr "" | 275 | +msgstr "File (Documento)" |
254 | 276 | ||
255 | #: app/models/uploaded_file.rb:72 | 277 | #: app/models/uploaded_file.rb:72 |
256 | msgid "{fn} of uploaded file was larger than the maximum size of %{size}" | 278 | msgid "{fn} of uploaded file was larger than the maximum size of %{size}" |
@@ -258,47 +280,47 @@ msgstr "" | @@ -258,47 +280,47 @@ msgstr "" | ||
258 | 280 | ||
259 | #: app/models/uploaded_file.rb:99 | 281 | #: app/models/uploaded_file.rb:99 |
260 | msgid "Uploaded file" | 282 | msgid "Uploaded file" |
261 | -msgstr "" | 283 | +msgstr "File Caricato" |
262 | 284 | ||
263 | #: app/models/uploaded_file.rb:103 | 285 | #: app/models/uploaded_file.rb:103 |
264 | msgid "Upload any kind of file you want." | 286 | msgid "Upload any kind of file you want." |
265 | -msgstr "" | 287 | +msgstr "Carica qualunque tipo di File (Documento) che vuoi." |
266 | 288 | ||
267 | #: app/models/invite_friend.rb:12 | 289 | #: app/models/invite_friend.rb:12 |
268 | msgid "Friend invitation" | 290 | msgid "Friend invitation" |
269 | -msgstr "" | 291 | +msgstr "Invito di un Amico" |
270 | 292 | ||
271 | #: app/models/invite_friend.rb:16 app/models/invite_friend.rb:28 | 293 | #: app/models/invite_friend.rb:16 app/models/invite_friend.rb:28 |
272 | #: app/models/add_friend.rb:32 app/models/add_friend.rb:45 | 294 | #: app/models/add_friend.rb:32 app/models/add_friend.rb:45 |
273 | msgid "%{requestor} wants to be your friend." | 295 | msgid "%{requestor} wants to be your friend." |
274 | -msgstr "" | 296 | +msgstr "%{requestor} vuole essere tuo amico." |
275 | 297 | ||
276 | #: app/models/invite_friend.rb:38 | 298 | #: app/models/invite_friend.rb:38 |
277 | msgid "<user> is inviting you to participate on <environment>." | 299 | msgid "<user> is inviting you to participate on <environment>." |
278 | -msgstr "" | 300 | +msgstr "<user> ti sta invitanto a partecipare a <environment>." |
279 | 301 | ||
280 | #: app/models/fans_block.rb:4 | 302 | #: app/models/fans_block.rb:4 |
281 | msgid "Displays the people who like the enterprise" | 303 | msgid "Displays the people who like the enterprise" |
282 | -msgstr "" | 304 | +msgstr "Mostra le persone a cui piace la Società" |
283 | 305 | ||
284 | #: app/models/fans_block.rb:8 | 306 | #: app/models/fans_block.rb:8 |
285 | msgid "{#} fan" | 307 | msgid "{#} fan" |
286 | msgid_plural "{#} fans" | 308 | msgid_plural "{#} fans" |
287 | -msgstr[0] "" | ||
288 | -msgstr[1] "" | 309 | +msgstr[0] "{#} Ammiratore" |
310 | +msgstr[1] "{#} Ammiratori" | ||
289 | 311 | ||
290 | #: app/models/fans_block.rb:12 | 312 | #: app/models/fans_block.rb:12 |
291 | msgid "This block presents the fans of an enterprise." | 313 | msgid "This block presents the fans of an enterprise." |
292 | -msgstr "" | 314 | +msgstr "Questo blocco presenta gli ammiratori di una Società." |
293 | 315 | ||
294 | #: app/models/fans_block.rb:18 app/models/favorite_enterprises_block.rb:19 | 316 | #: app/models/fans_block.rb:18 app/models/favorite_enterprises_block.rb:19 |
295 | #: app/views/cms/_published_media_items.html.erb:7 | 317 | #: app/views/cms/_published_media_items.html.erb:7 |
296 | msgid "View all" | 318 | msgid "View all" |
297 | -msgstr "" | 319 | +msgstr "Mostra Tutto" |
298 | 320 | ||
299 | #: app/models/slideshow_block.rb:12 | 321 | #: app/models/slideshow_block.rb:12 |
300 | msgid "Slideshow" | 322 | msgid "Slideshow" |
301 | -msgstr "" | 323 | +msgstr "Presentazione" |
302 | 324 | ||
303 | #: app/models/featured_products_block.rb:20 | 325 | #: app/models/featured_products_block.rb:20 |
304 | #: app/views/box_organizer/_featured_products_block.html.erb:1 | 326 | #: app/views/box_organizer/_featured_products_block.html.erb:1 |
po/pt/noosfero.po
@@ -13,8 +13,8 @@ msgid "" | @@ -13,8 +13,8 @@ msgid "" | ||
13 | msgstr "" | 13 | msgstr "" |
14 | "Project-Id-Version: 1.0-690-gcb6e853\n" | 14 | "Project-Id-Version: 1.0-690-gcb6e853\n" |
15 | "POT-Creation-Date: 2015-03-05 12:10-0300\n" | 15 | "POT-Creation-Date: 2015-03-05 12:10-0300\n" |
16 | -"PO-Revision-Date: 2015-03-14 22:06+0200\n" | ||
17 | -"Last-Translator: daniel <dtygel@eita.org.br>\n" | 16 | +"PO-Revision-Date: 2015-03-17 21:44+0200\n" |
17 | +"Last-Translator: Evandro Junior <evandrojr@gmail.com>\n" | ||
18 | "Language-Team: Portuguese " | 18 | "Language-Team: Portuguese " |
19 | "<https://hosted.weblate.org/projects/noosfero/noosfero/pt/>\n" | 19 | "<https://hosted.weblate.org/projects/noosfero/noosfero/pt/>\n" |
20 | "Language: pt\n" | 20 | "Language: pt\n" |
@@ -1635,7 +1635,7 @@ msgstr "" | @@ -1635,7 +1635,7 @@ msgstr "" | ||
1635 | "não foi aprovada pelo administrador do ambiente. A seguinte explicação foi " | 1635 | "não foi aprovada pelo administrador do ambiente. A seguinte explicação foi " |
1636 | "dada: \n" | 1636 | "dada: \n" |
1637 | "\n" | 1637 | "\n" |
1638 | -"%{explication}" | 1638 | +"%{explanation}" |
1639 | 1639 | ||
1640 | #: app/models/create_community.rb:92 | 1640 | #: app/models/create_community.rb:92 |
1641 | msgid "" | 1641 | msgid "" |
@@ -1946,7 +1946,7 @@ msgstr "" | @@ -1946,7 +1946,7 @@ msgstr "" | ||
1946 | "%{environment} NÃO foi aprovada pelo validador de organização. A seguinte " | 1946 | "%{environment} NÃO foi aprovada pelo validador de organização. A seguinte " |
1947 | "explicação foi dada: \n" | 1947 | "explicação foi dada: \n" |
1948 | "\n" | 1948 | "\n" |
1949 | -"%{explication}" | 1949 | +"%{explanation}" |
1950 | 1950 | ||
1951 | #: app/models/create_enterprise.rb:187 | 1951 | #: app/models/create_enterprise.rb:187 |
1952 | msgid "" | 1952 | msgid "" |
public/javascripts/application.js
@@ -1128,4 +1128,11 @@ function stop_fetching(element){ | @@ -1128,4 +1128,11 @@ function stop_fetching(element){ | ||
1128 | jQuery('.fetching-overlay', element).remove(); | 1128 | jQuery('.fetching-overlay', element).remove(); |
1129 | } | 1129 | } |
1130 | 1130 | ||
1131 | +function add_new_file_fields() { | ||
1132 | + var cloned = jQuery('#uploaded_files p:last').clone(); | ||
1133 | + cloned.find("input[type='file']").val(''); | ||
1134 | + cloned.appendTo('#uploaded_files'); | ||
1135 | + jQuery('body').scrollTo(cloned); | ||
1136 | +} | ||
1137 | + | ||
1131 | window.isHidden = function isHidden() { return (typeof(document.hidden) != 'undefined') ? document.hidden : !document.hasFocus() }; | 1138 | window.isHidden = function isHidden() { return (typeof(document.hidden) != 'undefined') ? document.hidden : !document.hasFocus() }; |
test/functional/profile_design_controller_test.rb
@@ -755,4 +755,12 @@ class ProfileDesignControllerTest < ActionController::TestCase | @@ -755,4 +755,12 @@ class ProfileDesignControllerTest < ActionController::TestCase | ||
755 | assert_response :forbidden | 755 | assert_response :forbidden |
756 | end | 756 | end |
757 | 757 | ||
758 | + should 'guarantee main block is always visible to everybody' do | ||
759 | + get :edit, :profile => 'designtestuser', :id => @b4.id | ||
760 | + %w[logged not_logged followers].each do |option| | ||
761 | + assert_no_tag :select, :attributes => {:name => 'block[display_user]'}, | ||
762 | + :descendant => {:tag => 'option', :attributes => {:value => option}} | ||
763 | + end | ||
764 | + end | ||
765 | + | ||
758 | end | 766 | end |
test/unit/add_friend_test.rb
@@ -77,9 +77,9 @@ class AddFriendTest < ActiveSupport::TestCase | @@ -77,9 +77,9 @@ class AddFriendTest < ActiveSupport::TestCase | ||
77 | end | 77 | end |
78 | 78 | ||
79 | should 'not add friend twice' do | 79 | should 'not add friend twice' do |
80 | - fast_create(AddFriend, :requestor_id => person1.id, :target_id => person2.id) | 80 | + create AddFriend, person: person1, friend: person2, status: 1 |
81 | assert_raise ActiveRecord::RecordInvalid do | 81 | assert_raise ActiveRecord::RecordInvalid do |
82 | - AddFriend.create!(:person => person1, :friend => person2) | 82 | + create AddFriend, person: person1, friend: person2, status: 1 |
83 | end | 83 | end |
84 | end | 84 | end |
85 | 85 |
test/unit/main_block_test.rb
@@ -29,4 +29,8 @@ class MainBlockTest < ActiveSupport::TestCase | @@ -29,4 +29,8 @@ class MainBlockTest < ActiveSupport::TestCase | ||
29 | assert !block.visible? | 29 | assert !block.visible? |
30 | end | 30 | end |
31 | 31 | ||
32 | + should 'guarantee main block is always visible to everybody' do | ||
33 | + assert_equal MainBlock.new.display_user_options, {"all"=>_('All users')} | ||
34 | + end | ||
35 | + | ||
32 | end | 36 | end |
test/unit/person_test.rb
@@ -324,7 +324,9 @@ class PersonTest < ActiveSupport::TestCase | @@ -324,7 +324,9 @@ class PersonTest < ActiveSupport::TestCase | ||
324 | should 'already request friendship' do | 324 | should 'already request friendship' do |
325 | p1 = create_user('testuser1').person | 325 | p1 = create_user('testuser1').person |
326 | p2 = create_user('testuser2').person | 326 | p2 = create_user('testuser2').person |
327 | - create(AddFriend, :person => p1, :friend => p2) | 327 | + create(AddFriend, person: p1, friend: p2).finish |
328 | + assert !p1.already_request_friendship?(p2) | ||
329 | + create(AddFriend, person: p1, friend: p2) | ||
328 | assert p1.already_request_friendship?(p2) | 330 | assert p1.already_request_friendship?(p2) |
329 | end | 331 | end |
330 | 332 |