tranzito_utils 1.1.7 → 1.1.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c14aa414b13b803a8098d4664827129745a29770efe2eb968c7e14da6eb6f1d9
4
- data.tar.gz: e12e0f60e7dd446a968ea5c176c0638b8840ba7c8157b4722d63c0423fbe095a
3
+ metadata.gz: 8a378466467dabf3f6c293dbc2284c7cbac97f983607a21e4e9ce26beb01b4ca
4
+ data.tar.gz: 896f77bf1bfef13a9f69b3957727d28f88e0df0bd965c843199a974099241bbb
5
5
  SHA512:
6
- metadata.gz: 95998f588a239a9e27bad0eb9cef44a233dce7a381ec34289f7d4438e203c5be1e6da5dfe39540e814557f7fb19613f377e7716ecf0d2a765afefcc43ee79da0
7
- data.tar.gz: 557bd906a23a87a32bc23a5dc73d7e1d5c0b73a7194669a3d17e0779edcaff813abc23ebfd5b7e5d8d5e14c2e02d35080426058984038d65af26d7289c2a8ab3
6
+ metadata.gz: 5e3c02177a0f97495a52d024d032e490bb03aa05bfd1a1ae312015f6a441d5d0ee58a67606a11773c6c683b00a8fa5ed5ce227f725b8434339786993a8f079b2
7
+ data.tar.gz: 2ccef52e9e18c15be63840eb807383a780e6ab86e76621f619ace62b55173574b6d2c96d2c042b03f85cfbea112dffc84e11d578c5f1e7fcb119431872342881
@@ -0,0 +1,13 @@
1
+ <%# Link to the "First" page
2
+ - available local variables
3
+ url: url to the first page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.first? %>
10
+ <li class="page-item">
11
+ <%= link_to_unless current_page.first?, '&laquo;'.html_safe, url, :class => 'page-link', :remote => remote %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,8 @@
1
+ <%# Non-link tag that stands for skipped pages...
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ -%>
8
+ <li class="page-item disabled"><a href="#" onclick="return false;" class="page-link"><%= raw(t 'views.pagination.truncate') %></a></li>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Last" page
2
+ - available local variables
3
+ url: url to the last page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.last? %>
10
+ <li class="page-item">
11
+ <%= link_to_unless current_page.last?, '&raquo;'.html_safe, url, :class => 'page-link', :remote => remote %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Next" page
2
+ - available local variables
3
+ url: url to the next page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.last? %>
10
+ <li class="page-item">
11
+ <%= link_to_unless current_page.last?, '&rsaquo;'.html_safe, url, :class => 'page-link', :rel => 'next', :remote => remote %>
12
+ </li>
13
+ <% end %>
@@ -0,0 +1,12 @@
1
+ <%# Link showing page number
2
+ - available local variables
3
+ page: a page object for "this" page
4
+ url: url to this page
5
+ current_page: a page object for the currently displayed page
6
+ num_pages: total number of pages
7
+ per_page: number of items to fetch per page
8
+ remote: data-remote
9
+ -%>
10
+ <li class="page-item<%= ' active' if page.current? %>">
11
+ <%= link_to page, url, opts = {:remote => remote, :class => 'page-link', :rel => page.next? ? 'next' : page.prev? ? 'prev' : nil} %>
12
+ </li>
@@ -0,0 +1,26 @@
1
+ <%# The container tag
2
+ - available local variables
3
+ current_page: a page object for the currently displayed page
4
+ num_pages: total number of pages
5
+ per_page: number of items to fetch per page
6
+ remote: data-remote
7
+ paginator: the paginator that renders the pagination tags inside
8
+ -%>
9
+ <%- pagination_class ||= '' %>
10
+ <%= paginator.render do -%>
11
+ <nav>
12
+ <ul class="pagination <%= pagination_class %>">
13
+ <%= first_page_tag unless current_page.first? %>
14
+ <%= prev_page_tag unless current_page.first? %>
15
+ <% each_page do |page| -%>
16
+ <% if page.left_outer? || page.right_outer? || page.inside_window? -%>
17
+ <%= page_tag page %>
18
+ <% elsif !page.was_truncated? -%>
19
+ <%= gap_tag %>
20
+ <% end -%>
21
+ <% end -%>
22
+ <%= next_page_tag unless current_page.last? %>
23
+ <%= last_page_tag unless current_page.last? %>
24
+ </ul>
25
+ </nav>
26
+ <% end -%>
@@ -0,0 +1,13 @@
1
+ <%# Link to the "Previous" page
2
+ - available local variables
3
+ url: url to the previous page
4
+ current_page: a page object for the currently displayed page
5
+ num_pages: total number of pages
6
+ per_page: number of items to fetch per page
7
+ remote: data-remote
8
+ -%>
9
+ <% unless current_page.first? %>
10
+ <li class="page-item">
11
+ <%= link_to_unless current_page.first?, '&lsaquo;'.html_safe, url, :rel => 'prev', :remote => remote, :class => 'page-link' %>
12
+ </li>
13
+ <% end %>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TranzitoUtils
4
- VERSION = "1.1.7"
4
+ VERSION = "1.1.8"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tranzito_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.7
4
+ version: 1.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - willbarrettdev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2022-11-09 00:00:00.000000000 Z
13
+ date: 2022-11-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -40,6 +40,20 @@ dependencies:
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
42
  version: '0'
43
+ - !ruby/object:Gem::Dependency
44
+ name: kaminari
45
+ requirement: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
43
57
  description: Ruby gem contain several modules mainly containing the helpers, concerns
44
58
  and services for personal use by Tranzito
45
59
  email:
@@ -59,6 +73,13 @@ files:
59
73
  - app/assets/stylesheets/tranzito_utils/_period_selection.scss
60
74
  - app/assets/stylesheets/tranzito_utils/_table_extensions.scss
61
75
  - app/assets/stylesheets/tranzito_utils/_utilities.scss
76
+ - app/views/kaminari/_first_page.html.erb
77
+ - app/views/kaminari/_gap.html.erb
78
+ - app/views/kaminari/_last_page.html.erb
79
+ - app/views/kaminari/_next_page.html.erb
80
+ - app/views/kaminari/_page.html.erb
81
+ - app/views/kaminari/_paginator.html.erb
82
+ - app/views/kaminari/_prev_page.html.erb
62
83
  - app/views/tranzito_utils/_flash_messages.html.haml
63
84
  - app/views/tranzito_utils/_pagination.html.haml
64
85
  - app/views/tranzito_utils/_period_select.html.haml