Sha256: feb2fccd896f8aab6791d4f55ee14258dc53469e1943543a1c46a865b7838788

Contents?: true

Size: 1.61 KB

Versions: 11

Compression:

Stored size: 1.61 KB

Contents

<% provide(:page_title, I18n.t('section.edit', title: @section.name)) %>
<% 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>
    <%= adminpanel_form_for @section do |f| %>
      <%= f.body do %>
        <%= render 'adminpanel/shared/error_messages', :object => @section %>

        <% if @section.has_description %>
          <%= f.wysiwyg_field 'description', 'label' => I18n.t('section.description') %>
        <% else %>
          <%= f.text_field 'description', 'label' => t("section.description") %>
        <% end %>

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

            <% if @section.max_files != 0 && @section.max_files <= @section.sectionfiles.count %>
              <% visibility = 'hidden' %>
            <% else %>
              <% visibility = 'not-hidden' %>
            <% end %>
              <%= link_to_add_fields 'Agregar Imagen', f, :sectionfiles, visibility %>
          <% end %>
        <% end %>
      <% end %>
      <%= f.footer do %>
        <%= f.submit t('action.save', resource: @section.name), data: {:disable_with => t("action.submitting")}, :id => "save-button" %>
      <% end %>
    <% end -%>
  </div>
</div>

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
adminpanel-2.6.1 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.6.0 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.5.5 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.5.4 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.5.3 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.5.2 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.5.1 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.5.0 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.4.3 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.4.2 app/views/adminpanel/sections/edit.html.erb
adminpanel-2.4.1 app/views/adminpanel/sections/edit.html.erb