rao-component 0.0.6.pre → 0.0.7.pre
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/rao/component/_resource_table.html.haml +11 -5
- 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: 178e9c2b8757f133512f731f40299d913edb0efb
|
4
|
+
data.tar.gz: 0ce7392c3abcef9fde28bf08d5a8fe70b0e3125d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d27ab1addbce54d414c8afa6b02a60356526064c5e37e7fda2a853836f39e752da93c91fd8869c430f4b3dabf4645635ffdee1a3aed330039e17c75323e58120
|
7
|
+
data.tar.gz: 3382f5e8f2e177c2f911531dcd3558ff822f6c8429db857bcc5993b5b1891481c5fd516b3c0678879eb5d3b798b47e969d86c4ded9fbf297cbac46f3e96ea142
|
@@ -1,15 +1,21 @@
|
|
1
|
+
:ruby
|
2
|
+
tr_prefix = if resource.respond_to?(:to_key)
|
3
|
+
dom_id(resource)
|
4
|
+
else
|
5
|
+
"#{resource.class.name.underscore.gsub('/', '-')}-#{resource.object_id}"
|
6
|
+
end
|
1
7
|
%table{ class: table_css_classes }
|
2
8
|
- rows.each do |name, options|
|
3
|
-
%tr
|
9
|
+
%tr{ class: "attribute-#{name}", id: "#{tr_prefix}-#{name}"}
|
4
10
|
- if resource_class.respond_to? :human_attribute_name
|
5
|
-
%th
|
11
|
+
%th{ class: 'attribute-name' }
|
6
12
|
= resource_class.human_attribute_name(name)
|
7
13
|
- else
|
8
|
-
%th
|
14
|
+
%th{ class: 'attribute-name' }
|
9
15
|
= name
|
10
16
|
- if options[:block].present?
|
11
|
-
%td
|
17
|
+
%td{ class: 'attribute-value' }
|
12
18
|
= options[:block].call(resource)
|
13
19
|
- else
|
14
|
-
%td
|
20
|
+
%td{ class: 'attribute-value' }
|
15
21
|
= render partial: "rao/component/table/body_cells/#{options[:render_as]}", locals: { resource: resource, name: name, options: options }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rao-component
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7.pre
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Roberto Vasquez Angel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|