def filer_list
set_list
- list_result = @list.open(@operators)
- @items = list_result.items
+ @items = @list.items
respond_to do |format|
format.html {
- @filer = Locmare::Filer.new @list.item_name, list_result.items, list_result, :default, @operators
+ @filer = Locmare::Filer.new @list.item_name, @items, @list.page_status, @operators
render @filer.template_name, :locals => {
:filer => @filer
}
}
- format.json { render json: @items.map{|i| i.attributes}.to_json }
- # rails3.2 has problem
- # y method defined as private
- # attribute y conflict at PanelPicture, balloon ..etc
- # use i.attributes[name]
- # format.json { render json: @items.to_json }
+ format.json {
+ res = {
+ :page_status => @list.page_status.to_hash,
+ # rails3.2 has problem
+ # y method defined as private
+ # attribute y conflict at PanelPicture, balloon ..etc
+ # use i.attributes[name]
+ :list => @items.map{|i| i.attributes}
+ # :list => @items.to_json
+ }
+ render json: res.to_json
+ }
format.atom
format.rss
end