suite
This commit is contained in:
parent
dd48be3007
commit
4c5f32ac28
@ -9,8 +9,8 @@
|
|||||||
params[:file_folder_id] = params[:file_folder_id] || 1
|
params[:file_folder_id] = params[:file_folder_id] || 1
|
||||||
|
|
||||||
@file_folder = FileFolder.find(params[:file_folder_id])
|
@file_folder = FileFolder.find(params[:file_folder_id])
|
||||||
@file_folders = FileFolder.all(:order => :name)
|
@file_folders = FileFolder.order("name").all
|
||||||
@data_files = DataFile.all(:order => "created_at DESC", :conditions => {:file_folder_id => @file_folder.id})
|
@data_files = DataFile.order("created_at DESC").where(:file_folder_id => @file_folder.id).all
|
||||||
@data_file = DataFile.new(:file_folder_id => @file_folder.id)
|
@data_file = DataFile.new(:file_folder_id => @file_folder.id)
|
||||||
if request.xhr?
|
if request.xhr?
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
@ -8,8 +8,8 @@
|
|||||||
params[:album_id] = params[:album_id] || 1
|
params[:album_id] = params[:album_id] || 1
|
||||||
|
|
||||||
@album = Album.find(params[:album_id])
|
@album = Album.find(params[:album_id])
|
||||||
@albums = Album.all(:order => :name)
|
@albums = Album.order("name").all
|
||||||
@image_files = ImageFile.all(:order => "created_at DESC", :conditions => {:album_id => @album.id})
|
@image_files = ImageFile.where(:album_id => @album.id).order("created_at DESC").all
|
||||||
@image_file = ImageFile.new(:album_id => @album.id)
|
@image_file = ImageFile.new(:album_id => @album.id)
|
||||||
if request.xhr?
|
if request.xhr?
|
||||||
render :layout => false
|
render :layout => false
|
||||||
|
@ -9,7 +9,7 @@ class Public::TestimoniesController < ApplicationController
|
|||||||
|
|
||||||
if params[:slug]
|
if params[:slug]
|
||||||
testimony_id = params[:slug].split('-')[0].to_i
|
testimony_id = params[:slug].split('-')[0].to_i
|
||||||
testimony = Testimony.find(:first, :conditions => {:id => testimony_id})
|
testimony = Testimony.where(:id => testimony_id).first
|
||||||
|
|
||||||
if testimony
|
if testimony
|
||||||
@testimony = testimony
|
@testimony = testimony
|
||||||
|
@ -3,6 +3,6 @@
|
|||||||
#block_portlet.block_portlets{:id => block.id, :"data-block_id"=>block.id, :class => ("block_portlets_sortable" if sortable).to_s}
|
#block_portlet.block_portlets{:id => block.id, :"data-block_id"=>block.id, :class => ("block_portlets_sortable" if sortable).to_s}
|
||||||
|
|
||||||
|
|
||||||
=render :partial => "portlet/portlets/portlet", :collection => block.portlets.find(:all, :order => :position, :include => :content)
|
=render :partial => "portlet/portlets/portlet", :collection => block.portlets.order(:position).includes(:content).all
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,5 +2,5 @@
|
|||||||
=form.semantic_fields_for :menu_content do |content|
|
=form.semantic_fields_for :menu_content do |content|
|
||||||
= content.inputs do
|
= content.inputs do
|
||||||
|
|
||||||
-MenuItem.find(:all, :conditions => {:parent_id => nil}, :order => :position).each do |m|
|
-MenuItem.where(:parent_id => nil).order(:position).all.each do |m|
|
||||||
=render :partial => "form_line", :locals => {:menu_item => m, :f => content}
|
=render :partial => "form_line", :locals => {:menu_item => m, :f => content}
|
Loading…
x
Reference in New Issue
Block a user