= render :partial => 'admin/menus/lang_switcher' = render :partial => 'admin/widgets/tabs' = form_for [forgeos_cms, :admin, carousel], :html => { "data-object_name" => carousel.class.model_name.singular, :id => 'wrap' } do |f| = hidden_field_tag 'page_id', page_id if defined?(page_id) && !page_id.blank? .backgrounds.big-header = f.text_field :title, :class => 'field_name' = Forgeos_save_buttons forgeos_cms.admin_widgets_path #content.grid_12.alpha.omega .inner-content //.fieldset.open // %h2= I18n.t('widget_settings').capitalize // .option-panel-content #carousel_items.widget-list.nested_sortable = render :partial => 'form_item', :locals => {:f => f} #right-sidebar.grid_4.alpha.omega .step = link_to content_tag(:span, I18n.t('media.picture.add').capitalize, :class=>'big-icons add-carousel-item'), '#', :class => 'backgrounds button button-carousel-item' .step -#= link_to I18n.t('preview'), '#', :class => 'small-icons preview' = content_tag :span, I18n.t('preview').capitalize, :class => 'small-icons preview disabled' - unless carousel.new_record? = link_to I18n.t('duplicate'), [forgeos_cms, :duplicate, :admin, carousel], :class => 'small-icons duplicate' = link_to I18n.t('delete'), [forgeos_cms, :admin, carousel], :confirm => I18n.t('carousel.destroy.confirm').capitalize, :method => :delete, :class => 'small-icons delete' #carousel_create.step.open %a.small-icons.step-title{ :href => "#" } = "#{I18n.t('widget.link.create.action').capitalize} :" = hidden_field_tag 'carousel[page_col_ids][]' #association-carousel-page-tree.inner-step %ul = render :partial => 'admin/blocks/associated_pages', :locals => { :categories => page_categories, :pages => pages, :block => carousel, :element_id => 'carousel' } .clear .step %a.small-icons.step-title{ :href => "#" } = "#{I18n.t('folder.associated_to').capitalize} :" = hidden_field_tag 'carousel[category_ids][]' #association-carousel-tree.inner-step %ul = render :partial => 'admin/categories/associated_elements', :locals => { :association_id => 'category_ids', :element => carousel, :category_ids => carousel.category_ids, :categories => WidgetCategory.find_all_by_parent_id(nil) } .clear .clear = render :partial => 'attachments_popups' = form_for [forgeos_cms, :admin, carousel], :html => {:method => :put, :multipart => true, :id => "hidden_form"} do |hidden_form| .item_form.hidden #empty_carousel_item.block-container.widget-modify.carousel{:style => 'display: none;'} - carousel_image = image_tag 'forgeos/admin/no-image_50x50.png', :class => 'carousel-image' - id = "EMPTY_ID" .inner_block-container .block-type{:style => 'display: none;'} %span.handler %span.inner %div = carousel_image .block-type.editing{:style => 'display: block;'} %span.handler %span.inner %div %label = "#{I18n.t('media.picture', :count => 1).capitalize} :" %label.picture-title = "#{I18n.t('media.picture.title').capitalize} :" %label = "#{I18n.t('link').capitalize} :" %label = "#{I18n.t('description').capitalize} :" .block-name{:style => 'display: none;'} = link_to '', "#{I18n.t('http')}" %p .block-name.editing{:id => "edit_item_#{id}", :style => 'display: block;'} = hidden_field_tag "carousel[items_attributes][#{id}][_destroy]", '', :class => 'delete' .widget-picture = carousel_image = hidden_field_tag "carousel[items_attributes][#{id}][picture_id]" = link_to I18n.t('carousel.change_picture').capitalize, '#', :class => 'change-picture', :id => "change_picture_item_#{id}" = text_field_tag "carousel[items_attributes][#{id}][title]" .widget-url %span = I18n.t('http') = text_field_tag "carousel[items_attributes][#{id}][url]" .clear = text_area_tag "carousel[items_attributes][#{id}][description]", '', :cols => 10, :rows => 2 = hidden_field_tag "carousel[items_attributes][#{id}][position]" .widget-actions = link_to '','#', :class => 'small-icons duplicate-link' = link_to '','#', :class => 'small-icons edit-link' = link_to_function '', "remove_carousel_item($(this));", :class => 'small-icons destroy-link' .clear