advanced_haml_scaffold_generator 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/advanced_haml_scaffold_generator.gemspec +4 -4
- data/lib/rails/generators/haml/scaffold/templates/index.html.haml +65 -61
- 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: 3cc8b85d517c680c4a0a2e776232fcab61cfc42a
|
4
|
+
data.tar.gz: 75218a88d4a47cbe770f7aeaa0d4132401b2dc08
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ca4ff1766bfc79bba7820a67dbebe9d569c4cb4e3bd7715e018fe3752afa30c6cce4a4348bb235ec51ec79fa2141339dcf5198a9ddf7ade65e4164b32c66638
|
7
|
+
data.tar.gz: 76aea0880a458cf16f93d42f7510ddf97205828b61db06f3acbae775850402000be376e1791fc63f2af05a5f7b47d7256a722da13fad45ef3f3eccaf894ed3af
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.3
|
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: advanced_haml_scaffold_generator 1.0.
|
5
|
+
# stub: advanced_haml_scaffold_generator 1.0.3 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "advanced_haml_scaffold_generator"
|
9
|
-
s.version = "1.0.
|
9
|
+
s.version = "1.0.3"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Dmitri Koulikoff"]
|
14
|
-
s.date = "2015-
|
14
|
+
s.date = "2015-07-01"
|
15
15
|
s.description = "Extention of the haml generator that generates templates with the use of i18n, cancan and WiceGrid, adds classes to buttons and uses :title helper"
|
16
16
|
s.email = "dima@koulikoff.ru"
|
17
17
|
s.extra_rdoc_files = [
|
@@ -40,7 +40,7 @@ Gem::Specification.new do |s|
|
|
40
40
|
]
|
41
41
|
s.homepage = "http://github.com/dima4p/advanced_haml_scaffold_generator"
|
42
42
|
s.licenses = ["MIT"]
|
43
|
-
s.rubygems_version = "2.
|
43
|
+
s.rubygems_version = "2.2.2"
|
44
44
|
s.summary = "Extention of the haml generator that is aware of i18n and so forth"
|
45
45
|
|
46
46
|
if s.respond_to? :specification_version then
|
@@ -7,43 +7,82 @@
|
|
7
7
|
%p.nav= link_to t('.new_<%= singular_table_name %>'), new_<%= singular_table_name %>_path, class: 'new'
|
8
8
|
<% end -%>
|
9
9
|
|
10
|
+
- if @<%= plural_table_name %>.limit(1).size > 0
|
10
11
|
<% if defined? Wice::WiceGrid -%>
|
11
|
-
- if @grid
|
12
|
-
|
12
|
+
- if @grid
|
13
|
+
= grid @grid do |g|
|
13
14
|
<% for attribute in attributes.reject(&:password_digest?) -%>
|
14
15
|
<% if attribute.reference? -%>
|
15
|
-
|
16
|
-
|
17
|
-
|
16
|
+
- g.column name: <%= class_name %>.human_attribute_name(:<%= attribute.name %>),
|
17
|
+
:attribute => '<%= attribute.name %>_id' do |<%= singular_table_name %>|
|
18
|
+
- <%= singular_table_name %>.<%= attribute.name %>.try :name
|
18
19
|
<% else -%>
|
19
|
-
|
20
|
-
|
21
|
-
|
20
|
+
- g.column name: <%= class_name %>.human_attribute_name(:<%= attribute.name %>),
|
21
|
+
:attribute => '<%= attribute.name %>' do |<%= singular_table_name %>|
|
22
|
+
- <%= singular_table_name %>.<%= attribute.name %>
|
22
23
|
<% end -%>
|
23
24
|
<% end -%>
|
24
25
|
<% if options[:cancan] -%>
|
25
|
-
|
26
|
-
|
26
|
+
- g.column do |<%= singular_table_name %>|
|
27
|
+
- if can? :show, <%= singular_table_name %>
|
28
|
+
- link_to t('show'), <%= singular_table_name %>, class: 'show'
|
29
|
+
- g.column do |<%= singular_table_name %>|
|
30
|
+
- if can? :edit, <%= singular_table_name %>
|
31
|
+
- link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
32
|
+
- g.column do |<%= singular_table_name %>|
|
33
|
+
- if can? :destroy, <%= singular_table_name %>
|
34
|
+
- link_to t('destroy'), <%= singular_table_name %>,
|
35
|
+
data: {confirm: t('.confirm', default: 'Are you sure?')},
|
36
|
+
method: :delete, class: 'destroy'
|
37
|
+
<% else -%>
|
38
|
+
- g.column do |<%= singular_table_name %>|
|
27
39
|
- link_to t('show'), <%= singular_table_name %>, class: 'show'
|
28
|
-
|
29
|
-
- if can? :edit, <%= singular_table_name %>
|
40
|
+
- g.column do |<%= singular_table_name %>|
|
30
41
|
- link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
31
|
-
|
32
|
-
- if can? :destroy, <%= singular_table_name %>
|
42
|
+
- g.column do |<%= singular_table_name %>|
|
33
43
|
- link_to t('destroy'), <%= singular_table_name %>,
|
34
44
|
data: {confirm: t('.confirm', default: 'Are you sure?')},
|
35
45
|
method: :delete, class: 'destroy'
|
46
|
+
<% end -%>
|
47
|
+
-else
|
48
|
+
%table
|
49
|
+
%thead
|
50
|
+
%tr
|
51
|
+
<% for attribute in attributes.reject(&:password_digest?) -%>
|
52
|
+
%th= <%= class_name %>.human_attribute_name :<%= attribute.name %>
|
53
|
+
<% end -%>
|
54
|
+
%th{:colspan => 3}= t 'actions'
|
55
|
+
|
56
|
+
%tbody
|
57
|
+
- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
|
58
|
+
%tr{ :class => cycle(:odd, :even) }
|
59
|
+
<% for attribute in attributes.reject(&:password_digest?) -%>
|
60
|
+
<% if attribute.reference? -%>
|
61
|
+
%td= <%= singular_table_name %>.<%= attribute.name %>.try :name
|
36
62
|
<% else -%>
|
37
|
-
|
38
|
-
|
39
|
-
- g.column do |<%= singular_table_name %>|
|
40
|
-
- link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
41
|
-
- g.column do |<%= singular_table_name %>|
|
42
|
-
- link_to t('destroy'), <%= singular_table_name %>,
|
43
|
-
data: {confirm: t('.confirm', default: 'Are you sure?')},
|
44
|
-
method: :delete, class: 'destroy'
|
63
|
+
%td= <%= singular_table_name %>.<%= attribute.name %>
|
64
|
+
<% end -%>
|
45
65
|
<% end -%>
|
46
|
-
|
66
|
+
<% if options[:cancan] -%>
|
67
|
+
%td.action
|
68
|
+
- if can? :show, <%= singular_table_name %>
|
69
|
+
= link_to t('show'), <%= singular_table_name %>, class: 'show'
|
70
|
+
%td.action
|
71
|
+
- if can? :edit, <%= singular_table_name %>
|
72
|
+
= link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
73
|
+
%td.action
|
74
|
+
- if can? :destroy, <%= singular_table_name %>
|
75
|
+
= link_to t('destroy'), <%= singular_table_name %>,
|
76
|
+
data: {confirm: t('.confirm', default: 'Are you sure?')},
|
77
|
+
method: :delete, class: 'destroy'
|
78
|
+
<% else -%>
|
79
|
+
%td.action= link_to t('show'), <%= singular_table_name %>, class: 'show'
|
80
|
+
%td.action= link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
81
|
+
%td.action= link_to t('destroy'), <%= singular_table_name %>,
|
82
|
+
data: {confirm: t('.confirm', :default => 'Are you sure?')},
|
83
|
+
method: :delete, class: 'destroy'
|
84
|
+
<% end -%>
|
85
|
+
<% else -%>
|
47
86
|
%table
|
48
87
|
%thead
|
49
88
|
%tr
|
@@ -81,42 +120,7 @@
|
|
81
120
|
data: {confirm: t('.confirm', :default => 'Are you sure?')},
|
82
121
|
method: :delete, class: 'destroy'
|
83
122
|
<% end -%>
|
84
|
-
<% else -%>
|
85
|
-
%table
|
86
|
-
%thead
|
87
|
-
%tr
|
88
|
-
<% for attribute in attributes.reject(&:password_digest?) -%>
|
89
|
-
%th= <%= class_name %>.human_attribute_name :<%= attribute.name %>
|
90
|
-
<% end -%>
|
91
|
-
%th{:colspan => 3}= t 'actions'
|
92
|
-
|
93
|
-
%tbody
|
94
|
-
- @<%= plural_table_name %>.each do |<%= singular_table_name %>|
|
95
|
-
%tr{ :class => cycle(:odd, :even) }
|
96
|
-
<% for attribute in attributes.reject(&:password_digest?) -%>
|
97
|
-
<% if attribute.reference? -%>
|
98
|
-
%td= <%= singular_table_name %>.<%= attribute.name %>.try :name
|
99
|
-
<% else -%>
|
100
|
-
%td= <%= singular_table_name %>.<%= attribute.name %>
|
101
|
-
<% end -%>
|
102
|
-
<% end -%>
|
103
|
-
<% if options[:cancan] -%>
|
104
|
-
%td.action
|
105
|
-
- if can? :show, <%= singular_table_name %>
|
106
|
-
= link_to t('show'), <%= singular_table_name %>, class: 'show'
|
107
|
-
%td.action
|
108
|
-
- if can? :edit, <%= singular_table_name %>
|
109
|
-
= link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
110
|
-
%td.action
|
111
|
-
- if can? :destroy, <%= singular_table_name %>
|
112
|
-
= link_to t('destroy'), <%= singular_table_name %>,
|
113
|
-
data: {confirm: t('.confirm', default: 'Are you sure?')},
|
114
|
-
method: :delete, class: 'destroy'
|
115
|
-
<% else -%>
|
116
|
-
%td.action= link_to t('show'), <%= singular_table_name %>, class: 'show'
|
117
|
-
%td.action= link_to t('edit'), edit_<%= singular_table_name %>_path(<%= singular_table_name %>), class: 'edit'
|
118
|
-
%td.action= link_to t('destroy'), <%= singular_table_name %>,
|
119
|
-
data: {confirm: t('.confirm', :default => 'Are you sure?')},
|
120
|
-
method: :delete, class: 'destroy'
|
121
|
-
<% end -%>
|
122
123
|
<% end -%>
|
124
|
+
- else
|
125
|
+
.empty
|
126
|
+
= t '.empty'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advanced_haml_scaffold_generator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dmitri Koulikoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-07-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
127
127
|
version: '0'
|
128
128
|
requirements: []
|
129
129
|
rubyforge_project:
|
130
|
-
rubygems_version: 2.
|
130
|
+
rubygems_version: 2.2.2
|
131
131
|
signing_key:
|
132
132
|
specification_version: 4
|
133
133
|
summary: Extention of the haml generator that is aware of i18n and so forth
|