class BrowseController < ApplicationController
- layout 'site'
+ layout 'site', :except => [ :start ]
before_filter :authorize_web
before_filter :set_locale
around_filter :web_timeout, :except => [:start]
def start
- @max_features = case
- when browser.ie? && browser.version.to_i < 8 then 100
- when browser.ie? && browser.version.to_i < 9 then 500
- else 2000
- end
end
def relation
rescue ActiveRecord::RecordNotFound
render :action => "not_found", :status => :not_found
end
+
+ def note
+ @type = "note"
+ @note = Note.find(params[:id])
+ @next = Note.find(:first, :order => "id ASC", :conditions => [ "status != 'hidden' AND id > :id", { :id => @note.id }] )
+ @prev = Note.find(:first, :order => "id DESC", :conditions => [ "status != 'hidden' AND id < :id", { :id => @note.id }] )
+ rescue ActiveRecord::RecordNotFound
+ render :action => "not_found", :status => :not_found
+ end
end