tranzito_utils 1.1.0 → 1.1.1

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: 3664eebcd88f56e5ecf4ab80737b75a84e86a26eed0f7af8bfbcdfd4df3c9186
4
- data.tar.gz: c6d1caffa31d644b0696ba0002ac467c1c3c9c8451b543ca26111991aa81dd74
3
+ metadata.gz: 3faa67b639b33c1c1cbb2f8d65b5f1d4f79820781ff7c286a054d017dbce00e3
4
+ data.tar.gz: cedce42eaea116b806a5b2a09a259c914ad181087a41929c0396489827d82489
5
5
  SHA512:
6
- metadata.gz: 970a0139b35777468242b4e466b9e232b8a7f3a4c4bcb363e442c4ebd8128bdfefca3a7817c5b5792de78541248002c7daf73831956cafb6f97b46da6c78fb63
7
- data.tar.gz: 9c65508c9de100b1c0f23b63f5ca1f27f31d6fefb0be771f357bd634c245d8ed9dfe15b09a37ccc7c80ecfb3ea0975bb2e47472b0e99d896f492e1aadb8ce179
6
+ metadata.gz: 8681efed6dd8c0cba41a871936b1a55bf9e7593cc61e90443b994ae80e535a9690d855609f48cd5a961b1430e68e1d96d42277732143bffd1ac6670543af5857
7
+ data.tar.gz: 24262cc48e9b4c9e70319bf723d7b4c8c7280b752c70d76d17d338ce13332936f955174328f109bfe43eea3c9bb0fea9e5c1a5632e2ea162799302638f0c0e98
@@ -0,0 +1,10 @@
1
+ .flash-alert-container
2
+ - if flash.present?
3
+ - flash.each do |type, message|
4
+ - next unless message.present?
5
+ .alert{ class: "alert-#{type}" }
6
+ %button.close{ 'data-dismiss' => 'alert' } ×
7
+ = message
8
+ - if flash[:link]
9
+ %br
10
+ link: #{link_to flash[:link], flash[:link]}
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module TranzitoUtils
4
+ module AdminHelper
5
+ def admin_number_display(number)
6
+ content_tag(:span, number_with_delimiter(number), class: (number == 0 ? "less-less-strong" : ""))
7
+ end
8
+ end
9
+ end
@@ -2,8 +2,9 @@
2
2
 
3
3
  module TranzitoUtils
4
4
  module Helpers
5
- include TranzitoUtils::SortableHelper
5
+ include TranzitoUtils::AdminHelper
6
6
  include TranzitoUtils::GraphingHelper
7
+ include TranzitoUtils::SortableHelper
7
8
 
8
9
  def in_admin?
9
10
  controller_namespace == "admin"
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TranzitoUtils
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -15,6 +15,7 @@ end
15
15
 
16
16
  require "tranzito_utils/concerns/set_period"
17
17
  require "tranzito_utils/concerns/sortable_table"
18
+ require "tranzito_utils/helpers/admin_helper"
18
19
  require "tranzito_utils/helpers/graphing_helper"
19
20
  require "tranzito_utils/helpers/sortable_helper"
20
21
  require "tranzito_utils/helpers/helpers"
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.0
4
+ version: 1.1.1
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-10-11 00:00:00.000000000 Z
13
+ date: 2022-10-12 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -59,6 +59,7 @@ files:
59
59
  - app/assets/stylesheets/tranzito_utils/_table_extensions.scss
60
60
  - app/assets/stylesheets/tranzito_utils/_utils.scss
61
61
  - app/assets/stylesheets/tranzito_utils/_variables.scss
62
+ - app/views/tranzito_utils/_flash_messages.haml
62
63
  - app/views/tranzito_utils/_period_select.html.haml
63
64
  - config/locales/en.yml
64
65
  - lib/generators/tranzito_utils/install_generator.rb
@@ -67,6 +68,7 @@ files:
67
68
  - lib/tranzito_utils/concerns/set_period.rb
68
69
  - lib/tranzito_utils/concerns/sortable_table.rb
69
70
  - lib/tranzito_utils/gem.rb
71
+ - lib/tranzito_utils/helpers/admin_helper.rb
70
72
  - lib/tranzito_utils/helpers/graphing_helper.rb
71
73
  - lib/tranzito_utils/helpers/helpers.rb
72
74
  - lib/tranzito_utils/helpers/sortable_helper.rb