kadmin 1.2.0 → 1.2.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: 8c6153d0dc1a36c9b7066b1fa6a030a9891047f57a89d759e9016d08dcfdc416
4
- data.tar.gz: 705b7ea2a3955b239c5cbeda6b220767644df8c1c7dd12453ca890eafa54f314
3
+ metadata.gz: 3ae7ab81f575c8f1b81ea683971e2d1c1eb674f71ee0f7434ac2295394763363
4
+ data.tar.gz: 2e9dbf8da6871530fd4bb86a6c7213fdc4c2c6bdfabdf4fad71dff8f5095e27e
5
5
  SHA512:
6
- metadata.gz: ebf43f06633696960d75bc86f3ab3a5536125b00d8b3e4164c8fd94100dc04f424faa6701ebcb9c8d6efa294f8ef701bde701abbdface9e462e488bdcee7ca26
7
- data.tar.gz: c3a1f72368a014697ce3d83f0babe9a942aae39a1956d0ff9a9fcb92c52c9a742924352d3580189db2a709b473e070040a5ea0510a4734dff31659c84b367cb1
6
+ metadata.gz: 0ceaa06561d11a4a467af85d8e979b96c5f4378fda459f78d0a0bef941f94866c254a856c9c7341a2ad444288d2531c68d7cdd019bf2b6cddb644ea213a67f42
7
+ data.tar.gz: 1938dc5c81a833f9dadb3780cc5d5d1ef1757a6a9b8fdd3eb70a02fdac9617d837d52e61a52792a5b5caa7cf28162bef60b961e593f36a967626c1d7b5dea09b
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Kadmin
2
4
  # Collection of Bootstrap helpers
3
5
  module BootstrapHelper
@@ -17,7 +19,13 @@ module Kadmin
17
19
  # @param [Hash, String] url_options anything accepted by link_to and image_tag
18
20
  # @param [Integer] max_height maximum height of the thumbnail
19
21
  def thumbnail_link(url_options, max_height)
20
- return link_to(image_tag(url_options), url_options, class: 'thumbnail', style: "max-height: #{max_height}px", target: 'new')
22
+ return link_to(
23
+ image_tag(url_options),
24
+ url_options,
25
+ class: 'thumbnail',
26
+ style: "max-height: #{max_height}px",
27
+ target: 'new'
28
+ )
21
29
  end
22
30
 
23
31
  # Generates a navigation drop down for bootstrap
@@ -35,7 +43,7 @@ module Kadmin
35
43
  return content_tag(:div, button + list, class: 'dropdown', style: 'display: inline-block;')
36
44
  end
37
45
 
38
- # Generates help assitance using bootstrap i.e. * for mendatory feilds, help icon and popover for help
46
+ # Custom label generator using bootstrap i.e. * for mendatory feilds, help icon and popover for help
39
47
  # @param [String] label text for the view
40
48
  # @param [String] label_for is ID of the html element for which we are displaying label.
41
49
  # @param [Boolean] Display the red asteric to indicate mendatory field.
@@ -43,15 +51,15 @@ module Kadmin
43
51
  # @param [String] Title of the popover
44
52
  # @param [String] Body text of popover
45
53
  # @param [String] classname for the label.
46
- def help_assistance(label, label_for = "", required = false, display_help = true, title = "", message = "", label_class = 'control-label')
54
+ def create_custom_label(label, label_for = '', required = false, display_help = true, title = '', message = '', label_class = 'control-label')
47
55
  label = t(label)
48
56
  label = label.html_safe
49
57
 
50
- require_html = required ? '<span class="required-field"><span>':''
58
+ require_html = required ? '<span class="required-field"><span>' : ''
51
59
  icon_html = "<i class='fa fa-question-circle' style='color:green'></i>"
52
60
 
53
- display_message = ""
54
- if display_help
61
+ display_message = ''
62
+ if display_help
55
63
  message = t(message)
56
64
  message = message.gsub('"', '\"')
57
65
  message = message.gsub("'", "\'")
@@ -25,3 +25,5 @@ en:
25
25
  please_correct: "Please correct the following:"
26
26
  nothing_to_show: None
27
27
  welcome: Moin, moin %{user}!
28
+
29
+
@@ -1,3 +1,3 @@
1
1
  module Kadmin
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.2.1'.freeze
3
3
  end
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: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Pepin-Perreault