wallaby 6.0.2 → 6.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/wallaby/resources/_active_storage.html.erb +5 -0
- data/app/views/wallaby/resources/_resource_actions.html.erb +3 -0
- data/app/views/wallaby/resources/index/_belongs_to.html.erb +5 -0
- data/app/views/wallaby/resources/index/_bigint.html.erb +5 -0
- data/app/views/wallaby/resources/index/_bigserial.html.erb +5 -0
- data/app/views/wallaby/resources/index/_binary.html.erb +5 -0
- data/app/views/wallaby/resources/index/_bit.html.erb +9 -0
- data/app/views/wallaby/resources/index/_bit_varying.html.erb +9 -0
- data/app/views/wallaby/resources/index/_blob.html.erb +5 -0
- data/app/views/wallaby/resources/index/_boolean.html.erb +9 -0
- data/app/views/wallaby/resources/index/_box.html.erb +16 -0
- data/app/views/wallaby/resources/index/_cidr.html.erb +13 -0
- data/app/views/wallaby/resources/index/_circle.html.erb +16 -0
- data/app/views/wallaby/resources/index/_citext.html.erb +16 -0
- data/app/views/wallaby/resources/index/_color.html.erb +10 -0
- data/app/views/wallaby/resources/index/_date.html.erb +11 -0
- data/app/views/wallaby/resources/index/_daterange.html.erb +12 -0
- data/app/views/wallaby/resources/index/_datetime.html.erb +11 -0
- data/app/views/wallaby/resources/index/_decimal.html.erb +5 -0
- data/app/views/wallaby/resources/index/_email.html.erb +5 -0
- data/app/views/wallaby/resources/index/_float.html.erb +5 -0
- data/app/views/wallaby/resources/index/_has_and_belongs_to_many.html.erb +15 -0
- data/app/views/wallaby/resources/index/_has_many.html.erb +15 -0
- data/app/views/wallaby/resources/index/_has_one.html.erb +5 -0
- data/app/views/wallaby/resources/index/_hstore.html.erb +16 -0
- data/app/views/wallaby/resources/index/_inet.html.erb +13 -0
- data/app/views/wallaby/resources/index/_int4range.html.erb +11 -0
- data/app/views/wallaby/resources/index/_int8range.html.erb +11 -0
- data/app/views/wallaby/resources/index/_integer.html.erb +5 -0
- data/app/views/wallaby/resources/index/_json.html.erb +16 -0
- data/app/views/wallaby/resources/index/_jsonb.html.erb +16 -0
- data/app/views/wallaby/resources/index/_line.html.erb +16 -0
- data/app/views/wallaby/resources/index/_link.html.erb +5 -0
- data/app/views/wallaby/resources/index/_longblob.html.erb +5 -0
- data/app/views/wallaby/resources/index/_longtext.html.erb +16 -0
- data/app/views/wallaby/resources/index/_lseg.html.erb +16 -0
- data/app/views/wallaby/resources/index/_ltree.html.erb +16 -0
- data/app/views/wallaby/resources/index/_macaddr.html.erb +9 -0
- data/app/views/wallaby/resources/index/_mediumblob.html.erb +5 -0
- data/app/views/wallaby/resources/index/_mediumtext.html.erb +16 -0
- data/app/views/wallaby/resources/index/_money.html.erb +5 -0
- data/app/views/wallaby/resources/index/_numrange.html.erb +11 -0
- data/app/views/wallaby/resources/index/_password.html.erb +9 -0
- data/app/views/wallaby/resources/index/_path.html.erb +16 -0
- data/app/views/wallaby/resources/index/_point.html.erb +13 -0
- data/app/views/wallaby/resources/index/_polygon.html.erb +16 -0
- data/app/views/wallaby/resources/index/_raw.html.erb +9 -0
- data/app/views/wallaby/resources/index/_serial.html.erb +5 -0
- data/app/views/wallaby/resources/index/_sti.html.erb +16 -0
- data/app/views/wallaby/resources/index/_string.html.erb +16 -0
- data/app/views/wallaby/resources/index/_text.html.erb +16 -0
- data/app/views/wallaby/resources/index/_time.html.erb +10 -0
- data/app/views/wallaby/resources/index/_tinyblob.html.erb +5 -0
- data/app/views/wallaby/resources/index/_tinytext.html.erb +16 -0
- data/app/views/wallaby/resources/index/_tsrange.html.erb +12 -0
- data/app/views/wallaby/resources/index/_tstzrange.html.erb +12 -0
- data/app/views/wallaby/resources/index/_tsvector.html.erb +16 -0
- data/app/views/wallaby/resources/index/_unsigned_bigint.html.erb +5 -0
- data/app/views/wallaby/resources/index/_unsigned_decimal.html.erb +5 -0
- data/app/views/wallaby/resources/index/_unsigned_float.html.erb +5 -0
- data/app/views/wallaby/resources/index/_unsigned_integer.html.erb +5 -0
- data/app/views/wallaby/resources/index/_uuid.html.erb +16 -0
- data/app/views/wallaby/resources/index/_xml.html.erb +16 -0
- data/lib/wallaby/version.rb +1 -2
- metadata +74 -74
- data/app/views/wallaby/resources/active_storage_html.rb +0 -13
- data/app/views/wallaby/resources/index/belongs_to_html.rb +0 -15
- data/app/views/wallaby/resources/index/bigint_html.rb +0 -15
- data/app/views/wallaby/resources/index/bigserial_html.rb +0 -15
- data/app/views/wallaby/resources/index/binary_html.rb +0 -15
- data/app/views/wallaby/resources/index/bit_html.rb +0 -19
- data/app/views/wallaby/resources/index/bit_varying_html.rb +0 -19
- data/app/views/wallaby/resources/index/blob_html.rb +0 -15
- data/app/views/wallaby/resources/index/boolean_html.rb +0 -19
- data/app/views/wallaby/resources/index/box_html.rb +0 -11
- data/app/views/wallaby/resources/index/cidr_html.rb +0 -11
- data/app/views/wallaby/resources/index/circle_html.rb +0 -11
- data/app/views/wallaby/resources/index/citext_html.rb +0 -11
- data/app/views/wallaby/resources/index/color_html.rb +0 -20
- data/app/views/wallaby/resources/index/date_html.rb +0 -21
- data/app/views/wallaby/resources/index/daterange_html.rb +0 -22
- data/app/views/wallaby/resources/index/datetime_html.rb +0 -21
- data/app/views/wallaby/resources/index/decimal_html.rb +0 -15
- data/app/views/wallaby/resources/index/email_html.rb +0 -15
- data/app/views/wallaby/resources/index/float_html.rb +0 -15
- data/app/views/wallaby/resources/index/has_and_belongs_to_many_html.rb +0 -11
- data/app/views/wallaby/resources/index/has_many_html.rb +0 -25
- data/app/views/wallaby/resources/index/has_one_html.rb +0 -15
- data/app/views/wallaby/resources/index/hstore_html.rb +0 -11
- data/app/views/wallaby/resources/index/inet_html.rb +0 -23
- data/app/views/wallaby/resources/index/int4range_html.rb +0 -11
- data/app/views/wallaby/resources/index/int8range_html.rb +0 -11
- data/app/views/wallaby/resources/index/integer_html.rb +0 -15
- data/app/views/wallaby/resources/index/json_html.rb +0 -26
- data/app/views/wallaby/resources/index/jsonb_html.rb +0 -11
- data/app/views/wallaby/resources/index/line_html.rb +0 -26
- data/app/views/wallaby/resources/index/link_html.rb +0 -15
- data/app/views/wallaby/resources/index/longblob_html.rb +0 -15
- data/app/views/wallaby/resources/index/longtext_html.rb +0 -11
- data/app/views/wallaby/resources/index/lseg_html.rb +0 -11
- data/app/views/wallaby/resources/index/ltree_html.rb +0 -11
- data/app/views/wallaby/resources/index/macaddr_html.rb +0 -19
- data/app/views/wallaby/resources/index/mediumblob_html.rb +0 -15
- data/app/views/wallaby/resources/index/mediumtext_html.rb +0 -11
- data/app/views/wallaby/resources/index/money_html.rb +0 -15
- data/app/views/wallaby/resources/index/numrange_html.rb +0 -21
- data/app/views/wallaby/resources/index/password_html.rb +0 -19
- data/app/views/wallaby/resources/index/path_html.rb +0 -26
- data/app/views/wallaby/resources/index/point_html.rb +0 -23
- data/app/views/wallaby/resources/index/polygon_html.rb +0 -11
- data/app/views/wallaby/resources/index/raw_html.rb +0 -19
- data/app/views/wallaby/resources/index/serial_html.rb +0 -15
- data/app/views/wallaby/resources/index/sti_html.rb +0 -11
- data/app/views/wallaby/resources/index/string_html.rb +0 -26
- data/app/views/wallaby/resources/index/text_html.rb +0 -26
- data/app/views/wallaby/resources/index/time_html.rb +0 -20
- data/app/views/wallaby/resources/index/tinyblob_html.rb +0 -15
- data/app/views/wallaby/resources/index/tinytext_html.rb +0 -11
- data/app/views/wallaby/resources/index/tsrange_html.rb +0 -11
- data/app/views/wallaby/resources/index/tstzrange_html.rb +0 -11
- data/app/views/wallaby/resources/index/tsvector_html.rb +0 -11
- data/app/views/wallaby/resources/index/unsigned_bigint_html.rb +0 -15
- data/app/views/wallaby/resources/index/unsigned_decimal_html.rb +0 -15
- data/app/views/wallaby/resources/index/unsigned_float_html.rb +0 -15
- data/app/views/wallaby/resources/index/unsigned_integer_html.rb +0 -15
- data/app/views/wallaby/resources/index/uuid_html.rb +0 -11
- data/app/views/wallaby/resources/index/xml_html.rb +0 -11
- data/app/views/wallaby/resources/resource_actions_html.rb +0 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bf461ecdd7f1605b7a79e4440e7b9b7f2bbe24aac0389252633cc5afc22f15de
|
4
|
+
data.tar.gz: 4d6357a2e6c241e382769b39e8ad26acae965210e2ff0ab3bc89c4e187ac9d72
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43add18799226503ac25d194ad88df0f251c262eaab54e0fc7a25cd7c14d519eaf9cb390569a8b0737267ccb46356f44ba940c1b615f4461ed910dfaccbd6899
|
7
|
+
data.tar.gz: 72fa73cdf02ecb7efe8875b819cdcdb70b3cd76cf8f172bf4f7517723408882e2a4869727dd741ee4eb0b0fe58c83c623ea40c377fbd3d29bacb690fe948ef56
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= value.try(:attachment) ? link_to(value.attachment.blob.filename, rails_blob_path(value)) : null %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= value.present? ? show_link(value, options: { readonly: true }) : null %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
content_tag :code, value
|
9
|
+
end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
content_tag :code, value
|
9
|
+
end %>
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
value ? fa_icon('check-square') : fa_icon('square')
|
9
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
itooltip value
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
concat content_tag(:code, value)
|
9
|
+
link_to(
|
10
|
+
fa_icon('link'), "http://ip-api.com/##{value}",
|
11
|
+
target: :_blank, class: 'text-info'
|
12
|
+
)
|
13
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
itooltip value
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:span, value.truncate(max))
|
12
|
+
imodal metadata[:label], value
|
13
|
+
else
|
14
|
+
value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,10 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
concat content_tag(:span, nil, style: "background-color: #{value};", class: 'color-square')
|
9
|
+
content_tag(:span, value, class: 'text-uppercase')
|
10
|
+
end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
value = Time.zone.parse value if value.is_a? String
|
9
|
+
value = value.to_date if value.is_a? Time
|
10
|
+
I18n.l value
|
11
|
+
end %>
|
@@ -0,0 +1,12 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
concat content_tag(:span, I18n.l(value.first, format: :short), class: 'from')
|
9
|
+
concat '...'
|
10
|
+
concat content_tag(:span, I18n.l(value.last, format: :short), class: 'to')
|
11
|
+
itooltip "#{I18n.l value.first} ... #{I18n.l value.last}", 'time'
|
12
|
+
end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
value = Time.zone.parse value if value.is_a? String
|
9
|
+
concat content_tag(:span, I18n.l(value, format: :short))
|
10
|
+
itooltip I18n.l(value), 'time'
|
11
|
+
end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<% unique_collection = value.uniq %>
|
6
|
+
<%= raw unique_collection.first(2).map { |item| show_link item, options: { readonly: true } }.join(', ') %>
|
7
|
+
<%= if unique_collection.length > 2
|
8
|
+
title = metadata[:label]
|
9
|
+
body = unique_collection.map { |item| show_link item, options: { readonly: true } }.to_sentence.html_safe
|
10
|
+
label = "#{unique_collection.length - 2} more"
|
11
|
+
concat ' and '
|
12
|
+
imodal title, body, label: label
|
13
|
+
elsif unique_collection.blank?
|
14
|
+
null
|
15
|
+
end %>
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<% unique_collection = value.uniq %>
|
6
|
+
<%= raw unique_collection.first(2).map { |item| show_link item, options: { readonly: true } }.join(', ') %>
|
7
|
+
<%= if unique_collection.length > 2
|
8
|
+
title = metadata[:label]
|
9
|
+
body = unique_collection.map { |item| show_link item, options: { readonly: true } }.to_sentence.html_safe
|
10
|
+
label = "#{unique_collection.length - 2} more"
|
11
|
+
concat ' and '
|
12
|
+
imodal title, body, label: label
|
13
|
+
elsif unique_collection.blank?
|
14
|
+
null
|
15
|
+
end %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= value.present? ? show_link(value, options: { readonly: true }) : null %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
imodal metadata[:label], "<pre>#{h value}</pre>".html_safe
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,13 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
concat content_tag(:code, value)
|
9
|
+
link_to(
|
10
|
+
fa_icon('link'), "http://ip-api.com/##{value}",
|
11
|
+
target: :_blank, class: 'text-info'
|
12
|
+
)
|
13
|
+
end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
concat content_tag(:span, value.first, class: 'from')
|
9
|
+
concat '...'
|
10
|
+
content_tag(:span, value.last, class: 'to')
|
11
|
+
end %>
|
@@ -0,0 +1,11 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
concat content_tag(:span, value.first, class: 'from')
|
9
|
+
concat '...'
|
10
|
+
content_tag(:span, value.last, class: 'to')
|
11
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
imodal metadata[:label], "<pre>#{h value}</pre>".html_safe
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
imodal metadata[:label], "<pre>#{h value}</pre>".html_safe
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
itooltip value
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,5 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= value.nil? ? null : link_to(metadata[:title], value, metadata[:html_options]) %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:span, value.truncate(max))
|
12
|
+
imodal metadata[:label], value
|
13
|
+
else
|
14
|
+
value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:code, value.truncate(max))
|
12
|
+
itooltip value
|
13
|
+
else
|
14
|
+
content_tag :code, value
|
15
|
+
end
|
16
|
+
end %>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<%# @param object [model] model instance %>
|
2
|
+
<%# @param field_name [String] name of the field %>
|
3
|
+
<%# @param value [Object] value of the field %>
|
4
|
+
<%# @param metadata [Hash] metadata of the field %>
|
5
|
+
<%= if value.nil?
|
6
|
+
null
|
7
|
+
else
|
8
|
+
max = metadata[:max] || default_metadata.max
|
9
|
+
value = value.to_s
|
10
|
+
if value.length > max
|
11
|
+
concat content_tag(:span, value.truncate(max))
|
12
|
+
imodal metadata[:label], value
|
13
|
+
else
|
14
|
+
value
|
15
|
+
end
|
16
|
+
end %>
|