Sha256: cbd91f979b470d1d7d7d66e527b31bcf3446e1176c31060c1452bcb3742e7837
Contents?: true
Size: 1.54 KB
Versions: 3
Compression:
Stored size: 1.54 KB
Contents
-# -# TODO: Do it smarter way, too much logic in view -# .content = common_form do .row-fluid = simple_form_for [:backend, obj], :html => { :class => 'form-horizontal' } do |f| = render :partial => "mokio/backend/common/gmap", locals: {obj: obj, f: f} if obj.class.has_gmap_enabled? = render :partial => "mokio/backend/common/meta", locals: {obj: obj, f: f} if obj.class.has_meta_enabled? = render :partial => "mokio/backend/#{obj.class.to_s.tableize}/form", :locals => {f: f, obj: obj} - if params[:action] != "edit" || !has_data_files?(obj) .form-actions = btn_submit bt("save") = btn_submit bt("save_and_create_new"), true = btn_cancel "/backend/#{obj.class.to_s.tableize}" - if has_data_files?(obj) && params[:action] == "edit" && obj.default_data_file == Photo = render :template => "mokio/backend/data_files/uploader" - if has_data_files?(obj) && obj.default_data_file == Youtube && params[:action] == "edit" = render :template => "mokio/backend/youtubes/uploader" - if has_data_files?(obj) && params[:action] == "edit" = render :partial => "mokio/backend/#{obj.default_data_file.to_s.tableize}/gallery", :locals => {videos: @videos} - content_for :js do = javascript_include_tag 'backend/forms' - if has_data_files?(obj) && params[:action] == "edit" = javascript_include_tag "backend/galleries" - if params[:action] == "new" && has_data_files?(obj) = flash_message(bt("cannot_add_files_now", @obj_class))
Version data entries
3 entries across 3 versions & 1 rubygems