Utilisation d'un fork de simple_calendar, qui gère des événements sur plusieurs jours

This commit is contained in:
echarp 2013-12-29 16:17:33 +01:00
parent f2d59e5252
commit 6003770813
4 changed files with 13 additions and 8 deletions

View File

@ -51,7 +51,7 @@ gem 'jquery-turbolinks'
gem 'font-awesome-rails'
gem 'compass-rails', "~> 2.0.alpha.0"
gem 'has_scope'
gem 'simple_calendar'
gem 'simple_calendar', github: 'echarp/simple_calendar'
group :development do
gem 'guard-livereload'

View File

@ -1,6 +1,13 @@
GIT
remote: git://github.com/echarp/simple_calendar.git
revision: 415838f60847068bc29459f5a275c04d4db05ee9
specs:
simple_calendar (0.1.9)
rails (>= 3.0)
GIT
remote: git://github.com/gregbell/active_admin.git
revision: 10105176ff64013e0db6d5464cfed4049edf052b
revision: 5e4fe269a32e491d8454ed586a5321a6cfc088cd
specs:
activeadmin (1.0.0.pre)
arbre (~> 1.0)
@ -196,8 +203,6 @@ GEM
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
simple_calendar (0.1.9)
rails (>= 3.0)
slop (3.4.7)
sprockets (2.10.1)
hike (~> 1.2)
@ -247,6 +252,6 @@ DEPENDENCIES
rails-i18n
sass-rails
sdoc
simple_calendar
simple_calendar!
turbolinks
uglifier

View File

@ -56,6 +56,7 @@ table.calendar
padding-left: 15px
list-style-type: circle
li
color: #444
padding: 0
margin-bottom: 5px
@ -64,6 +65,7 @@ table.calendar
line-height: 1.1em
strong:after
content: ':'
margin-right: -1px
a:link, a:visited
color: #666
font-weight: normal

View File

@ -1,12 +1,10 @@
class EventsController < InheritedResources::Base
has_scope :region
def index
params[:year] ||= Date.today.year
params[:month] ||= Date.today.month
@events = Event.month(params[:year], params[:month])
if (params[:region])
if (params[:region] && params[:region].present?)
@events = @events.region(params[:region])
end
end