From c3e291034dac9d6bbc05c8cd6ccc61b463c90060 Mon Sep 17 00:00:00 2001 From: Fabio Teixeira Date: Tue, 20 Oct 2015 10:55:24 -0200 Subject: [PATCH] Better html structure for event list --- src/noosfero-spb/software_communities/lib/software_events_block.rb | 2 +- src/noosfero-spb/software_communities/views/blocks/_software_events_list_item.html.erb | 16 +++++++--------- src/noosfero-spb/software_communities/views/blocks/software_events.html.erb | 9 ++------- 3 files changed, 10 insertions(+), 17 deletions(-) diff --git a/src/noosfero-spb/software_communities/lib/software_events_block.rb b/src/noosfero-spb/software_communities/lib/software_events_block.rb index ca5ec33..284b9ae 100644 --- a/src/noosfero-spb/software_communities/lib/software_events_block.rb +++ b/src/noosfero-spb/software_communities/lib/software_events_block.rb @@ -10,7 +10,7 @@ class SoftwareEventsBlock < Block def content(args={}) today = DateTime.now.beginning_of_day - events = self.owner.events.where("start_date >= ? AND end_date >= ?", today, today).order(:start_date) + events = self.owner.events.where("end_date >= ?", today).order(:start_date) block = self diff --git a/src/noosfero-spb/software_communities/views/blocks/_software_events_list_item.html.erb b/src/noosfero-spb/software_communities/views/blocks/_software_events_list_item.html.erb index c1f1bea..6994ded 100644 --- a/src/noosfero-spb/software_communities/views/blocks/_software_events_list_item.html.erb +++ b/src/noosfero-spb/software_communities/views/blocks/_software_events_list_item.html.erb @@ -1,11 +1,9 @@ -
-
+ -
- <%= event.start_date.strftime "%m/%d" %> -
+ + <%= event.start_date.strftime "%d/%m - " %> + -
- <%= link_to event.title, event.url %> -
-
+ + <%= link_to event.title, event.url %> + diff --git a/src/noosfero-spb/software_communities/views/blocks/software_events.html.erb b/src/noosfero-spb/software_communities/views/blocks/software_events.html.erb index 7bde8fc..13802ce 100644 --- a/src/noosfero-spb/software_communities/views/blocks/software_events.html.erb +++ b/src/noosfero-spb/software_communities/views/blocks/software_events.html.erb @@ -3,16 +3,11 @@ - - <% else %> -
- <%= _("This community does not have any events yet") %> -
<% end %> - \ No newline at end of file + -- libgit2 0.21.2