admix 0.23.1 → 0.24.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +7 -0
  2. data/app/assets/javascripts/admix/application.js.coffee +30 -2
  3. data/app/assets/stylesheets/admix/application.css +6 -1
  4. data/app/assets/stylesheets/admix/wice_grid.css.scss +143 -0
  5. data/app/controllers/admix/inherited_controller.rb +13 -34
  6. data/app/controllers/admix/registrations_controller.rb +2 -0
  7. data/app/controllers/admix/rest_controller.rb +46 -0
  8. data/app/helpers/admix/tab.rb +33 -0
  9. data/app/helpers/admix_helper.rb +76 -0
  10. data/app/views/admix/inherited/_actions.haml +7 -0
  11. data/app/views/admix/inherited/_column_actions.haml +3 -0
  12. data/app/views/admix/inherited/_empty_grid.haml +3 -0
  13. data/app/views/admix/inherited/_form_config.haml +0 -0
  14. data/app/views/admix/inherited/_grid.haml +5 -0
  15. data/app/views/admix/inherited/_grid_actions.haml +1 -0
  16. data/app/views/admix/inherited/_grid_columns.haml +11 -0
  17. data/app/views/admix/inherited/edit.html.haml +3 -3
  18. data/app/views/admix/inherited/form.html.haml +52 -0
  19. data/app/views/admix/inherited/index.html.haml +3 -5
  20. data/app/views/admix/inherited/new.html.haml +3 -3
  21. data/app/views/admix/inherited/show.html.haml +3 -5
  22. data/app/views/admix/rest/_actions.haml +7 -0
  23. data/app/views/admix/rest/_column_actions.haml +3 -0
  24. data/app/views/admix/rest/_empty_grid.haml +3 -0
  25. data/app/views/admix/rest/_form_config.haml +0 -0
  26. data/app/views/admix/rest/_grid.haml +5 -0
  27. data/app/views/admix/rest/_grid_actions.haml +1 -0
  28. data/app/views/admix/rest/_grid_columns.haml +11 -0
  29. data/app/views/admix/rest/edit.html.haml +5 -0
  30. data/app/views/admix/rest/form.html.haml +50 -0
  31. data/app/views/admix/rest/index.html.haml +3 -0
  32. data/app/views/admix/rest/new.html.haml +3 -0
  33. data/app/views/admix/rest/show.html.haml +3 -0
  34. data/app/views/layouts/admix/{admix.html.haml → admix.haml} +2 -2
  35. data/app/views/layouts/admix/{login.html.haml → login.haml} +1 -1
  36. data/config/admix_navigation.rb +34 -49
  37. data/config/application.rb +0 -2
  38. data/config/initializers/admix.rb +0 -3
  39. data/config/initializers/wice_grid_config.rb +142 -0
  40. data/config/locales/admix.pt-BR.yml +10 -3
  41. data/config/locales/wice_grid.yml +502 -0
  42. data/lib/admix.rb +1 -3
  43. data/lib/admix/engine.rb +28 -0
  44. data/lib/admix/version.rb +2 -2
  45. metadata +51 -71
  46. data/app/views/admix/inherited/_form.html.haml +0 -14
  47. data/app/views/admix/inherited/_table_actions.html.haml +0 -3
  48. data/config/initializers/locale.rb +0 -1
  49. data/lib/admix/table-actions.rb +0 -17
data/lib/admix.rb CHANGED
@@ -6,14 +6,12 @@ require 'admix/navigation/navbar'
6
6
  require 'will_paginate'
7
7
  require 'will_paginate-bootstrap'
8
8
  require 'will_paginate/array'
9
- require 'datagrid'
10
- require 'admix/table-actions'
11
9
  require 'simple-navigation'
12
10
  require 'simple-navigation-bootstrap'
13
11
  require 'inherited_resources'
14
12
  require 'jquery-rails'
15
13
  require 'jquery-ui-rails'
16
-
14
+ require 'wice_grid'
17
15
  require 'mix-rails-auth'
18
16
 
19
17
 
data/lib/admix/engine.rb CHANGED
@@ -1,4 +1,32 @@
1
1
  module Admix
2
2
  class Engine < ::Rails::Engine
3
+
4
+ initializer "admix.setup_menu" do
5
+
6
+ ActiveMenu::create('admix-nav') do |nav|
7
+
8
+ nav.child :dashboard do |dashboard|
9
+ dashboard.text Proc.new { t('dashboard.dashboard') }
10
+ dashboard.href Proc.new { admix_root_url }
11
+ dashboard.option :icon, 'icon-flag'
12
+ end
13
+
14
+ nav.child :general do |general|
15
+ general.text Proc.new { t('general.general') }
16
+ general.option :icon, 'icon-flag'
17
+ general.href 'javascript:;'
18
+ general.visible Proc.new {current_user.has_role?(:admin)}
19
+ end
20
+
21
+ nav.child :content do |content|
22
+ content.text Proc.new { t('content.content') }
23
+ content.href 'javascript:;'
24
+ content.option :icon, 'icon-flag'
25
+ end
26
+
27
+ end
28
+
29
+ end
30
+
3
31
  end
