Commit ff59cf7fe8a9e6bb47989bfcda908910688428ae
Exists in
master
and in
29 other branches
Merge branch 'stable' of https://gitlab.com/noosfero/noosfero into stable
Showing
11 changed files
with
122 additions
and
67 deletions
Show diff stats
app/controllers/public/events_controller.rb
@@ -7,11 +7,11 @@ class EventsController < PublicController | @@ -7,11 +7,11 @@ class EventsController < PublicController | ||
7 | @date = build_date(params[:year], params[:month], params[:day]) | 7 | @date = build_date(params[:year], params[:month], params[:day]) |
8 | 8 | ||
9 | if !params[:year] && !params[:month] && !params[:day] | 9 | if !params[:year] && !params[:month] && !params[:day] |
10 | - @events = profile.events.next_events_from_month(@date) | 10 | + @events = profile.events.next_events_from_month(@date).paginate(:per_page => per_page, :page => params[:page]) |
11 | end | 11 | end |
12 | 12 | ||
13 | if params[:year] || params[:month] | 13 | if params[:year] || params[:month] |
14 | - @events = profile.events.by_month(@date) | 14 | + @events = profile.events.by_month(@date).paginate(:per_page => per_page, :page => params[:page]) |
15 | end | 15 | end |
16 | 16 | ||
17 | events_in_range = profile.events.by_range((@date - 1.month).at_beginning_of_month .. (@date + 1.month).at_end_of_month) | 17 | events_in_range = profile.events.by_range((@date - 1.month).at_beginning_of_month .. (@date + 1.month).at_end_of_month) |
@@ -29,4 +29,7 @@ class EventsController < PublicController | @@ -29,4 +29,7 @@ class EventsController < PublicController | ||
29 | 29 | ||
30 | include EventsHelper | 30 | include EventsHelper |
31 | 31 | ||
32 | + def per_page | ||
33 | + 20 | ||
34 | + end | ||
32 | end | 35 | end |
app/controllers/public/search_controller.rb
@@ -99,14 +99,14 @@ class SearchController < PublicController | @@ -99,14 +99,14 @@ class SearchController < PublicController | ||
99 | @events = [] | 99 | @events = [] |
100 | if params[:day] || !params[:year] && !params[:month] | 100 | if params[:day] || !params[:year] && !params[:month] |
101 | @events = @category ? | 101 | @events = @category ? |
102 | - environment.events.by_day(@date).in_category(Category.find(@category_id)) : | ||
103 | - environment.events.by_day(@date) | 102 | + environment.events.by_day(@date).in_category(Category.find(@category_id)).paginate(:per_page => per_page, :page => params[:page]) : |
103 | + environment.events.by_day(@date).paginate(:per_page => per_page, :page => params[:page]) | ||
104 | end | 104 | end |
105 | 105 | ||
106 | if params[:year] || params[:month] | 106 | if params[:year] || params[:month] |
107 | @events = @category ? | 107 | @events = @category ? |
108 | - environment.events.by_month(@date).in_category(Category.find(@category_id)) : | ||
109 | - environment.events.by_month(@date) | 108 | + environment.events.by_month(@date).in_category(Category.find(@category_id)).paginate(:per_page => per_page, :page => params[:page]) : |
109 | + environment.events.by_month(@date).paginate(:per_page => per_page, :page => params[:page]) | ||
110 | end | 110 | end |
111 | 111 | ||
112 | @scope = date_range && params[:action] == 'events' ? environment.events.by_range(date_range) : environment.events | 112 | @scope = date_range && params[:action] == 'events' ? environment.events.by_range(date_range) : environment.events |
@@ -139,7 +139,7 @@ class SearchController < PublicController | @@ -139,7 +139,7 @@ class SearchController < PublicController | ||
139 | 139 | ||
140 | def events_by_day | 140 | def events_by_day |
141 | @date = build_date(params[:year], params[:month], params[:day]) | 141 | @date = build_date(params[:year], params[:month], params[:day]) |
142 | - @events = environment.events.by_day(@date) | 142 | + @events = environment.events.by_day(@date).paginate(:per_page => per_page, :page => params[:page]) |
143 | render :partial => 'events/events' | 143 | render :partial => 'events/events' |
144 | end | 144 | end |
145 | 145 | ||
@@ -224,4 +224,8 @@ class SearchController < PublicController | @@ -224,4 +224,8 @@ class SearchController < PublicController | ||
224 | @environment.send(klass.name.underscore.pluralize).visible.includes(relations) | 224 | @environment.send(klass.name.underscore.pluralize).visible.includes(relations) |
225 | end | 225 | end |
226 | 226 | ||
227 | + def per_page | ||
228 | + 20 | ||
229 | + end | ||
230 | + | ||
227 | end | 231 | end |
app/models/event.rb
@@ -38,15 +38,12 @@ class Event < Article | @@ -38,15 +38,12 @@ class Event < Article | ||
38 | named_scope :next_events_from_month, lambda { |date| | 38 | named_scope :next_events_from_month, lambda { |date| |
39 | date_temp = date.strftime("%Y-%m-%d") | 39 | date_temp = date.strftime("%Y-%m-%d") |
40 | { :conditions => ["start_date >= ?","#{date_temp}"], | 40 | { :conditions => ["start_date >= ?","#{date_temp}"], |
41 | - :limit => 10, | ||
42 | :order => 'start_date ASC' | 41 | :order => 'start_date ASC' |
43 | } | 42 | } |
44 | } | 43 | } |
45 | 44 | ||
46 | named_scope :by_month, lambda { |date| | 45 | named_scope :by_month, lambda { |date| |
47 | - date_temp = date.strftime("%Y-%m") | ||
48 | { :conditions => ["EXTRACT(YEAR FROM start_date) = ? AND EXTRACT(MONTH FROM start_date) = ?",date.year,date.month], | 46 | { :conditions => ["EXTRACT(YEAR FROM start_date) = ? AND EXTRACT(MONTH FROM start_date) = ?",date.year,date.month], |
49 | - :limit => 10, | ||
50 | :order => 'start_date ASC' | 47 | :order => 'start_date ASC' |
51 | } | 48 | } |
52 | } | 49 | } |
app/views/events/_events.rhtml
features/events.feature
@@ -244,3 +244,38 @@ Feature: events | @@ -244,3 +244,38 @@ Feature: events | ||
244 | Given I am on /profile/josesilva/events/2009/10 | 244 | Given I am on /profile/josesilva/events/2009/10 |
245 | When I follow "Oktoberfest" | 245 | When I follow "Oktoberfest" |
246 | Then I should see "Oktoberfest" | 246 | Then I should see "Oktoberfest" |
247 | + | ||
248 | + Scenario: list events paginated for a specific profile for the month | ||
249 | + Given I am logged in as admin | ||
250 | + And the following users | ||
251 | + | login | | ||
252 | + | josemanuel | | ||
253 | + And I am logged in as "josemanuel" | ||
254 | + And the following events | ||
255 | + | owner | name | start_date | | ||
256 | + | josemanuel | Event 5 | 2009-10-12 | | ||
257 | + | josemanuel | Event 3 | 2009-10-15 | | ||
258 | + | josemanuel | Test Event | 2009-10-15 | | ||
259 | + | josemanuel | Oktoberfest | 2009-10-19 | | ||
260 | + | josemanuel | WikiSym | 2009-10-21 | | ||
261 | + | josemanuel | Free Software | 2009-10-22 | | ||
262 | + | josemanuel | Rachel Birthday | 2009-10-23 | | ||
263 | + | josemanuel | Manuel Birthday | 2009-10-24 | | ||
264 | + | josemanuel | Michelle Birthday | 2009-10-25 | | ||
265 | + | josemanuel | Lecture Allien 10 | 2009-10-26 | | ||
266 | + | josemanuel | Lecture Allien 11 | 2009-10-26 | | ||
267 | + | josemanuel | Lecture Allien 12 | 2009-10-26 | | ||
268 | + | josemanuel | Lecture Allien 13 | 2009-10-26 | | ||
269 | + | josemanuel | Lecture Allien 14 | 2009-10-26 | | ||
270 | + | josemanuel | Lecture Allien 15 | 2009-10-26 | | ||
271 | + | josemanuel | Lecture Allien 16 | 2009-10-26 | | ||
272 | + | josemanuel | Lecture Allien 17 | 2009-10-26 | | ||
273 | + | josemanuel | Lecture Allien 18 | 2009-10-26 | | ||
274 | + | josemanuel | Lecture Allien 19 | 2009-10-26 | | ||
275 | + | josemanuel | Lecture Allien 20 | 2009-10-26 | | ||
276 | + | josemanuel | Party On | 2009-10-27 | | ||
277 | + | ||
278 | + When I am on /profile/josemanuel/events/2009/10 | ||
279 | + Then I should not see "Party On" within "#agenda-items" | ||
280 | + When I follow "Next" | ||
281 | + Then I should see "Party On" within "#agenda-items" |
po/eo/noosfero.po
@@ -7,7 +7,7 @@ msgid "" | @@ -7,7 +7,7 @@ msgid "" | ||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: noosfero 0.45.2\n" | 8 | "Project-Id-Version: noosfero 0.45.2\n" |
9 | "POT-Creation-Date: 2014-01-17 18:26-0000\n" | 9 | "POT-Creation-Date: 2014-01-17 18:26-0000\n" |
10 | -"PO-Revision-Date: 2011-03-30 20:52-0300\n" | 10 | +"PO-Revision-Date: 2014-03-25 15:35+0000\n" |
11 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" | 11 | "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" |
12 | "Language-Team: LANGUAGE <LL@li.org>\n" | 12 | "Language-Team: LANGUAGE <LL@li.org>\n" |
13 | "Language: \n" | 13 | "Language: \n" |
@@ -107,7 +107,7 @@ msgstr "" | @@ -107,7 +107,7 @@ msgstr "" | ||
107 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25 | 107 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25 |
108 | #: app/views/profile/_private_profile.rhtml:10 | 108 | #: app/views/profile/_private_profile.rhtml:10 |
109 | msgid "Join" | 109 | msgid "Join" |
110 | -msgstr "" | 110 | +msgstr "Eniri" |
111 | 111 | ||
112 | #: app/helpers/application_helper.rb:554 | 112 | #: app/helpers/application_helper.rb:554 |
113 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4 | 113 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4 |
@@ -291,7 +291,7 @@ msgstr "" | @@ -291,7 +291,7 @@ msgstr "" | ||
291 | 291 | ||
292 | #: app/helpers/application_helper.rb:1118 | 292 | #: app/helpers/application_helper.rb:1118 |
293 | msgid "See all" | 293 | msgid "See all" |
294 | -msgstr "" | 294 | +msgstr "Vidi ĉiujn" |
295 | 295 | ||
296 | #: app/helpers/application_helper.rb:1121 | 296 | #: app/helpers/application_helper.rb:1121 |
297 | msgid "<span>Manage</span> %s" | 297 | msgid "<span>Manage</span> %s" |
@@ -678,11 +678,11 @@ msgstr "" | @@ -678,11 +678,11 @@ msgstr "" | ||
678 | 678 | ||
679 | #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23 | 679 | #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23 |
680 | msgid "« Newer posts" | 680 | msgid "« Newer posts" |
681 | -msgstr "" | 681 | +msgstr "« Pli freŝaj afiŝoj" |
682 | 682 | ||
683 | #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24 | 683 | #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24 |
684 | msgid "Older posts »" | 684 | msgid "Older posts »" |
685 | -msgstr "" | 685 | +msgstr "Malpli freŝaj afiŝoj »" |
686 | 686 | ||
687 | #: app/helpers/forum_helper.rb:18 | 687 | #: app/helpers/forum_helper.rb:18 |
688 | msgid "Discussion topic" | 688 | msgid "Discussion topic" |
@@ -763,63 +763,63 @@ msgstr "" | @@ -763,63 +763,63 @@ msgstr "" | ||
763 | #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172 | 763 | #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172 |
764 | #: plugins/display_content/lib/display_content_block.rb:4 | 764 | #: plugins/display_content/lib/display_content_block.rb:4 |
765 | msgid "January" | 765 | msgid "January" |
766 | -msgstr "" | 766 | +msgstr "Januaro" |
767 | 767 | ||
768 | #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172 | 768 | #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172 |
769 | #: plugins/display_content/lib/display_content_block.rb:5 | 769 | #: plugins/display_content/lib/display_content_block.rb:5 |
770 | msgid "February" | 770 | msgid "February" |
771 | -msgstr "" | 771 | +msgstr "Februaro" |
772 | 772 | ||
773 | #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172 | 773 | #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172 |
774 | #: plugins/display_content/lib/display_content_block.rb:6 | 774 | #: plugins/display_content/lib/display_content_block.rb:6 |
775 | msgid "March" | 775 | msgid "March" |
776 | -msgstr "" | 776 | +msgstr "Marto" |
777 | 777 | ||
778 | #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172 | 778 | #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172 |
779 | #: plugins/display_content/lib/display_content_block.rb:7 | 779 | #: plugins/display_content/lib/display_content_block.rb:7 |
780 | msgid "April" | 780 | msgid "April" |
781 | -msgstr "" | 781 | +msgstr "Aprilo" |
782 | 782 | ||
783 | #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172 | 783 | #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172 |
784 | #: app/helpers/forms_helper.rb:173 | 784 | #: app/helpers/forms_helper.rb:173 |
785 | #: plugins/display_content/lib/display_content_block.rb:8 | 785 | #: plugins/display_content/lib/display_content_block.rb:8 |
786 | msgid "May" | 786 | msgid "May" |
787 | -msgstr "" | 787 | +msgstr "Majo" |
788 | 788 | ||
789 | #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172 | 789 | #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172 |
790 | #: plugins/display_content/lib/display_content_block.rb:9 | 790 | #: plugins/display_content/lib/display_content_block.rb:9 |
791 | msgid "June" | 791 | msgid "June" |
792 | -msgstr "" | 792 | +msgstr "Junio" |
793 | 793 | ||
794 | #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172 | 794 | #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172 |
795 | #: plugins/display_content/lib/display_content_block.rb:10 | 795 | #: plugins/display_content/lib/display_content_block.rb:10 |
796 | msgid "July" | 796 | msgid "July" |
797 | -msgstr "" | 797 | +msgstr "Julio" |
798 | 798 | ||
799 | #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172 | 799 | #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172 |
800 | #: plugins/display_content/lib/display_content_block.rb:11 | 800 | #: plugins/display_content/lib/display_content_block.rb:11 |
801 | msgid "August" | 801 | msgid "August" |
802 | -msgstr "" | 802 | +msgstr "Aŭgusto" |
803 | 803 | ||
804 | #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172 | 804 | #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172 |
805 | #: plugins/display_content/lib/display_content_block.rb:12 | 805 | #: plugins/display_content/lib/display_content_block.rb:12 |
806 | msgid "September" | 806 | msgid "September" |
807 | -msgstr "" | 807 | +msgstr "Septembro" |
808 | 808 | ||
809 | #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172 | 809 | #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172 |
810 | #: plugins/display_content/lib/display_content_block.rb:13 | 810 | #: plugins/display_content/lib/display_content_block.rb:13 |
811 | msgid "October" | 811 | msgid "October" |
812 | -msgstr "" | 812 | +msgstr "Oktobro" |
813 | 813 | ||
814 | #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172 | 814 | #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172 |
815 | #: plugins/display_content/lib/display_content_block.rb:14 | 815 | #: plugins/display_content/lib/display_content_block.rb:14 |
816 | msgid "November" | 816 | msgid "November" |
817 | -msgstr "" | 817 | +msgstr "Novembro" |
818 | 818 | ||
819 | #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172 | 819 | #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172 |
820 | #: plugins/display_content/lib/display_content_block.rb:15 | 820 | #: plugins/display_content/lib/display_content_block.rb:15 |
821 | msgid "December" | 821 | msgid "December" |
822 | -msgstr "" | 822 | +msgstr "Decembro" |
823 | 823 | ||
824 | #: app/helpers/dates_helper.rb:28 | 824 | #: app/helpers/dates_helper.rb:28 |
825 | #: plugins/display_content/lib/display_content_block.rb:153 | 825 | #: plugins/display_content/lib/display_content_block.rb:153 |
@@ -834,7 +834,7 @@ msgstr "" | @@ -834,7 +834,7 @@ msgstr "" | ||
834 | #: app/helpers/dates_helper.rb:31 | 834 | #: app/helpers/dates_helper.rb:31 |
835 | #: plugins/display_content/lib/display_content_block.rb:156 | 835 | #: plugins/display_content/lib/display_content_block.rb:156 |
836 | msgid "%{month_name} %{day}, %{year}" | 836 | msgid "%{month_name} %{day}, %{year}" |
837 | -msgstr "" | 837 | +msgstr "La %{day}-a de %{month_name} %{year}" |
838 | 838 | ||
839 | #: app/helpers/dates_helper.rb:31 | 839 | #: app/helpers/dates_helper.rb:31 |
840 | #: plugins/display_content/lib/display_content_block.rb:156 | 840 | #: plugins/display_content/lib/display_content_block.rb:156 |
@@ -8043,7 +8043,7 @@ msgstr "" | @@ -8043,7 +8043,7 @@ msgstr "" | ||
8043 | 8043 | ||
8044 | #: app/views/account/index_anonymous.rhtml:10 | 8044 | #: app/views/account/index_anonymous.rhtml:10 |
8045 | msgid "Sign up." | 8045 | msgid "Sign up." |
8046 | -msgstr "" | 8046 | +msgstr "Aliĝi" |
8047 | 8047 | ||
8048 | #: app/views/account/index_anonymous.rhtml:11 | 8048 | #: app/views/account/index_anonymous.rhtml:11 |
8049 | msgid "" | 8049 | msgid "" |
po/es/noosfero.po
@@ -7,7 +7,7 @@ msgid "" | @@ -7,7 +7,7 @@ msgid "" | ||
7 | msgstr "" | 7 | msgstr "" |
8 | "Project-Id-Version: noosfero 0.45.2\n" | 8 | "Project-Id-Version: noosfero 0.45.2\n" |
9 | "POT-Creation-Date: 2014-01-17 18:26-0000\n" | 9 | "POT-Creation-Date: 2014-01-17 18:26-0000\n" |
10 | -"PO-Revision-Date: 2013-01-03 18:39-0300\n" | 10 | +"PO-Revision-Date: 2014-03-25 14:55+0000\n" |
11 | "Last-Translator: Luis David Aguilar Carlos <ludwig9003@gmail.com>,Freddy " | 11 | "Last-Translator: Luis David Aguilar Carlos <ludwig9003@gmail.com>,Freddy " |
12 | "Martín Hernández Facio <fmhf14@gmail.com>, Pedro Alonzo Ramírez Tovar <pedro." | 12 | "Martín Hernández Facio <fmhf14@gmail.com>, Pedro Alonzo Ramírez Tovar <pedro." |
13 | "alonzo709@gmail.com>\n" | 13 | "alonzo709@gmail.com>\n" |
@@ -292,7 +292,6 @@ msgid "Next" | @@ -292,7 +292,6 @@ msgid "Next" | ||
292 | msgstr "Siguiente" | 292 | msgstr "Siguiente" |
293 | 293 | ||
294 | #: app/helpers/application_helper.rb:1118 | 294 | #: app/helpers/application_helper.rb:1118 |
295 | -#, fuzzy | ||
296 | msgid "See all" | 295 | msgid "See all" |
297 | msgstr "Ver todos" | 296 | msgstr "Ver todos" |
298 | 297 | ||
@@ -690,11 +689,11 @@ msgstr "Configurar foro" | @@ -690,11 +689,11 @@ msgstr "Configurar foro" | ||
690 | 689 | ||
691 | #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23 | 690 | #: app/helpers/forum_helper.rb:14 app/helpers/blog_helper.rb:23 |
692 | msgid "« Newer posts" | 691 | msgid "« Newer posts" |
693 | -msgstr "« Entradas recientes" | 692 | +msgstr "« Noticias más nuevas" |
694 | 693 | ||
695 | #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24 | 694 | #: app/helpers/forum_helper.rb:15 app/helpers/blog_helper.rb:24 |
696 | msgid "Older posts »" | 695 | msgid "Older posts »" |
697 | -msgstr "Entradas antiguas »" | 696 | +msgstr "Noticias más viejas »" |
698 | 697 | ||
699 | #: app/helpers/forum_helper.rb:18 | 698 | #: app/helpers/forum_helper.rb:18 |
700 | msgid "Discussion topic" | 699 | msgid "Discussion topic" |
@@ -841,15 +840,13 @@ msgstr "%{day} de %{month} %{year}" | @@ -841,15 +840,13 @@ msgstr "%{day} de %{month} %{year}" | ||
841 | 840 | ||
842 | #: app/helpers/dates_helper.rb:28 app/helpers/dates_helper.rb:40 | 841 | #: app/helpers/dates_helper.rb:28 app/helpers/dates_helper.rb:40 |
843 | #: plugins/display_content/lib/display_content_block.rb:153 | 842 | #: plugins/display_content/lib/display_content_block.rb:153 |
844 | -#, fuzzy | ||
845 | msgid "%{month}/%{day}" | 843 | msgid "%{month}/%{day}" |
846 | -msgstr "%{day} de %{month} %{year}" | 844 | +msgstr "%{day}/%{month}" |
847 | 845 | ||
848 | #: app/helpers/dates_helper.rb:31 | 846 | #: app/helpers/dates_helper.rb:31 |
849 | #: plugins/display_content/lib/display_content_block.rb:156 | 847 | #: plugins/display_content/lib/display_content_block.rb:156 |
850 | -#, fuzzy | ||
851 | msgid "%{month_name} %{day}, %{year}" | 848 | msgid "%{month_name} %{day}, %{year}" |
852 | -msgstr "%{day} de %{month} %{year}" | 849 | +msgstr "%{day} de %{month} de %{year}" |
853 | 850 | ||
854 | # LAs cadenas de este tipo NO se traducen | 851 | # LAs cadenas de este tipo NO se traducen |
855 | #: app/helpers/dates_helper.rb:31 | 852 | #: app/helpers/dates_helper.rb:31 |
@@ -877,21 +874,19 @@ msgstr "%{month} %{year}" | @@ -877,21 +874,19 @@ msgstr "%{month} %{year}" | ||
877 | 874 | ||
878 | #: app/helpers/dates_helper.rb:53 | 875 | #: app/helpers/dates_helper.rb:53 |
879 | msgid "%{day} %{month} %{year}, %{hour}:%{minutes}" | 876 | msgid "%{day} %{month} %{year}, %{hour}:%{minutes}" |
880 | -msgstr "%{day} %{month} %{year}, %{hour}:%{minutes}" | 877 | +msgstr "%{day} de %{month} de %{year}, %{hour}:%{minutes}" |
881 | 878 | ||
882 | #: app/helpers/dates_helper.rb:65 | 879 | #: app/helpers/dates_helper.rb:65 |
883 | -#, fuzzy | ||
884 | msgid "from %{month} %{day1} to %{day2}, %{year}" | 880 | msgid "from %{month} %{day1} to %{day2}, %{year}" |
885 | -msgstr "%{day} de %{month} %{year}" | 881 | +msgstr "de %{day1} para %{day2} de %{month} de %{year}" |
886 | 882 | ||
887 | #: app/helpers/dates_helper.rb:72 | 883 | #: app/helpers/dates_helper.rb:72 |
888 | -#, fuzzy | ||
889 | msgid "from %{date1} to %{date2}, %{year}" | 884 | msgid "from %{date1} to %{date2}, %{year}" |
890 | -msgstr "Por %{author} el %{date}" | 885 | +msgstr "de %{date1} para %{date2} de %{year}" |
891 | 886 | ||
892 | #: app/helpers/dates_helper.rb:79 | 887 | #: app/helpers/dates_helper.rb:79 |
893 | msgid "from %{date1} to %{date2}" | 888 | msgid "from %{date1} to %{date2}" |
894 | -msgstr "Por %{author} el %{date}" | 889 | +msgstr "de %{date1} para %{date2}" |
895 | 890 | ||
896 | #: app/helpers/dates_helper.rb:89 app/helpers/forms_helper.rb:163 | 891 | #: app/helpers/dates_helper.rb:89 app/helpers/forms_helper.rb:163 |
897 | msgid "Sun" | 892 | msgid "Sun" |
po/it/noosfero.po
@@ -8,7 +8,7 @@ msgid "" | @@ -8,7 +8,7 @@ msgid "" | ||
8 | msgstr "" | 8 | msgstr "" |
9 | "Project-Id-Version: noosfero 0.45.2\n" | 9 | "Project-Id-Version: noosfero 0.45.2\n" |
10 | "POT-Creation-Date: 2014-01-17 18:26-0000\n" | 10 | "POT-Creation-Date: 2014-01-17 18:26-0000\n" |
11 | -"PO-Revision-Date: 2012-06-05 10:27-0300\n" | 11 | +"PO-Revision-Date: 2014-03-25 15:39+0000\n" |
12 | "Last-Translator: Daniela Feitosa <danielafeitosa@colivre.coop.br>\n" | 12 | "Last-Translator: Daniela Feitosa <danielafeitosa@colivre.coop.br>\n" |
13 | "Language-Team: LANGUAGE TEAM <LL@li.org>\n" | 13 | "Language-Team: LANGUAGE TEAM <LL@li.org>\n" |
14 | "Language: \n" | 14 | "Language: \n" |
@@ -111,7 +111,7 @@ msgstr "" | @@ -111,7 +111,7 @@ msgstr "" | ||
111 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25 | 111 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:25 |
112 | #: app/views/profile/_private_profile.rhtml:10 | 112 | #: app/views/profile/_private_profile.rhtml:10 |
113 | msgid "Join" | 113 | msgid "Join" |
114 | -msgstr "" | 114 | +msgstr "Accedere" |
115 | 115 | ||
116 | #: app/helpers/application_helper.rb:554 | 116 | #: app/helpers/application_helper.rb:554 |
117 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4 | 117 | #: app/views/blocks/profile_info_actions/_join_leave_community.rhtml:4 |
@@ -754,63 +754,63 @@ msgstr "" | @@ -754,63 +754,63 @@ msgstr "" | ||
754 | #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172 | 754 | #: app/helpers/dates_helper.rb:7 app/helpers/forms_helper.rb:172 |
755 | #: plugins/display_content/lib/display_content_block.rb:4 | 755 | #: plugins/display_content/lib/display_content_block.rb:4 |
756 | msgid "January" | 756 | msgid "January" |
757 | -msgstr "" | 757 | +msgstr "gennaio" |
758 | 758 | ||
759 | #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172 | 759 | #: app/helpers/dates_helper.rb:8 app/helpers/forms_helper.rb:172 |
760 | #: plugins/display_content/lib/display_content_block.rb:5 | 760 | #: plugins/display_content/lib/display_content_block.rb:5 |
761 | msgid "February" | 761 | msgid "February" |
762 | -msgstr "" | 762 | +msgstr "febbraio" |
763 | 763 | ||
764 | #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172 | 764 | #: app/helpers/dates_helper.rb:9 app/helpers/forms_helper.rb:172 |
765 | #: plugins/display_content/lib/display_content_block.rb:6 | 765 | #: plugins/display_content/lib/display_content_block.rb:6 |
766 | msgid "March" | 766 | msgid "March" |
767 | -msgstr "" | 767 | +msgstr "marzo" |
768 | 768 | ||
769 | #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172 | 769 | #: app/helpers/dates_helper.rb:10 app/helpers/forms_helper.rb:172 |
770 | #: plugins/display_content/lib/display_content_block.rb:7 | 770 | #: plugins/display_content/lib/display_content_block.rb:7 |
771 | msgid "April" | 771 | msgid "April" |
772 | -msgstr "" | 772 | +msgstr "aprile" |
773 | 773 | ||
774 | #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172 | 774 | #: app/helpers/dates_helper.rb:11 app/helpers/forms_helper.rb:172 |
775 | #: app/helpers/forms_helper.rb:173 | 775 | #: app/helpers/forms_helper.rb:173 |
776 | #: plugins/display_content/lib/display_content_block.rb:8 | 776 | #: plugins/display_content/lib/display_content_block.rb:8 |
777 | msgid "May" | 777 | msgid "May" |
778 | -msgstr "" | 778 | +msgstr "maggio" |
779 | 779 | ||
780 | #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172 | 780 | #: app/helpers/dates_helper.rb:12 app/helpers/forms_helper.rb:172 |
781 | #: plugins/display_content/lib/display_content_block.rb:9 | 781 | #: plugins/display_content/lib/display_content_block.rb:9 |
782 | msgid "June" | 782 | msgid "June" |
783 | -msgstr "" | 783 | +msgstr "giugno" |
784 | 784 | ||
785 | #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172 | 785 | #: app/helpers/dates_helper.rb:13 app/helpers/forms_helper.rb:172 |
786 | #: plugins/display_content/lib/display_content_block.rb:10 | 786 | #: plugins/display_content/lib/display_content_block.rb:10 |
787 | msgid "July" | 787 | msgid "July" |
788 | -msgstr "" | 788 | +msgstr "luglio" |
789 | 789 | ||
790 | #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172 | 790 | #: app/helpers/dates_helper.rb:14 app/helpers/forms_helper.rb:172 |
791 | #: plugins/display_content/lib/display_content_block.rb:11 | 791 | #: plugins/display_content/lib/display_content_block.rb:11 |
792 | msgid "August" | 792 | msgid "August" |
793 | -msgstr "" | 793 | +msgstr "agosto" |
794 | 794 | ||
795 | #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172 | 795 | #: app/helpers/dates_helper.rb:15 app/helpers/forms_helper.rb:172 |
796 | #: plugins/display_content/lib/display_content_block.rb:12 | 796 | #: plugins/display_content/lib/display_content_block.rb:12 |
797 | msgid "September" | 797 | msgid "September" |
798 | -msgstr "" | 798 | +msgstr "settembre" |
799 | 799 | ||
800 | #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172 | 800 | #: app/helpers/dates_helper.rb:16 app/helpers/forms_helper.rb:172 |
801 | #: plugins/display_content/lib/display_content_block.rb:13 | 801 | #: plugins/display_content/lib/display_content_block.rb:13 |
802 | msgid "October" | 802 | msgid "October" |
803 | -msgstr "" | 803 | +msgstr "ottobre" |
804 | 804 | ||
805 | #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172 | 805 | #: app/helpers/dates_helper.rb:17 app/helpers/forms_helper.rb:172 |
806 | #: plugins/display_content/lib/display_content_block.rb:14 | 806 | #: plugins/display_content/lib/display_content_block.rb:14 |
807 | msgid "November" | 807 | msgid "November" |
808 | -msgstr "" | 808 | +msgstr "novembre" |
809 | 809 | ||
810 | #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172 | 810 | #: app/helpers/dates_helper.rb:18 app/helpers/forms_helper.rb:172 |
811 | #: plugins/display_content/lib/display_content_block.rb:15 | 811 | #: plugins/display_content/lib/display_content_block.rb:15 |
812 | msgid "December" | 812 | msgid "December" |
813 | -msgstr "" | 813 | +msgstr "dicembre" |
814 | 814 | ||
815 | #: app/helpers/dates_helper.rb:28 | 815 | #: app/helpers/dates_helper.rb:28 |
816 | #: plugins/display_content/lib/display_content_block.rb:153 | 816 | #: plugins/display_content/lib/display_content_block.rb:153 |
@@ -825,7 +825,7 @@ msgstr "" | @@ -825,7 +825,7 @@ msgstr "" | ||
825 | #: app/helpers/dates_helper.rb:31 | 825 | #: app/helpers/dates_helper.rb:31 |
826 | #: plugins/display_content/lib/display_content_block.rb:156 | 826 | #: plugins/display_content/lib/display_content_block.rb:156 |
827 | msgid "%{month_name} %{day}, %{year}" | 827 | msgid "%{month_name} %{day}, %{year}" |
828 | -msgstr "" | 828 | +msgstr "%{day} %{month_name} %{year}" |
829 | 829 | ||
830 | #: app/helpers/dates_helper.rb:31 | 830 | #: app/helpers/dates_helper.rb:31 |
831 | #: plugins/display_content/lib/display_content_block.rb:156 | 831 | #: plugins/display_content/lib/display_content_block.rb:156 |
@@ -8018,7 +8018,7 @@ msgstr "" | @@ -8018,7 +8018,7 @@ msgstr "" | ||
8018 | 8018 | ||
8019 | #: app/views/account/index_anonymous.rhtml:10 | 8019 | #: app/views/account/index_anonymous.rhtml:10 |
8020 | msgid "Sign up." | 8020 | msgid "Sign up." |
8021 | -msgstr "" | 8021 | +msgstr "Registro" |
8022 | 8022 | ||
8023 | #: app/views/account/index_anonymous.rhtml:11 | 8023 | #: app/views/account/index_anonymous.rhtml:11 |
8024 | msgid "" | 8024 | msgid "" |
public/stylesheets/application.css
@@ -3578,9 +3578,10 @@ div#article-parent { | @@ -3578,9 +3578,10 @@ div#article-parent { | ||
3578 | } | 3578 | } |
3579 | #agenda .agenda-calendar { | 3579 | #agenda .agenda-calendar { |
3580 | width: 50%; | 3580 | width: 50%; |
3581 | + display: inline-block; | ||
3581 | } | 3582 | } |
3582 | #agenda td, #agenda th { | 3583 | #agenda td, #agenda th { |
3583 | - padding: 15px; | 3584 | + padding: 10px; |
3584 | padding-right: 0px; | 3585 | padding-right: 0px; |
3585 | } | 3586 | } |
3586 | #agenda .agenda-calendar .previous-month td, #agenda .agenda-calendar .previous-month th, #agenda .agenda-calendar .next-month td, #agenda .agenda-calendar .next-month th { | 3587 | #agenda .agenda-calendar .previous-month td, #agenda .agenda-calendar .previous-month th, #agenda .agenda-calendar .next-month td, #agenda .agenda-calendar .next-month th { |
@@ -3638,26 +3639,25 @@ div#article-parent { | @@ -3638,26 +3639,25 @@ div#article-parent { | ||
3638 | vertical-align: middle; | 3639 | vertical-align: middle; |
3639 | } | 3640 | } |
3640 | #agenda .agenda-calendar .current-month caption { | 3641 | #agenda .agenda-calendar .current-month caption { |
3641 | - margin-bottom: 10px; | 3642 | + margin: 10px 0px; |
3642 | } | 3643 | } |
3643 | #agenda #events-of-the-day { | 3644 | #agenda #events-of-the-day { |
3644 | - position: absolute; | ||
3645 | - left: 50%; | ||
3646 | width: 45%; | 3645 | width: 45%; |
3647 | - top: 0px; | ||
3648 | height: 100%; | 3646 | height: 100%; |
3649 | padding-left: 20px; | 3647 | padding-left: 20px; |
3648 | + display: inline-block; | ||
3649 | + vertical-align: top; | ||
3650 | } | 3650 | } |
3651 | #agenda #events-of-the-day #agenda-items { | 3651 | #agenda #events-of-the-day #agenda-items { |
3652 | display: block; | 3652 | display: block; |
3653 | overflow: auto; | 3653 | overflow: auto; |
3654 | overflow-x: hidden; | 3654 | overflow-x: hidden; |
3655 | - height: 80%; | 3655 | + height: 250px; |
3656 | background: white; | 3656 | background: white; |
3657 | border: none; | 3657 | border: none; |
3658 | } | 3658 | } |
3659 | #agenda-toolbar { | 3659 | #agenda-toolbar { |
3660 | - float: right; | 3660 | + text-align: right; |
3661 | font-variant: normal; | 3661 | font-variant: normal; |
3662 | font-weight: normal; | 3662 | font-weight: normal; |
3663 | } | 3663 | } |
@@ -3680,6 +3680,9 @@ h1#agenda-title { | @@ -3680,6 +3680,9 @@ h1#agenda-title { | ||
3680 | display: block; | 3680 | display: block; |
3681 | margin-top: 10px; | 3681 | margin-top: 10px; |
3682 | } | 3682 | } |
3683 | +#agenda .pagination { | ||
3684 | + margin-top: 15px; | ||
3685 | +} | ||
3683 | /* ==> public/stylesheets/controller_favorite_enterprises.css <== */ | 3686 | /* ==> public/stylesheets/controller_favorite_enterprises.css <== */ |
3684 | 3687 | ||
3685 | /* ==> @import url(manage_contacts_list.css); <== */ | 3688 | /* ==> @import url(manage_contacts_list.css); <== */ |
test/functional/events_controller_test.rb
@@ -38,4 +38,12 @@ class EventsControllerTest < ActionController::TestCase | @@ -38,4 +38,12 @@ class EventsControllerTest < ActionController::TestCase | ||
38 | assert_tag :tag =>'a', :attributes => {:href => "/profile/#{profile.identifier}/events/#{next_month.year}/#{next_month.month}"}, :content => next_month_name | 38 | assert_tag :tag =>'a', :attributes => {:href => "/profile/#{profile.identifier}/events/#{next_month.year}/#{next_month.month}"}, :content => next_month_name |
39 | end | 39 | end |
40 | 40 | ||
41 | + should 'see the events paginated' do | ||
42 | + 30.times do |i| | ||
43 | + profile.events << Event.new(:name => "Lesson #{i}", :start_date => Date.today) | ||
44 | + end | ||
45 | + get :events, :profile => profile.identifier | ||
46 | + assert_equal 20, assigns(:events).count | ||
47 | + end | ||
48 | + | ||
41 | end | 49 | end |
test/functional/search_controller_test.rb
@@ -370,6 +370,14 @@ class SearchControllerTest < ActionController::TestCase | @@ -370,6 +370,14 @@ class SearchControllerTest < ActionController::TestCase | ||
370 | assert_equal [ 'upcoming event 1' ], assigns(:searches)[:events][:results].map(&:name) | 370 | assert_equal [ 'upcoming event 1' ], assigns(:searches)[:events][:results].map(&:name) |
371 | end | 371 | end |
372 | 372 | ||
373 | + should 'see the events paginated' do | ||
374 | + 30.times do |i| | ||
375 | + create_event(person, :name => "Event #{i}", :start_date => Date.today) | ||
376 | + end | ||
377 | + get :events | ||
378 | + assert_equal 20, assigns(:events).count | ||
379 | + end | ||
380 | + | ||
373 | %w[ people enterprises articles events communities products ].each do |asset| | 381 | %w[ people enterprises articles events communities products ].each do |asset| |
374 | should "render asset-specific template when searching for #{asset}" do | 382 | should "render asset-specific template when searching for #{asset}" do |
375 | get "#{asset}" | 383 | get "#{asset}" |