#index-container{ :controller => "functions" } .container .row .listing.col-lg-12.col-xs-12 %section.content-header.index-header %h1{ style: 'display: inline-block' } = t("keppler_frontend.modules.#{controller_path.underscore}") = entries(@total, @objects) %section.content-actions .toolbar .toolbar-item = link_to reload_admin_frontend_functions_path, class: "tool-btn", remote: true do %i.icon-reload - if can?(KepplerFrontend::Function).download? .toolbar-item = link_to admin_frontend_function_download_path(KepplerFrontend::Function, :format => :xls), class: "tool-btn", title: t('keppler.actions.download_records') do %i.icon-cloud-download - if can?(KepplerFrontend::Function).upload? .toolbar-item = link_to "", class: "tool-btn", title: t('keppler.actions.upload_records'), id: "function" do %i.icon-cloud-upload .toolbar-item %a.tool-btn{"data-confirm" => "¿Estás seguro?", "data-method" => "delete", "v-bind:href" => "link", :rel => "nofollow", ":class" => "{disabled: !checks}" } %i.icon-trash .hide = form_tag admin_frontend_function_upload_path(@objects), id: "upload_form_functions", multipart: true, method: :post do = file_field_tag :file, id: "upload_file_function" - if can?(KepplerFrontend::Function).create? .add = link_to new_admin_frontend_function_path, class: 'btn-add' do + = t('keppler.actions.add') .box.slice-box .box-body.no-padding %table.table %thead - if @objects.size.zero? %tr %th.not-records.center %h6= t('keppler.messages.not_found_records', model: t("keppler.models.pluralize.functions")) - else %tr %th - if can?(KepplerFrontend::Function).destroy_multiple? .item-check .checkbox %label{ for: 'checkbox-all' } %input{ type: 'checkbox', id: 'checkbox-all', ':disabled' => 'checkItems ? disabled : ""', '@click' => 'selectAll()' } %span.cr %i.cr-icon.glyphicon.glyphicon-ok %th.hidden-xs = sort_link(@q, :name) do = t('activerecord.attributes.name') %th.hidden-xs.hidden-sm = sort_link(@q, :description) do = t('activerecord.attributes.description') %th %tbody.objects-container = render 'admin/layouts/listing_preloader' = render 'listing', objects: @objects %center#paginator-module = paginate @objects, window: 1 %aside.control-sidebar = render "description" :javascript $(document).ready(function(){ $('#function').click(function() { $('#upload_file_function').click() $('#upload_file_function').change(function() { $('.waiting').css('display', 'block') $('#upload_form_function').submit() }) }); renderImg(); });