4
32
  end
data/lib/admix/version.rb CHANGED
@@ -1,8 +1,8 @@
1
1
  module Admix
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 23
5
- TINY = 1
4
+ MINOR = 24
5
+ TINY = 0
6
6
  PRE = nil
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
metadata CHANGED
@@ -1,8 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: admix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.23.1
5
- prerelease:
4
+ version: 0.24.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Sadjow Leão
@@ -10,12 +9,11 @@ authors:
10
9
  autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2013-02-18 00:00:00.000000000 Z
12
+ date: 2013-03-12 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: rails
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
18
  - - ~>
21
19
  - !ruby/object:Gem::Version
@@ -23,7 +21,6 @@ dependencies:
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
25
  - - ~>
29
26
  - !ruby/object:Gem::Version
@@ -31,145 +28,113 @@ dependencies:
31
28
  - !ruby/object:Gem::Dependency
32
29
  name: mix-rails-core
33
30
  requirement: !ruby/object:Gem::Requirement
34
- none: false
35
31
  requirements:
36
32
  - - '='
37
33
  - !ruby/object:Gem::Version
38
- version: 0.23.1
34
+ version: 0.24.0
39
35
  type: :runtime
40
36
  prerelease: false
41
37
  version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
38
  requirements:
44
39
  - - '='
45
40
  - !ruby/object:Gem::Version
46
- version: 0.23.1
41
+ version: 0.24.0
47
42
  - !ruby/object:Gem::Dependency
48
43
  name: mix-rails-auth
49
44
  requirement: !ruby/object:Gem::Requirement
50
- none: false
51
45
  requirements:
52
46
  - - '='
53
47
  - !ruby/object:Gem::Version
54
- version: 0.23.1
48
+ version: 0.24.0
55
49
  type: :runtime
56
50
  prerelease: false
57
51
  version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
52
  requirements:
60
53
  - - '='
61
54
  - !ruby/object:Gem::Version
62
- version: 0.23.1
55
+ version: 0.24.0
63
56
  - !ruby/object:Gem::Dependency
64
57
  name: mix-rails-settings
65
58
  requirement: !ruby/object:Gem::Requirement
66
- none: false
67
59
  requirements:
68
60
  - - '='
69
61
  - !ruby/object:Gem::Version
70
- version: 0.23.1
62
+ version: 0.24.0
71
63
  type: :runtime
72
64
  prerelease: false
73
65
  version_requirements: !ruby/object:Gem::Requirement
74
- none: false
75
66
  requirements:
76
67
  - - '='
77
68
  - !ruby/object:Gem::Version
78
- version: 0.23.1
69
+ version: 0.24.0
79
70
  - !ruby/object:Gem::Dependency
80
71
  name: inherited_resources
81
72
  requirement: !ruby/object:Gem::Requirement
82
- none: false
83
73
  requirements:
84
- - - ! '>='
74
+ - - '>='
85
75
  - !ruby/object:Gem::Version
86
76
  version: '0'
87
77
  type: :runtime
88
78
  prerelease: false
89
79
  version_requirements: !ruby/object:Gem::Requirement
90
- none: false
91
80
  requirements:
92
- - - ! '>='
81
+ - - '>='
93
82
  - !ruby/object:Gem::Version
94
83
  version: '0'
95
84
  - !ruby/object:Gem::Dependency
96
85
  name: simple_form
97
86
  requirement: !ruby/object:Gem::Requirement
98
- none: false
99
87
  requirements:
100
- - - ! '>='
88
+ - - '>='
101
89
  - !ruby/object:Gem::Version
102
90
  version: '0'
103
91
  type: :runtime
104
92
  prerelease: false
105
93
  version_requirements: !ruby/object:Gem::Requirement
106
- none: false
107
94
  requirements:
108
- - - ! '>='
109
- - !ruby/object:Gem::Version
110
- version: '0'
111
- - !ruby/object:Gem::Dependency
112
- name: datagrid
113
- requirement: !ruby/object:Gem::Requirement
114
- none: false
115
- requirements:
116
- - - ! '>='
117
- - !ruby/object:Gem::Version
118
- version: '0'
119
- type: :runtime
120
- prerelease: false
121
- version_requirements: !ruby/object:Gem::Requirement
122
- none: false
123
- requirements:
124
- - - ! '>='
95
+ - - '>='
125
96
  - !ruby/object:Gem::Version
