Utilisation d'un fork de simple_calendar, qui gère des événements sur plusieurs jours
This commit is contained in:
parent
f2d59e5252
commit
6003770813
2
Gemfile
2
Gemfile
@ -51,7 +51,7 @@ gem 'jquery-turbolinks'
|
|||||||
gem 'font-awesome-rails'
|
gem 'font-awesome-rails'
|
||||||
gem 'compass-rails', "~> 2.0.alpha.0"
|
gem 'compass-rails', "~> 2.0.alpha.0"
|
||||||
gem 'has_scope'
|
gem 'has_scope'
|
||||||
gem 'simple_calendar'
|
gem 'simple_calendar', github: 'echarp/simple_calendar'
|
||||||
|
|
||||||
group :development do
|
group :development do
|
||||||
gem 'guard-livereload'
|
gem 'guard-livereload'
|
||||||
|
13
Gemfile.lock
13
Gemfile.lock
@ -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
|
GIT
|
||||||
remote: git://github.com/gregbell/active_admin.git
|
remote: git://github.com/gregbell/active_admin.git
|
||||||
revision: 10105176ff64013e0db6d5464cfed4049edf052b
|
revision: 5e4fe269a32e491d8454ed586a5321a6cfc088cd
|
||||||
specs:
|
specs:
|
||||||
activeadmin (1.0.0.pre)
|
activeadmin (1.0.0.pre)
|
||||||
arbre (~> 1.0)
|
arbre (~> 1.0)
|
||||||
@ -196,8 +203,6 @@ GEM
|
|||||||
sdoc (0.3.20)
|
sdoc (0.3.20)
|
||||||
json (>= 1.1.3)
|
json (>= 1.1.3)
|
||||||
rdoc (~> 3.10)
|
rdoc (~> 3.10)
|
||||||
simple_calendar (0.1.9)
|
|
||||||
rails (>= 3.0)
|
|
||||||
slop (3.4.7)
|
slop (3.4.7)
|
||||||
sprockets (2.10.1)
|
sprockets (2.10.1)
|
||||||
hike (~> 1.2)
|
hike (~> 1.2)
|
||||||
@ -247,6 +252,6 @@ DEPENDENCIES
|
|||||||
rails-i18n
|
rails-i18n
|
||||||
sass-rails
|
sass-rails
|
||||||
sdoc
|
sdoc
|
||||||
simple_calendar
|
simple_calendar!
|
||||||
turbolinks
|
turbolinks
|
||||||
uglifier
|
uglifier
|
||||||
|
@ -56,6 +56,7 @@ table.calendar
|
|||||||
padding-left: 15px
|
padding-left: 15px
|
||||||
list-style-type: circle
|
list-style-type: circle
|
||||||
li
|
li
|
||||||
|
color: #444
|
||||||
padding: 0
|
padding: 0
|
||||||
margin-bottom: 5px
|
margin-bottom: 5px
|
||||||
|
|
||||||
@ -64,6 +65,7 @@ table.calendar
|
|||||||
line-height: 1.1em
|
line-height: 1.1em
|
||||||
strong:after
|
strong:after
|
||||||
content: ':'
|
content: ':'
|
||||||
|
margin-right: -1px
|
||||||
a:link, a:visited
|
a:link, a:visited
|
||||||
color: #666
|
color: #666
|
||||||
font-weight: normal
|
font-weight: normal
|
||||||
|
@ -1,12 +1,10 @@
|
|||||||
class EventsController < InheritedResources::Base
|
class EventsController < InheritedResources::Base
|
||||||
has_scope :region
|
|
||||||
|
|
||||||
def index
|
def index
|
||||||
params[:year] ||= Date.today.year
|
params[:year] ||= Date.today.year
|
||||||
params[:month] ||= Date.today.month
|
params[:month] ||= Date.today.month
|
||||||
|
|
||||||
@events = Event.month(params[:year], params[:month])
|
@events = Event.month(params[:year], params[:month])
|
||||||
if (params[:region])
|
if (params[:region] && params[:region].present?)
|
||||||
@events = @events.region(params[:region])
|
@events = @events.region(params[:region])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user