lotus_admin 1.4.6 → 1.5.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: ff3eb8d10362fdc7b7462273e40560277d1061015bdfe010058c09103c529103
4
- data.tar.gz: f7e5d8c4caedd9757b3d94eae9d2fd2c0219e10298b385fecb25095d7067e1f6
3
+ metadata.gz: f6f28169cb1da38743faa9e32ed4399425d5dc3ddc1b95831ca6cef5725351db
4
+ data.tar.gz: 518d70fd6adf87fc29a924fcd011f9f239b086695f4322fcea93a51f25e35e06
5
5
  SHA512:
6
- metadata.gz: ff6a07e0a23aca02379431c79b76d542ec2838b1197891b55d104e967bff5357b0e4517acef5cb2e1f31198fba776143d2a5aff0992f0ceb17b93890db1ee825
7
- data.tar.gz: 5b431a60b48c8809ea055aea43b5698797481b54dbefc670875184bfcf736c71428eb7b9e0ea43693b97058e0fd978a622be1b75065b873c10d18171cc4b57ab
6
+ metadata.gz: 57d246263ad9d3b2c37bfb3ff94e8af6c21b77339700bd6039e48ded5396ae6cd17f391a34c8fe0265cad35965468fea88961f56baa6c5f7846cc8c5b4f3dbe1
7
+ data.tar.gz: d3a4bcb8258f941942c5397a9b1f871f4a87b35fc5ea2da5228f539eb1ed69ca90b8c58d3794731aeee6a881f52e09d85cd69145be47b5640496a4120b87d2fe
@@ -6,8 +6,8 @@ module LotusAdmin
6
6
  end
7
7
  end
8
8
 
9
- def new_link
10
- link_to lotus_admin.new_polymorphic_path(resource_class) do
9
+ def new_link(parent = nil)
10
+ link_to lotus_admin.new_polymorphic_path([parent, resource_class].compact) do
11
11
  content_tag(:i, nil, class: 'zmdi zmdi-plus-circle')
12
12
  end
13
13
  end
@@ -1,15 +1,17 @@
1
- = material_form_for [lotus_admin, resource] do |f|
2
- .form-inputs
3
- - f.object.class.columns.each do |column|
4
- - case column.type
5
- - when :text
6
- = f.input column.name, as: :text, input_html: { rows: 5 }
7
- - else
8
- - case column.name
9
- - when /_at$/
10
- - else
11
- = f.input column.name
1
+ .card
2
+ .card-body.card-padding
3
+ = material_form_for [lotus_admin, resource] do |f|
4
+ .form-inputs
5
+ - f.object.class.columns.each do |column|
6
+ - case column.type
7
+ - when :text
8
+ = f.input column.name, as: :text, input_html: { rows: 5 }
9
+ - else
10
+ - case column.name
11
+ - when /_at$/
12
+ - else
13
+ = f.input column.name
12
14
 
13
- .form-actions
14
- = material_form_submit(resource)
15
- = material_form_cancel(lotus_admin.polymorphic_path(resource_class))
15
+ .form-actions
16
+ = material_form_submit(resource)
17
+ = material_form_cancel(lotus_admin.polymorphic_path(resource_class))
@@ -4,9 +4,4 @@
4
4
  %ul.actions
5
5
  %li= new_link
6
6
 
7
- .card
8
- .card-header
9
- = t('.help', resource: resource_class.model_name.human)
10
-
11
- .card-body.card-padding
12
- = render 'form'
7
+ = render 'form'
@@ -1,9 +1,4 @@
1
1
  .block-header
2
2
  %h2= page_title!("New #{ resource_class.model_name.human }")
3
3
 
4
- .card
5
- .card-header
6
- = t('.help', resource: resource_class.model_name.human)
7
-
8
- .card-body.card-padding
9
- = render 'form'
4
+ = render 'form'
@@ -1,3 +1,3 @@
1
1
  module LotusAdmin
2
- VERSION = '1.4.6'
2
+ VERSION = '1.5.0'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lotus_admin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.6
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Millsaps-Brewer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-08 00:00:00.000000000 Z
11
+ date: 2020-06-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails