lib/pagy/extras/semantic.rb in pagy-5.7.1 vs lib/pagy/extras/semantic.rb in pagy-5.7.2
- old
+ new
@@ -24,11 +24,11 @@
end
html << pagy_semantic_next_html(pagy, link)
html << %(</div>)
end
- # Javascript pagination for semantic: it returns a nav and a JSON tag used by the Pagy.nav javascript
+ # Javascript pagination for semantic: it returns a nav and a JSON tag used by the pagy.js file
def pagy_semantic_nav_js(pagy, pagy_id: nil, link_extra: '', **vars)
sequels = pagy.sequels(**vars)
p_id = %( id="#{pagy_id}") if pagy_id
link = pagy_link_proc(pagy, link_extra: %(class="item" #{link_extra}))
tags = { 'before' => pagy_semantic_prev_html(pagy, link),
@@ -39,20 +39,20 @@
%(<div#{p_id} class="#{'pagy-rjs ' if sequels.size > 1}pagy-semantic-nav-js ui pagination menu" role="navigation" #{
pagy_json_attr(pagy, :nav, tags, sequels, pagy.label_sequels(sequels))}></div>)
end
- # Combo pagination for semantic: it returns a nav and a JSON tag used by the Pagy.combo_nav javascript
+ # Combo pagination for semantic: it returns a nav and a JSON tag used by the pagy.js file
def pagy_semantic_combo_nav_js(pagy, pagy_id: nil, link_extra: '')
p_id = %( id="#{pagy_id}") if pagy_id
link = pagy_link_proc(pagy, link_extra: %(class="item" #{link_extra}))
p_page = pagy.page
p_pages = pagy.pages
input = %(<input type="number" min="1" max="#{p_pages}" value="#{
p_page}" style="padding: 0; text-align: center; width: #{p_pages.to_s.length + 1}rem; margin: 0 0.3rem">)
%(<div#{p_id} class="pagy-semantic-combo-nav-js ui compact menu" role="navigation" #{
- pagy_json_attr pagy, :combo_nav, pagy_marked_link(link)}>#{
+ pagy_json_attr pagy, :combo, pagy_marked_link(link)}>#{
pagy_semantic_prev_html pagy, link
}<div class="pagy-combo-input item">#{
pagy_t 'pagy.combo_nav_js', page_input: input, count: p_page, pages: p_pages
}</div> #{
pagy_semantic_next_html pagy, link