sinatra-hexacta 0.5.1 → 0.6.0

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: a4ff487c00d34b9c9ad97a89dd18f507133521b8f2962f69cd94d05628c8dba1
4
- data.tar.gz: d73220612fb3615a96f064e7e4fac2dacd97bb0b364fcd6800682d981f23434a
3
+ metadata.gz: c11cd817a610d34a2776e3dee2c9f8f086004494537edb976d29d48208d175aa
4
+ data.tar.gz: a53b0d29d408dd10d7a882fb67d456978b4002423d53cc7c1cad12a349ea3d8f
5
5
  SHA512:
6
- metadata.gz: 1e52145d0d19a443acf4ea02a96626f670831670c779d832f10f287ae60319c1f3cf70f0c84bc9f41d15e74c17203f34edbc3cead109e63ff873234725a3061e
7
- data.tar.gz: d3335785a3304a2acc2a22a3a55bd4b3d5a29b0883d459de89106f39ad67e9382b42af91ae61e5d46734c2eb208ebdc61abcf0f33155107c81d0ba1016cea679
6
+ metadata.gz: d2c1ff9d07238a097414c7d8fd11590d2523fd2a54fb4ee1847e063673d8df998a3d99a5e47074702e6ebaf5d28ee5e32fcb8fe13448d575a9bb11cfdc5e9d75
7
+ data.tar.gz: a7685c6ce4c5c83af4b8544a682609ae0326b00cee246f95e4199c1512aa4ffe09a8df2a5c243e97e1ddbc7816cdd061bd57e8fc9b5d8d8e392e5a4d5d92857b
@@ -39,6 +39,14 @@ module Sinatra
39
39
  slim "#{Hexacta::GEM_FILE_DIR}/inputs/year".to_sym, locals: option_hash
40
40
  end
41
41
 
42
+ def paginator_input(option_hash)
43
+ slim "#{Hexacta::GEM_FILE_DIR}/inputs/paginator".to_sym, locals: option_hash
44
+ end
45
+
46
+ def range_input(option_hash)
47
+ slim "#{Hexacta::GEM_FILE_DIR}/inputs/range".to_sym, locals: option_hash
48
+ end
49
+
42
50
  setup_dir("/app/views/#{Hexacta::GEM_FILE_DIR}/inputs")
43
51
  copy_all_files("/lib/sinatra/views/inputs","/app/views/#{Hexacta::GEM_FILE_DIR}/inputs")
44
52
  end
@@ -1,15 +1,23 @@
1
- -if from.nil? || to.nil?
2
- -date_range = ""
3
- -else
4
- -date_range = "#{from.strftime('%d %Bb, %y')} - #{to.strftime('%d %Bb, %y')}"
1
+ - if from.nil? || to.nil?
2
+ - date_range = ""
3
+ - else
4
+ - date_range = "#{from.strftime('%d %Bb, %y')} - #{to.strftime('%d %Bb, %y')}"
5
+ - unless defined? required
6
+ - required = false
7
+ - if !(defined? id) || id.blank?
8
+ - id = "#{name}_#{rand(1000)}"
9
+ - unless defined? clazz
10
+ - clazz = nil
11
+ - unless defined? all_days
12
+ - all_days = false
5
13
 
6
14
  .form-group.fg-float
7
15
  label #{title}
8
16
  .fg-line
9
- -if required
10
- input.form-control.date-range.fg-input id="#{id}" type="text" name="#{name}" required="" value="#{date_range}"
11
- -else
12
- input.form-control.date-range.fg-input id="#{id}" type="text" name="#{name}" value="#{date_range}"
17
+ - if required
18
+ input.form-control.date-range.fg-input id="#{id}" type="text" name="#{name}" required="" value="#{date_range}" class="#{clazz}" all-days='#{all_days}'
19
+ - else
20
+ input.form-control.date-range.fg-input id="#{id}" type="text" name="#{name}" value="#{date_range}" class="#{clazz}" all-days='#{all_days}'
13
21
  input.hidden name="from" value="#{from}"
14
22
  input.hidden name="to" value="#{to}"
15
23
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sinatra-hexacta
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marco Zanger