tranzito_utils 1.1.6 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/kaminari/_first_page.html.erb +13 -0
- data/app/views/kaminari/_gap.html.erb +8 -0
- data/app/views/kaminari/_last_page.html.erb +13 -0
- data/app/views/kaminari/_next_page.html.erb +13 -0
- data/app/views/kaminari/_page.html.erb +12 -0
- data/app/views/kaminari/_paginator.html.erb +26 -0
- data/app/views/kaminari/_prev_page.html.erb +13 -0
- data/app/views/tranzito_utils/_pagination.html.haml +30 -0
- data/lib/tranzito_utils/version.rb +1 -1
- metadata +28 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8a378466467dabf3f6c293dbc2284c7cbac97f983607a21e4e9ce26beb01b4ca
|
4
|
+
data.tar.gz: 896f77bf1bfef13a9f69b3957727d28f88e0df0bd965c843199a974099241bbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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?, '«'.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?, '»'.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?, '›'.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?, '‹'.html_safe, url, :rel => 'prev', :remote => remote, :class => 'page-link' %>
|
12
|
+
</li>
|
13
|
+
<% end %>
|
@@ -0,0 +1,30 @@
|
|
1
|
+
-# Requires locals: collection, name
|
2
|
+
- count ||= collection.total_count
|
3
|
+
- skip_total ||= false
|
4
|
+
- skip_pagination ||= false
|
5
|
+
-# override added to convert Created to Imported - for clarity in payroll_times
|
6
|
+
- humanized_time_range_column_override ||= nil
|
7
|
+
|
8
|
+
.row.mt-4.mb-4
|
9
|
+
- unless skip_total
|
10
|
+
.col-md-5
|
11
|
+
%p.pagination-number
|
12
|
+
%strong= number_with_delimiter(count)
|
13
|
+
Matching #{name.pluralize(count)}
|
14
|
+
|
15
|
+
-# Almost all have time range...
|
16
|
+
- if defined?(@time_range) && @period != "all"
|
17
|
+
%em
|
18
|
+
- if defined?(@time_range_column)
|
19
|
+
%strong
|
20
|
+
- if humanized_time_range_column_override.present?
|
21
|
+
= humanized_time_range_column_override
|
22
|
+
- else
|
23
|
+
= humanized_time_range_column(@time_range_column)
|
24
|
+
= humanized_time_range(@time_range)
|
25
|
+
- unless skip_pagination
|
26
|
+
.pagination-flex.justify-content-md-end{class: (skip_total ? "col-12" : "col-md-7")}
|
27
|
+
= paginate collection
|
28
|
+
- if count > @per_page.to_i
|
29
|
+
- per_pages = [10, 25, 50, 100, @per_page.to_i].uniq.sort
|
30
|
+
= select_tag :per_page_select, options_for_select(per_pages.map { |i| ["#{i} / page", i] }, selected: @per_page), { class: "form-control per-page-select" }
|
metadata
CHANGED
@@ -1,16 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tranzito_utils
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- willbarrettdev
|
8
8
|
- sethherr
|
9
9
|
- hafiz-ahmed
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2022-10
|
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,7 +73,15 @@ 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
|
84
|
+
- app/views/tranzito_utils/_pagination.html.haml
|
63
85
|
- app/views/tranzito_utils/_period_select.html.haml
|
64
86
|
- config/locales/en.yml
|
65
87
|
- lib/generators/tranzito_utils/install_generator.rb
|
@@ -81,7 +103,7 @@ licenses:
|
|
81
103
|
metadata:
|
82
104
|
homepage_uri: https://github.com/Tranzito/tranzito_utils
|
83
105
|
source_code_uri: https://github.com/Tranzito/tranzito_utils
|
84
|
-
post_install_message:
|
106
|
+
post_install_message:
|
85
107
|
rdoc_options: []
|
86
108
|
require_paths:
|
87
109
|
- lib
|
@@ -96,8 +118,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
118
|
- !ruby/object:Gem::Version
|
97
119
|
version: '0'
|
98
120
|
requirements: []
|
99
|
-
rubygems_version: 3.1.
|
100
|
-
signing_key:
|
121
|
+
rubygems_version: 3.1.2
|
122
|
+
signing_key:
|
101
123
|
specification_version: 4
|
102
124
|
summary: Ruby gem contain several modules mainly containing the helpers, concerns
|
103
125
|
and services for personal use by Tranzito
|