populate-me 0.17.0 → 0.18.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: ab01b0340f42771cfda2e496e4dee387c3e098ee2757ee374f5fb9a95fda48b0
4
- data.tar.gz: b74800276c349db0d4dcc74f46f36d5b6fb6a46cb4d727c5dbfb9e46d35d0aa4
3
+ metadata.gz: 75cccfbdfe22ccdd34b88440988118fd1720a9915188e34a4e6140c2a1e3a240
4
+ data.tar.gz: c64e93f4fcf7990773a5bc18ec1a6d2d55e0cce82f76a150e784e5f59e1a3faf
5
5
  SHA512:
6
- metadata.gz: 7621910d4fec3622e2bad85742c0877fbe6bafdf9dcb28f804e40d5ae255b362de66cdf6d978a1d49fa27874527705d2cec80146e2624f71ac4783a4bd8b5554
7
- data.tar.gz: c65c5db1c8361cb50ada68e63cc246325590a0e8ca00a2f6a3e90e047f73cbc4a0072293ab52a60317a9b0710e96d7439ac3efd1860d3d134edd848ae144670f
6
+ metadata.gz: b789d3cefb18deec65e19457e734fffe5c3d92f75183c9ac98a29191604a4e4ec8c1f7263c3900a85e7d41e09a077e3e6bc58baeb1d85b40662f1175bed5f3e0
7
+ data.tar.gz: f13e107dba08eb63e1753e897b54039cf3cbefdcc9b22c9e40596f6033b1c4ffa873b9e611f4cb9d2547f7a6a8ca25aded561c0789dfbe4a112588fea55b8bf9
@@ -36,20 +36,24 @@
36
36
  <h1>
37
37
  {{page_title}}
38
38
  </h1>
39
- <p class='new-document-btn-wrap'>
40
- {{#is_polymorphic}}
41
- <select class='polymorphic_type_values'>
42
- {{#polymorphic_type_values}}
43
- <option value='{{.}}'>{{.}}</option>
44
- {{/polymorphic_type_values}}
45
- </select>
46
- &nbsp;
47
- {{/is_polymorphic}}
48
- <a href="<%= request.script_name %>/form/{{dasherized_class_name}}{{#new_data}}?{{new_data}}{{/new_data}}" class='column-push new-document-btn' title='Create'>+</a>
49
- </p>
50
- <form class='form-search-items'>
51
- <input type='text' class='search-items' placeholder='Search'>
52
- </form>
39
+ {{^disable_plus}}
40
+ <p class='new-document-btn-wrap'>
41
+ {{#is_polymorphic}}
42
+ <select class='polymorphic_type_values'>
43
+ {{#polymorphic_type_values}}
44
+ <option value='{{.}}'>{{.}}</option>
45
+ {{/polymorphic_type_values}}
46
+ </select>
47
+ &nbsp;
48
+ {{/is_polymorphic}}
49
+ <a href="<%= request.script_name %>/form/{{dasherized_class_name}}{{#new_data}}?{{new_data}}{{/new_data}}" class='column-push new-document-btn' title='Create'>+</a>
50
+ </p>
51
+ {{/disable_plus}}
52
+ {{^disable_search}}
53
+ <form class='form-search-items'>
54
+ <input type='text' class='search-items' placeholder='Search'>
55
+ </form>
56
+ {{/disable_search}}
53
57
  <ol class='documents {{#grid_view}}grid{{/grid_view}}' data-sort-field='{{sort_field}}' data-sort-url='<%= request.script_name %>/api/{{dasherized_class_name}}'>
54
58
  {{#items}}{{#custom_partial_or_default}}template_document{{/custom_partial_or_default}}{{/items}}
55
59
  </ol>
@@ -138,10 +138,10 @@ module PopulateMe
138
138
  is_polymorphic: self.polymorphic?,
139
139
  polymorphic_type_values: self.polymorphic? ? self.fields[:polymorphic_type][:values] : nil,
140
140
  sort_field: self.sort_field_for(o),
141
- # 'command_plus'=> !self.populate_config[:no_plus],
142
- # 'command_search'=> !self.populate_config[:no_search],
143
- items: items.map do |d|
144
- d.to_admin_list_item(o)
141
+ disable_plus: self.settings[:disable_plus]==true,
142
+ disable_search: self.settings[:disable_search]==true,
143
+ items: items.map do |d|
144
+ d.to_admin_list_item(o)
145
145
  end
146
146
  }
147
147
  end
@@ -1,4 +1,4 @@
1
1
  module PopulateMe
2
- VERSION = '0.17.0'
2
+ VERSION = '0.18.0'
3
3
  end
4
4
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: populate-me
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.17.0
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mickael Riga
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-22 00:00:00.000000000 Z
11
+ date: 2022-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: web-utils