azahara_schema 0.3.7 → 0.3.9

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: d16b51a468467a947cfcc0c08d6837b1372b146ac8d384dbba6e427de7488e04
4
- data.tar.gz: d5fdf2e19b6f784abce59e87721b2ab186e01abddeac848ae055df8afa33985a
3
+ metadata.gz: bf0eebe881da427f06f2525e0e9bfe6c5fc514bb6a2fd9758bcdabf6ebc38ef0
4
+ data.tar.gz: 38495530658455a1022190bee68f81ef7d88c436e10b76f8f2ba58f6fb96f284
5
5
  SHA512:
6
- metadata.gz: 62439f56c38a84cd0623a0978f8b2f7dbc653fe31bd0d1db34efbd5e21532cc05ec2adcb87715872a91ea59f1918d01dcf3aab21e4a5c9ae26fc70105a667002
7
- data.tar.gz: 479927d0f410ef9862f6df418f05f1b7de8ece84447b5f997acf06d751485fd13eecfb9dbdb0f8525a0fd594fee110686bad7ef124e416da31317a2b1d59a8c9
6
+ metadata.gz: 0f699c91ddc8069adcfdabdfd9060cda20b2f80b98bc0edd51f57a571149a32e68fe1e69905de32f20672153cbc6ef57df736d00e2eeeec00d68637402c002a8
7
+ data.tar.gz: dc2e3000be8fa8fa43febb6f3f67f6986367e364564ef3d51f7ad72a08b880b1e5fdc70af3521b3a9d26349f5b82bf02f62687b3c7de6cc9d74cbe3bca0306d6
@@ -1,6 +1,20 @@
1
+ <%
2
+ create_attributes ||= {}
3
+ create_model ||= schema.model
4
+ %>
5
+
1
6
  <% if local_assigns.fetch(:filters, true) %>
2
7
  <%= render 'azahara_schema/index_form', schema: schema %>
3
8
  <% end %>
9
+ <% if local_assigns.fetch(:show_toolbar, false) %>
10
+ <div class="btn-toolbar text-right" role="toolbar" aria-label="Toolbar">
11
+ <% if can?(:create, create_model) %>
12
+ <div class="btn-group" role="group" aria-label="<%= t('label_actions') %>">
13
+ <%= link_to t('common_labels.new_record', model: create_model.model_name.human), new_polymorphic_path(create_model, create_attributes), class: 'btn btn-primary' %>
14
+ </div>
15
+ <% end %>
16
+ </div>
17
+ <% end %>
4
18
  <% schema.outputs.each do |output| %>
5
19
  <%= render output, local_assigns.merge(schema: schema) %>
6
20
  <% end %>
@@ -55,6 +55,8 @@ module AzaharaSchema
55
55
  attribute.attribute_name.human_list_value(value, options)
56
56
  when 'datetime'
57
57
  value ? l(value) : value
58
+ when 'date'
59
+ value ? l(value.to_date) : value
58
60
  else
59
61
  value
60
62
  end
@@ -1,3 +1,3 @@
1
1
  module AzaharaSchema
2
- VERSION = '0.3.7'
2
+ VERSION = '0.3.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: azahara_schema
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.7
4
+ version: 0.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ondřej Ezr
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-05-22 00:00:00.000000000 Z
11
+ date: 2018-06-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
104
  version: '0'
105
105
  requirements: []
106
106
  rubyforge_project:
107
- rubygems_version: 2.7.6
107
+ rubygems_version: 2.7.7
108
108
  signing_key:
109
109
  specification_version: 4
110
110
  summary: Gem to support developement of rails application with schema over an entity