126
97
  version: '0'
127
98
  - !ruby/object:Gem::Dependency
128
99
  name: haml-rails
129
100
  requirement: !ruby/object:Gem::Requirement
130
- none: false
131
101
  requirements:
132
- - - ! '>='
102
+ - - '>='
133
103
  - !ruby/object:Gem::Version
134
104
  version: '0'
135
105
  type: :runtime
136
106
  prerelease: false
137
107
  version_requirements: !ruby/object:Gem::Requirement
138
- none: false
139
108
  requirements:
140
- - - ! '>='
109
+ - - '>='
141
110
  - !ruby/object:Gem::Version
142
111
  version: '0'
143
112
  - !ruby/object:Gem::Dependency
144
113
  name: jquery-rails
145
114
  requirement: !ruby/object:Gem::Requirement
146
- none: false
147
115
  requirements:
148
- - - ! '>='
116
+ - - '>='
149
117
  - !ruby/object:Gem::Version
150
118
  version: '0'
151
119
  type: :runtime
152
120
  prerelease: false
153
121
  version_requirements: !ruby/object:Gem::Requirement
154
- none: false
155
122
  requirements:
156
- - - ! '>='
123
+ - - '>='
157
124
  - !ruby/object:Gem::Version
158
125
  version: '0'
159
126
  - !ruby/object:Gem::Dependency
160
127
  name: jquery-ui-rails
161
128
  requirement: !ruby/object:Gem::Requirement
162
- none: false
163
129
  requirements:
164
- - - ! '>='
130
+ - - '>='
165
131
  - !ruby/object:Gem::Version
166
132
  version: '0'
167
133
  type: :runtime
168
134
  prerelease: false
169
135
  version_requirements: !ruby/object:Gem::Requirement
170
- none: false
171
136
  requirements:
172
- - - ! '>='
137
+ - - '>='
173
138
  - !ruby/object:Gem::Version
174
139
  version: '0'
175
140
  description: Admix administrive area for mix-rails
@@ -180,12 +145,15 @@ executables: []
180
145
  extensions: []
181
146
  extra_rdoc_files: []
182
147
  files:
148
+ - app/controllers/admix/registrations_controller.rb
149
+ - app/controllers/admix/rest_controller.rb
183
150
  - app/controllers/admix/inherited_controller.rb
184
151
  - app/controllers/admix/sessions_controller.rb
185
152
  - app/controllers/admix/dashboard_controller.rb
186
153
  - app/controllers/admix/admix_controller.rb
187
154
  - app/controllers/admix/passwords_controller.rb
188
155
  - app/assets/stylesheets/admix/application.css
156
+ - app/assets/stylesheets/admix/wice_grid.css.scss
189
157
  - app/assets/stylesheets/admix/admix_bootstrap.scss
190
158
  - app/assets/stylesheets/admix/style.css
191
159
  - app/assets/bootstrap/img/glyphicons-halflings.png
@@ -1212,32 +1180,51 @@ files:
1212
1180
  - app/assets/javascripts/admix/application.js.coffee
1213
1181
  - app/assets/nicedit/nicEditorIcons.gif
1214
1182
  - app/assets/nicedit/nicEdit.js
1183
+ - app/helpers/admix/tab.rb
1215
1184
  - app/helpers/admix_helper.rb
1216
1185
  - app/mailers/admix_mailer.rb
1217
1186
  - app/views/admix/dashboard/index.html.haml
1187
+ - app/views/admix/rest/_empty_grid.haml
1188
+ - app/views/admix/rest/_column_actions.haml
1189
+ - app/views/admix/rest/new.html.haml
1190
+ - app/views/admix/rest/_grid.haml
1191
+ - app/views/admix/rest/_grid_actions.haml
1192
+ - app/views/admix/rest/form.html.haml
1193
+ - app/views/admix/rest/edit.html.haml
1194
+ - app/views/admix/rest/index.html.haml
1195
+ - app/views/admix/rest/_actions.haml
1196
+ - app/views/admix/rest/show.html.haml
1197
+ - app/views/admix/rest/_grid_columns.haml
1198
+ - app/views/admix/rest/_form_config.haml
1199
+ - app/views/admix/inherited/_empty_grid.haml
1200
+ - app/views/admix/inherited/_column_actions.haml
1218
1201
  - app/views/admix/inherited/new.html.haml
1219
- - app/views/admix/inherited/_table_actions.html.haml
1202
+ - app/views/admix/inherited/_grid.haml
1203
+ - app/views/admix/inherited/_grid_actions.haml
1204
+ - app/views/admix/inherited/form.html.haml
1220
1205
  - app/views/admix/inherited/edit.html.haml
