Sha256: 36912ae2c8ba710966e2aaec2d5f5e2d13d81dba3785e27bca573ab19c49e938

Contents?: true

Size: 1.82 KB

Versions: 1

Compression:

Stored size: 1.82 KB

Contents

<% provide(:page_title, t("section.edit")) %>
<% breadcrumb_add('Secciones', sections_path) %>
<% breadcrumb_add(@section.name, section_path(@section)) %>
<div class="row-fluid">
  <div class = "widget widget-padding span12">
    <div class = "widget-header"><i class = "fa fa-tasks"></i><h5><%= @section.name %></h5></div>
    <div class = "widget-body">
      <div class = "widget-forms clearfix">
        <%= adminpanel_form_for(@section, :url => section_path(@section)) do |f| %>
          <%= render 'shared/error_messages', :object => @section %>

          <% if @section.has_description %>
            <div style="display:none;">
              <%= f.hidden_field 'description', :id => "description-field", :value => @section.description %>
            </div>
            <%= f.wysiwyg_field 'description', 'label' => I18n.t('section.description'), :name => 'description' %>
            <%= content_for :scripts do %>
              <script type="text/javascript">
              <%= render "shared/init_editor", :field_var => 'description', :label => 'description' %>
              </script>
            <% end %>
          <% else %>
            <%= f.text_field 'description', :label => t("section.description") %>
          <% end %>

          <% if @section.has_image %>
              <%= content_tag :div, :class => 'file-collection-container', :data => {:max => 1} do %>
                <%= f.fields_for :images do |builder| %>
                  <%= render 'shared/image_fields', :f => builder %>
                <% end -%>

                <%= link_to_add_fields "Agregar Imagen", f, :images %>
              <% end %>
          <% end %>
      </div>
    </div>
    <div class = "widget-footer">
      <%= f.submit t("action.save"), data: {:disable_with => t("action.submitting")}, :id => "save-button" %>
    </div>
      <% end -%>
  </div>
</div>

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
adminpanel-2.0.1 app/views/adminpanel/sections/edit.html.erb