Merge branch 'master' of git.framasoft.org:agenda-libre/agenda-libre-ruby
This commit is contained in:
commit
620c08f095
@ -15,7 +15,7 @@ class EventsController < ApplicationController
|
|||||||
respond_to do |format|
|
respond_to do |format|
|
||||||
format.html
|
format.html
|
||||||
format.json { @events = @events.future }
|
format.json { @events = @events.future }
|
||||||
format.rss { @events = @events.future.order('id desc').limit 20 }
|
format.rss { @events = filter_for_rss }
|
||||||
format.ics { @events = @events.last_year }
|
format.ics { @events = @events.last_year }
|
||||||
format.xml
|
format.xml
|
||||||
end
|
end
|
||||||
@ -107,6 +107,14 @@ class EventsController < ApplicationController
|
|||||||
:locality, :url, :contact, :submitter, :tags
|
:locality, :url, :contact, :submitter, :tags
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def filter_for_rss
|
||||||
|
if(!params.has_key?(:showall))
|
||||||
|
@events.future.order('id desc').limit 20
|
||||||
|
else
|
||||||
|
@events.order('id desc')
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def locked
|
def locked
|
||||||
redirect_to edit_event_url(@event, secret: @event.secret),
|
redirect_to edit_event_url(@event, secret: @event.secret),
|
||||||
alert: t('staleObjectError')
|
alert: t('staleObjectError')
|
||||||
|
Loading…
Reference in New Issue
Block a user