From 1acb5dd85bc9d931226ce807f58f7e7f27ad4571 Mon Sep 17 00:00:00 2001 From: Joenio Costa Date: Mon, 16 Nov 2009 16:28:02 -0300 Subject: [PATCH] Small improvements for events layout --- app/helpers/events_helper.rb | 4 ++-- app/models/link_list_block.rb | 3 ++- app/views/events/_agenda.rhtml | 4 ++-- features/events.feature | 12 ++++++------ public/stylesheets/controller_events.css | 10 ++++++++++ 5 files changed, 22 insertions(+), 11 deletions(-) diff --git a/app/helpers/events_helper.rb b/app/helpers/events_helper.rb index b5d209f..98f9e64 100644 --- a/app/helpers/events_helper.rb +++ b/app/helpers/events_helper.rb @@ -1,13 +1,13 @@ module EventsHelper def list_events(date, events) - return content_tag('em', _("Select a day on the left to display it's events here"), :class => 'no-events') unless date + return content_tag('em', _("Select a day on the left to display it's events here"), :class => 'select-a-day') unless date title = _('Events for %s') % show_date(date) content_tag('h2', title) + content_tag('div', (events.any? ? content_tag('table', events.select { |item| item.public? }.map {|item| display_event_in_listing(item)}.join('')) : - content_tag('em', _('No events for this date')) + content_tag('em', _('No events for this date'), :class => 'no-events') ), :id => 'agenda-items' ) end diff --git a/app/models/link_list_block.rb b/app/models/link_list_block.rb index 9f76c21..ad3b177 100644 --- a/app/models/link_list_block.rb +++ b/app/models/link_list_block.rb @@ -24,7 +24,8 @@ class LinkListBlock < Block ['spread', N_('Spread')], ['eyes', N_('Eyes')], ['photos', N_('Photos')], - ['menu-people', N_('Person')] + ['menu-people', N_('Person')], + ['menu-events', N_('Event')] ] settings_items :links, Array, :default => [] diff --git a/app/views/events/_agenda.rhtml b/app/views/events/_agenda.rhtml index 582bb04..17a9824 100644 --- a/app/views/events/_agenda.rhtml +++ b/app/views/events/_agenda.rhtml @@ -3,8 +3,8 @@ <%= render :partial => 'events/month', :locals => {:calendar => @calendar, :abbreviated => true} %>

<%= show_month(params[:year], params[:month]) %>

- <%= link_to_previous_month(params[:year], params[:month], '← previous') %> - <%= link_to_next_month(params[:year], params[:month], 'next →') %> + <%= link_to_previous_month(params[:year], params[:month], '« previous') %> + <%= link_to_next_month(params[:year], params[:month], 'next »') %>
diff --git a/features/events.feature b/features/events.feature index 8c42267..9c60a30 100644 --- a/features/events.feature +++ b/features/events.feature @@ -12,22 +12,22 @@ Feature: events Scenario: go to next month Given I am on /profile/josesilva/events/2009/10 - When I follow "next →" + When I follow "next »" Then I should see "November 2009" within ".current-month" Scenario: go to next month in global agenda Given I am on /assets/events?year=2009&month=11 - When I follow "next →" + When I follow "next »" Then I should see "December 2009" within ".current-month" Scenario: go to previous month Given I am on /profile/josesilva/events/2009/10 - When I follow "← previous" + When I follow "« previous" Then I should see "September 2009" within ".current-month" Scenario: go to previous month in global agenda Given I am on /assets/events?year=2009&month=11 - When I follow "← previous" + When I follow "« previous" Then I should see "October 2009" within ".current-month" Scenario: go to next month by clicking in month name @@ -107,9 +107,9 @@ Feature: events Scenario: provide links to days with events Given I am on /profile/josesilva/events/2009/10 Then I should see "24" link - When I follow "next →" + When I follow "next »" Then I should see "24" link - When I follow "next →" + When I follow "next »" Then I should not see "24" link Scenario: provide links to all days between start and end date diff --git a/public/stylesheets/controller_events.css b/public/stylesheets/controller_events.css index 00b978c..3b9d890 100644 --- a/public/stylesheets/controller_events.css +++ b/public/stylesheets/controller_events.css @@ -74,6 +74,8 @@ #agenda #events-of-the-day #agenda-items { display: block; overflow: auto; + overflow-x: hidden; + height: 90%; } body.noosfero #content .no-boxes a.button.icon-back { @@ -82,3 +84,11 @@ body.noosfero #content .no-boxes a.button.icon-back { border: none; opacity: 0.5; } + +#agenda #events-of-the-day .select-a-day { + font-size: 14px; + font-style: normal; + font-weight: bold; + display: block; + margin-top: 10px; +} -- libgit2 0.21.2