Sha256: 9fc6f7d03e7ea50aaf6dd37f4d46728796a20067edc3cbc0cf11a634b60a1171
Contents?: true
Size: 1.81 KB
Versions: 2
Compression:
Stored size: 1.81 KB
Contents
-offset = filters["offset"].nil? ? 0 : filters["offset"].to_i -pages = (total.to_f / filters["limit"].to_f).ceil -position = offset % 5 .card#form.no-print.m-b-10 .card-body.card-padding .row .col-sm-12 == slim :'forms/multiple_select', locals: { :name => "user_id", :elements => notifications.collect { |notification| { :value => notification.creator.id, :text => notification.creator.full_name } }.uniq, :placeholder => "Empleados", :filters => filters } .col-md-12 == slim :'forms/multiple_select', locals: { :name => "label", :elements => Notification.labels.collect { |notification| { :value => notification.label, :text => notification.label.upcase } }, :placeholder => "Etiquetas", :filters => filters } .pm-body.clearfix ul.tab-nav.tn-justified role="tablist" li.waves-effect.active role="presentation" a onclick="advance_search();" span Buscar -if pages > 1 .row .col-sm-12 .text-center ul.pagination.no-margin style="vertical-align:middle" li.page-first a href="#" onclick="advance_search(0);" « -if offset > 0 li.page-pre a href="#" onclick="advance_search(#{offset - 1});" ‹ input.form-control.text-center name="offset" type="number" max="#{pages}" min="1" value="#{offset+1}" style="vertical-align:middle;display:inline-block;width:100px" ul.pagination.no-margin style="vertical-align:middle" -if offset < pages -1 li.page-next a href="#" onclick="advance_search(#{offset + 1});" › li.page-last a onclick="advance_search(#{pages-1});" » javascript: function advance_search(offset) { filter_map = buildFilterMap(offset); window.location.href = "/notifications?" + encodeQueryData(filter_map); };
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
sinatra-hexacta-0.0.2 | lib/sinatra/views/notifications/form.slim |
sinatra-hexacta-0.0.1 | lib/sinatra/views/notifications/form.slim |