kadmin 0.2.7 → 0.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/decorators/kadmin/finder_decorator.rb +2 -2
- data/lib/kadmin/form.rb +9 -0
- data/lib/kadmin/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: d3c0ed379c1adc9ed42f78ea9074793eb03dbcbf
|
|
4
|
+
data.tar.gz: 9c0ea65a095498ff89b6b79cd2f89e96131e4ddb
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 110dda2ffb1731c67e9f2bc2eb601bdb1223e8cf37c96c9b70e58cfd964d6bad74473634a28f3d163476136f390ba6ea7dd31be7418d36bf9a8c4f1d2cedd0d9
|
|
7
|
+
data.tar.gz: 7627e763f80145e7459a07e259ff296a5affc8a83d7e64ee3293dc0cf3cd360d37c7391122a6825ca3485da66c031baa5eb0a0e4afe3c3273ada9bdc8e32ec16
|
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Kadmin
|
|
2
2
|
|
|
3
|
-
[](https://github.com/barcoo/kadmin/releases/tag/0.2.8)
|
|
4
4
|
|
|
5
5
|
Collection of utility, configuration, etc., for admin areas in different projects.
|
|
6
6
|
|
|
@@ -34,11 +34,11 @@ module Kadmin
|
|
|
34
34
|
def applied_filters
|
|
35
35
|
filters = @finder.filters.reduce([]) do |acc, (name, filter)|
|
|
36
36
|
next(acc) if filter.value.blank?
|
|
37
|
-
acc << %(<strong>#{filter.value}</strong> on <em>#{name}</em>)
|
|
37
|
+
acc << %(<strong>#{filter.value}</strong> on <em>#{name}</em>)
|
|
38
38
|
end
|
|
39
39
|
applied_filters = "(filtering: #{filters.join('; ')})" unless filters.empty?
|
|
40
40
|
|
|
41
|
-
return applied_filters
|
|
41
|
+
return applied_filters.html_safe
|
|
42
42
|
end
|
|
43
43
|
|
|
44
44
|
# @return [Kadmin::PagerDecorator] decorated pager of the underlying finder
|
data/lib/kadmin/form.rb
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
# TODO: Figure out a way to not have to require ActiveModel/ActiveRecord preemptively
|
|
2
|
+
# perhaps by making Kadmin::Form optionally requireable?
|
|
3
|
+
require 'active_model/naming'
|
|
4
|
+
require 'active_model/callbacks'
|
|
5
|
+
require 'active_model/translation'
|
|
6
|
+
require 'active_model/validator'
|
|
7
|
+
require 'active_model/validations'
|
|
8
|
+
require 'active_record/attribute_assignment'
|
|
9
|
+
|
|
1
10
|
module Kadmin
|
|
2
11
|
# Parsing is done by using attribute setters. If you have an attribute called
|
|
3
12
|
# name, then add a reader/writer for it, name and name=, and perform the
|
data/lib/kadmin/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: kadmin
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nicolas Pepin-Perreault
|
|
@@ -10,7 +10,7 @@ authors:
|
|
|
10
10
|
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date: 2016-10-
|
|
13
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: rails
|