scaffold_pico 1.1.4 → 1.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +0 -0
- data/README.md +0 -0
- data/lib/scaffold/cli.rb +0 -0
- data/lib/scaffold/erb_context.rb +0 -0
- data/lib/scaffold/generators/base_generator.rb +0 -0
- data/lib/scaffold/generators/controller_generator.rb +0 -0
- data/lib/scaffold/generators/fabricator_generator.rb +0 -0
- data/lib/scaffold/generators/locales_generator.rb +0 -0
- data/lib/scaffold/generators/models_generator.rb +0 -0
- data/lib/scaffold/generators/routes_generator.rb +0 -0
- data/lib/scaffold/generators/views_generator.rb +0 -0
- data/lib/scaffold/main.rb +0 -0
- data/lib/scaffold/models/resource.rb +0 -0
- data/lib/scaffold/rails.rb +0 -0
- data/lib/scaffold/services/controller.rb +0 -0
- data/lib/scaffold/services/nested_in_resources.rb +0 -0
- data/lib/scaffold/services/path.rb +0 -0
- data/lib/scaffold/services/resource.rb +0 -0
- data/lib/scaffold/services/route.rb +0 -0
- data/lib/scaffold/services/view.rb +0 -0
- data/lib/scaffold/template_engines/slim.rb +0 -0
- data/lib/scaffold_pico.rb +0 -0
- data/lib/templates/pico/controller.rb.erb +0 -0
- data/lib/templates/pico/fabricators/fabrication.rb.erb +0 -0
- data/lib/templates/pico/locales/bg.scaffold_pico.yml.erb +0 -0
- data/lib/templates/pico/locales/en.scaffold_pico.yml.erb +0 -0
- data/lib/templates/pico/model.rb.erb +0 -0
- data/lib/templates/pico/search.rb.erb +1 -1
- data/lib/templates/pico/views/materialize/slim/_form.html.slim.erb +0 -0
- data/lib/templates/pico/views/materialize/slim/edit.html.slim.erb +18 -17
- data/lib/templates/pico/views/materialize/slim/index.html.slim.erb +50 -49
- data/lib/templates/pico/views/materialize/slim/new.html.slim.erb +14 -13
- data/lib/templates/pico/views/materialize/slim/show.html.slim.erb +24 -23
- data/lib/templates/pico/views/zurb/slim/_form.html.slim.erb +0 -0
- data/lib/templates/pico/views/zurb/slim/edit.html.slim.erb +0 -0
- data/lib/templates/pico/views/zurb/slim/index.html.slim.erb +0 -0
- data/lib/templates/pico/views/zurb/slim/new.html.slim.erb +0 -0
- data/lib/templates/pico/views/zurb/slim/show.html.slim.erb +0 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7bf0ebf5a68034b8518d22a937ab8fa981bf9d9
|
4
|
+
data.tar.gz: '06804700be5657251830719fb3bafeb884519aaf'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95cceedb5fa0ee9fbc17379b6f960259867450d722b73c60be88fda28bd1897ad063263a4e813010cd6306509a3004371c08bd8dffbb36e0af2eb21ffbd068cd
|
7
|
+
data.tar.gz: 1fb21fb5b70b53dbb8140b51565dfcc869186c6bd563a16face7e34ebf1d9a2b7d31b65f206eda3223114a80f95f7a1fe7002a074705ad486cc437d1c6afe14c
|
data/LICENSE.txt
CHANGED
File without changes
|
data/README.md
CHANGED
File without changes
|
data/lib/scaffold/cli.rb
CHANGED
File without changes
|
data/lib/scaffold/erb_context.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/scaffold/main.rb
CHANGED
File without changes
|
File without changes
|
data/lib/scaffold/rails.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/scaffold_pico.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -25,7 +25,7 @@ class <%= @rails.resource.search_class_name %>
|
|
25
25
|
def results
|
26
26
|
<%= @rails.resource.name %> = @relation
|
27
27
|
|
28
|
-
<%= @rails.resource.name %> = @relation.order("updated_at") if <%= @rails.resource.class_name_with_modules %>.
|
28
|
+
<%= @rails.resource.name %> = @relation.order("updated_at") if <%= @rails.resource.class_name_with_modules %>.column_names.include?('updated_at')
|
29
29
|
|
30
30
|
if valid?
|
31
31
|
<% @rails.resource.fields.select {|k,v| @rails.controller.search_fields.include?(k) }.each_pair do |field_name, field_type| %>
|
File without changes
|
@@ -1,22 +1,23 @@
|
|
1
|
-
|
1
|
+
.container
|
2
|
+
h1 = t('scaffold.edit.title', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
2
3
|
|
3
|
-
.section
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
.section
|
5
|
+
.left
|
6
|
+
= link_to <%= @rails.path.collection %>, class: 'waves-effect waves-light btn' do
|
7
|
+
i.material-icons.right view_list
|
8
|
+
= t('scaffold.show.actions.index', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 2).mb_chars.downcase)
|
8
9
|
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
.right
|
12
|
+
= link_to <%= @rails.path.new_resource %>, class: 'btn waves-effect waves-light' do
|
13
|
+
i.material-icons.right add
|
14
|
+
= t('scaffold.actions.new', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
14
15
|
|
15
|
-
.clearfix
|
16
|
+
.clearfix
|
16
17
|
|
17
|
-
.card
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
18
|
+
.card
|
19
|
+
.card-content
|
20
|
+
= simple_form_for <%= @rails.path.instance_resource %> do |form|
|
21
|
+
= render 'form', form: form
|
22
|
+
.form-actions
|
23
|
+
= form.button :button, t('scaffold.actions.update', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1)), :class => 'btn btn-large waves-effect waves'
|
@@ -1,57 +1,58 @@
|
|
1
|
-
|
1
|
+
.container
|
2
|
+
h1 = t('scaffold.index.title', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 2))
|
2
3
|
|
3
|
-
.fixed-action-btn style="bottom: 45px; right: 24px;"
|
4
|
-
|
5
|
-
|
6
|
-
|
4
|
+
.fixed-action-btn style="bottom: 45px; right: 24px;"
|
5
|
+
= link_to <%= @rails.path.new_resource %>, class: 'btn-floating btn-large waves-effect waves-light red' do
|
6
|
+
i.material-icons.right add
|
7
|
+
= t('scaffold.actions.new', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
7
8
|
|
8
9
|
|
9
10
|
|
10
|
-
.row
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
tr
|
17
|
-
<% @rails.resource.fields.select {|k,v| @rails.controller.index_fields.include?(k) }.keys.each do |field_name| %>
|
18
|
-
th = <%= @rails.resource.class_name_with_modules -%>.human_attribute_name(:<%= field_name -%>)
|
19
|
-
<% end %>
|
20
|
-
th colspan=3 = t('scaffold.index.actions')
|
21
|
-
|
22
|
-
tbody
|
23
|
-
- @<%= @rails.resource.collection_name %>.each do |<%= @rails.resource.name %>|
|
11
|
+
.row
|
12
|
+
.col.s12.m9
|
13
|
+
.card
|
14
|
+
.card-content
|
15
|
+
table.striped.highlight.responsive-table
|
16
|
+
thead
|
24
17
|
tr
|
25
18
|
<% @rails.resource.fields.select {|k,v| @rails.controller.index_fields.include?(k) }.keys.each do |field_name| %>
|
26
|
-
|
19
|
+
th = <%= @rails.resource.class_name_with_modules -%>.human_attribute_name(:<%= field_name -%>)
|
27
20
|
<% end %>
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
h5 = t('scaffold.index.search.header')
|
40
|
-
= form.error_notification
|
41
|
-
|
42
|
-
<% @rails.resource.fields.select {|k,v| @rails.controller.search_fields.include?(k) }.each_pair do |field_name, field_type| %>
|
43
|
-
<% if field_type == 'belongs_to' -%>
|
44
|
-
= form.input :<%= field_name -%>_id
|
45
|
-
<% elsif ['date', 'datetime'].include?(field_type) -%>
|
46
|
-
= form.input :<%= field_name -%>, as: :date, html5: true
|
47
|
-
<% elsif field_type == 'boolean' -%>
|
48
|
-
= form.input :<%= field_name -%>, as: :boolean, input_html: {class: 'filled-in'}
|
49
|
-
<% else %>
|
50
|
-
= form.input :<%= field_name -%>
|
51
|
-
<% end -%>
|
52
|
-
<% end %>
|
53
|
-
|
21
|
+
th colspan=3 = t('scaffold.index.actions')
|
22
|
+
|
23
|
+
tbody
|
24
|
+
- @<%= @rails.resource.collection_name %>.each do |<%= @rails.resource.name %>|
|
25
|
+
tr
|
26
|
+
<% @rails.resource.fields.select {|k,v| @rails.controller.index_fields.include?(k) }.keys.each do |field_name| %>
|
27
|
+
td = <%= @rails.resource.name %>.<%= field_name -%>
|
28
|
+
<% end %>
|
29
|
+
td = link_to t('scaffold.index.show'), <%= @rails.path.resource %>
|
30
|
+
td = link_to t('scaffold.index.edit'), <%= @rails.path.edit_resource %>
|
31
|
+
td = link_to t('scaffold.index.destroy'), <%= @rails.path.resource %>, data: {:confirm => t('scaffold.confirm')}, :method => :delete
|
54
32
|
.card-action
|
55
|
-
=
|
56
|
-
|
57
|
-
.
|
33
|
+
= paginate @<%= @rails.resource.collection_name %>
|
34
|
+
|
35
|
+
.col.s12.m3
|
36
|
+
|
37
|
+
aside.card.search
|
38
|
+
= simple_form_for <%= "@#{@rails.resource.collection_name}_search" %>, as: :<%= @rails.resource.collection_name %>_search, url: <%= @rails.path.collection %>, method: :get do |form|
|
39
|
+
.card-content
|
40
|
+
h5 = t('scaffold.index.search.header')
|
41
|
+
= form.error_notification
|
42
|
+
|
43
|
+
<% @rails.resource.fields.select {|k,v| @rails.controller.search_fields.include?(k) }.each_pair do |field_name, field_type| %>
|
44
|
+
<% if field_type == 'belongs_to' -%>
|
45
|
+
= form.input :<%= field_name -%>_id
|
46
|
+
<% elsif ['date', 'datetime'].include?(field_type) -%>
|
47
|
+
= form.input :<%= field_name -%>, as: :date, html5: true
|
48
|
+
<% elsif field_type == 'boolean' -%>
|
49
|
+
= form.input :<%= field_name -%>, as: :boolean, input_html: {class: 'filled-in'}
|
50
|
+
<% else %>
|
51
|
+
= form.input :<%= field_name -%>
|
52
|
+
<% end -%>
|
53
|
+
<% end %>
|
54
|
+
|
55
|
+
.card-action
|
56
|
+
= link_to t('scaffold.index.search.reset'), url_for(<%= @rails.path.collection %>), class: 'waves-effect waves-light btn lime lighten-5 black-text'
|
57
|
+
= form.submit t('scaffold.index.search.button'), class: 'right waves-effect waves-light btn'
|
58
|
+
.clearfix
|
@@ -1,16 +1,17 @@
|
|
1
|
-
|
1
|
+
.container
|
2
|
+
h1 = t('scaffold.new.title', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
2
3
|
|
3
|
-
.section
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
4
|
+
.section
|
5
|
+
.left
|
6
|
+
= link_to <%= @rails.path.collection %>, class: 'waves-effect waves-light btn' do
|
7
|
+
i.material-icons.right view_list
|
8
|
+
= t('scaffold.show.actions.index', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 2).mb_chars.downcase)
|
8
9
|
|
9
|
-
.clearfix
|
10
|
+
.clearfix
|
10
11
|
|
11
|
-
.card
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
12
|
+
.card
|
13
|
+
.card-content
|
14
|
+
= simple_form_for <%= @rails.path.instance_resource %> do |form|
|
15
|
+
= render 'form', form: form
|
16
|
+
.form-actions
|
17
|
+
= form.button :button, t('scaffold.actions.create', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1)), :class => 'btn btn-large waves-effect waves'
|
@@ -1,26 +1,27 @@
|
|
1
|
-
|
1
|
+
.container
|
2
|
+
h1 = t('scaffold.show.title', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
2
3
|
|
3
|
-
.section
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
4
|
+
.section
|
5
|
+
.left
|
6
|
+
= link_to <%= @rails.path.collection %>, class: 'waves-effect waves-light btn' do
|
7
|
+
i.material-icons.right view_list
|
8
|
+
= t('scaffold.actions.index', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 2).mb_chars.downcase)
|
9
|
+
.right
|
10
|
+
= link_to <%= @rails.path.edit_instance_resource %>, class: 'btn waves-effect waves-light' do
|
11
|
+
i.material-icons.right mode_edit
|
12
|
+
= t('scaffold.actions.edit', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
13
|
+
= link_to <%= @rails.path.new_resource %>, class: 'btn waves-effect waves-light' do
|
14
|
+
i.material-icons.right add
|
15
|
+
= t('scaffold.actions.new', model: <%= @rails.resource.class_name_with_modules %>.model_name.human(count: 1).mb_chars.downcase)
|
15
16
|
|
16
|
-
.clearfix
|
17
|
+
.clearfix
|
17
18
|
|
18
|
-
.card
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
19
|
+
.card
|
20
|
+
.card-content
|
21
|
+
table.striped.highlight.responsive-table
|
22
|
+
tbody
|
23
|
+
<% @rails.resource.fields.keys.each do |field_name| %>
|
24
|
+
tr
|
25
|
+
td = <%= @rails.resource.class_name_with_modules -%>.human_attribute_name(:<%= field_name -%>)
|
26
|
+
td = @<%= @rails.resource.name %>.<%= field_name -%>
|
27
|
+
<% end %>
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: scaffold_pico
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gudata
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.5.2.2
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Scaffold should be simple
|