tramway-admin 1.19 → 1.19.0.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: a1d2be1680ef4d50822e106f3835cb14224f26ae8e1825864c1ee012fca4bd22
4
- data.tar.gz: 71c3ff71e401be1e9bad883ab0d98bcc1887aa18943d8eb4bcc8b7c69fa4b770
3
+ metadata.gz: 4eb285f667f8b2f1f93e1b1a083f3b761fddd2a79d3b29a1c452e5e838f4e672
4
+ data.tar.gz: 2a395734c55c51d53047ccd6ab8765bbd0333633f11b2f81e4f54fe836ded972
5
5
  SHA512:
6
- metadata.gz: 227b88443bfeb1a0e3923e96424d8b9e245cd319b4ff77b0939f6c99fb30fe560425325148cdbd20e4c1ab4791e4efac073c8d13fcce01f6b6d6f678158d6782
7
- data.tar.gz: cb4a7ba86f128fa09790e224cacfb1ea448d043ca4d631f6cfcfcea30b55f7f57d7b6924efeb2ebb8cfbb582cd866c522736549b23b3d6051b6a39eedea03d26
6
+ metadata.gz: 65c87f050275a85adc9c1ec43a9b6f060098878e44a34c1abff5f53152b395f50388d2e22a60057a197069f7f0ea9a9c739ed3624e6e64242705cd642315f3b0
7
+ data.tar.gz: 3a22f0f16854d49900028c0218890c9145a26dfae0fa89a5dd2af055b60fa54b2c44204a01603dff0dbc655d1c065e7952e709fcc5a948ddc3dd3f1fabff50e2
data/README.md CHANGED
@@ -29,6 +29,7 @@ gem 'trap'
29
29
  gem 'kaminari'
30
30
  gem 'bootstrap-kaminari-views', github: 'kalashnikovisme/bootstrap-kaminari-views', branch: :master
31
31
  gem 'state_machine_buttons'
32
+ gem 'ckeditor', '4.2.4'
32
33
  ```
33
34
 
34
35
  You should remove gem `turbolinks` from your application
@@ -84,6 +85,21 @@ window.current_locale = window.i18n_locale 'en'
84
85
  ```
85
86
  to the `app/assets/javascripts/admin/application.js.coffee` file
86
87
 
88
+ ## Notifications
89
+
90
+ You can add notification to your admin panel to the navbar.
91
+
92
+ To add notification to application, you need just set queries in initializers.
93
+
94
+ *config/initializers/tramway.rb*
95
+ ```ruby
96
+ ::Tramway::Admin.set_notificable_queries :"#{your_title}" => -> { your_query }
97
+
98
+ # Example from tramway-event gem
99
+
100
+ ::Tramway::Admin.set_notificable_queries new_participants: -> { ::Tramway::Event::Participant.active.where(participation_state: :requested) }
101
+ ```
102
+
87
103
  ## Contributing
88
104
  Contribution directions go here.
89
105
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Admin
5
- VERSION = '1.19'
5
+ VERSION = '1.19.0.1'
6
6
  end
7
7
  end
data/lib/tramway/admin.rb CHANGED
@@ -93,7 +93,7 @@ module Tramway
93
93
  end
94
94
 
95
95
  def notifications
96
- @notificable_queries.reduce({}) do |hash, notification|
96
+ @notificable_queries&.reduce({}) do |hash, notification|
97
97
  hash.merge! notification[0] => notification[1].call
98
98
  end
99
99
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-admin
3
3
  version: !ruby/object:Gem::Version
4
- version: '1.19'
4
+ version: 1.19.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-16 00:00:00.000000000 Z
11
+ date: 2020-01-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bootstrap-kaminari-views