1221
- - app/views/admix/inherited/_form.html.haml
1222
1206
  - app/views/admix/inherited/index.html.haml
1207
+ - app/views/admix/inherited/_actions.haml
1223
1208
  - app/views/admix/inherited/show.html.haml
1224
- - app/views/layouts/admix/admix.html.haml
1225
- - app/views/layouts/admix/login.html.haml
1209
+ - app/views/admix/inherited/_grid_columns.haml
1210
+ - app/views/admix/inherited/_form_config.haml
1211
+ - app/views/layouts/admix/login.haml
1212
+ - app/views/layouts/admix/admix.haml
1226
1213
  - app/views/devise/sessions/new.html.haml
1227
1214
  - config/locales/simple_form.en.yml
1228
1215
  - config/locales/admix.pt-BR.yml
1216
+ - config/locales/wice_grid.yml
1229
1217
  - config/locales/en_crud.yml
1230
1218
  - config/locales/admix.en.yml
1231
1219
  - config/locales/simple_form.pt-BR.yml
1232
1220
  - config/locales/devise.en.yml
1233
1221
  - config/initializers/simple_form.rb
1234
- - config/initializers/locale.rb
1235
1222
  - config/initializers/admix.rb
1236
1223
  - config/initializers/simple_form_bootstrap.rb
1224
+ - config/initializers/wice_grid_config.rb
1237
1225
  - config/routes.rb
1238
1226
  - config/admix_navigation.rb
1239
1227
  - config/application.rb
1240
- - lib/admix/table-actions.rb
1241
1228
  - lib/admix/version.rb
1242
1229
  - lib/admix/engine.rb
1243
1230
  - lib/admix/navigation/navbar.rb
@@ -1251,32 +1238,25 @@ files:
1251
1238
  - README.rdoc
1252
1239
  homepage: https://github.com/mixinternet/mix-rails
1253
1240
  licenses: []
1241
+ metadata: {}
1254
1242
  post_install_message:
1255
1243
  rdoc_options: []
1256
1244
  require_paths:
1257
1245
  - lib
1258
1246
  required_ruby_version: !ruby/object:Gem::Requirement
1259
- none: false
1260
1247
  requirements:
1261
- - - ! '>='
1248
+ - - '>='
1262
1249
  - !ruby/object:Gem::Version
1263
1250
  version: '0'
1264
- segments:
1265
- - 0
1266
- hash: -4523074345877799582
1267
1251
  required_rubygems_version: !ruby/object:Gem::Requirement
1268
- none: false
1269
1252
  requirements:
1270
- - - ! '>='
1253
+ - - '>='
1271
1254
  - !ruby/object:Gem::Version
1272
1255
  version: '0'
1273
- segments:
1274
- - 0
1275
- hash: -4523074345877799582
1276
1256
  requirements: []
1277
1257
  rubyforge_project:
1278
- rubygems_version: 1.8.24
1258
+ rubygems_version: 2.0.0
1279
1259
  signing_key:
1280
- specification_version: 3
1260
+ specification_version: 4
1281
1261
  summary: Admix administrive area for mix-rails
1282
1262
  test_files: []
@@ -1,14 +0,0 @@
1
-
2
- - array_of_resources = [:admix]
3
- - if defined? parent_type
4
- - array_of_resources << parent_type
5
- - array_of_resources << resource
6
-
7
- = simple_form_for array_of_resources, :html => { :class => 'form-admix' }, wrapper: :bootstrap do |f|
8
-
9
- = f.error_notification
10
-
11
- = render partial: "form_fields", locals: {f: f}
12
-
13
- .form-actions
14
- = f.button :submit, class: 'btn-primary'
@@ -1,3 +0,0 @@
1
- = link_to image_tag('admix/zoom.png'), resource_url(resource), class: 'btn', title:'Visualizar registro'
2
- = link_to image_tag('admix/page_edit.png'), edit_resource_url(resource), class: 'btn', title:'Editar registro'
3
- = link_to image_tag('admix/cancel.png'), resource_url(resource), method: :delete, data: { confirm: t('admix.crud.destroy_confirm') }, class: 'btn', title:'Deletar registro'
@@ -1 +0,0 @@
1
- I18n.default_locale = I18n.locale = 'pt-BR'
@@ -1,17 +0,0 @@
1
- module Admix
2
- module TableActions
3
- extend ActiveSupport::Concern
4
-
5
- included do
6
- column(
7
- :actions,
8
- header: I18n.t('admix.crud.actions'),
9
- html: true
10
- ) do |resource|
11
- render :partial => "table_actions", :locals => {:resource => resource}
12
- end
13
- end
14
-
15
- end
16
- end
17
-