ref: master
plugins/fbes/views/public/show.html.slim
h1= t"fbes_plugin.views.queries.#{params[:action]}" p | Total de #{@result_full_count} resultados. Página #{@npage} de #{@result_pages}. br = button :back, 'Voltar à lista de estatísticas', 'http://cirandas.net/plugin/fbes/queries' |  = button :save, 'Exportar dados para planilha', "http://cirandas.net/plugin/fbes/queries/#{params[:action]}?per_page=all&format=csv", option: 'primary' br.clean/ br/ = render 'pagination' #fbes-plugin-results-table.table-responsive table.table.table-striped thead tr - @result.first.keys.each do |header| - if !['profile_id', 'id', 'full_count'].include?(header) th= header tbody - @result.each do |line| tr - line.each do |value| - if !['profile_id', 'id', 'full_count'].include? value[0] td - case value[0] - when 'url', 'site' = link_to value[1], value[1], :target => "_blank" - when 'perfil_cirandas' = link_to(value[1], "http://cirandas.net/#{value[1]}", :target => "_blank") - when 'mes' = Date.parse(value[1]+'-01').strftime("%b/%Y") - when 'total_pedidos', 'valor_total_pedidos' = number_to_currency(value[1], {locale: :pt_BR, precision: 2, separator: ',', delimiter: '.'}) - when 'pagina_no_facebook' = link_to(value[1], "https://www.facebook.com/pages/_/#{value[1]}?sk=app_231071397085577", :target => "_blank") - when 'produtos' - if (!value[1].empty?) = button_to_function_without_text 'eyes', "Ver produtos", "jQuery(this).next('div').toggle(500)" div style="display:none" = value[1] - else = value[1] css: @-moz-document url-prefix() { fieldset { display: table-cell; } } /**#fbes-plugin-results-table { */ table { width: 100%; } thead, tbody, tr, td, th { display: block; } tr:after { content: ' '; display: block; visibility: hidden; clear: both; } thead th { height: 30px; } tbody { height: 120px; overflow-y: auto; } thead { } tbody td, thead th { width: 19.2%; float: left; } } */ = render 'pagination'