edgarj 0.01.16 → 0.01.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/helpers/edgarj/assoc_helper.rb +0 -14
- data/app/models/edgarj/drawer/base.rb +20 -0
- data/app/views/edgarj/edgarj/_search_form.html.erb +1 -10
- data/lib/edgarj/version.rb +1 -1
- metadata +75 -78
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 99f55ad6f5d4c50cd6f6752bf333e38655a70239
|
|
4
|
+
data.tar.gz: 80669198293ca6f20bb3b01f14ec221ccd755555
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: e30dbda0b377819dc6dca9b92ee2ebd27fb037b3c6606101a8e9c2247320250f79b8f49f63da75b485dd3e6033c9376fb7bd4c01d6fa7fc2b1af121d8f059227
|
|
7
|
+
data.tar.gz: 2c90fe6ed827c5dcab1b6faf083b03093c243e069476833fa90854bd15df87285a094a849da7949611d0b3dc27906934fbadf85bc12e9c9349434f11e58fc86b
|
|
@@ -256,20 +256,6 @@ module Edgarj
|
|
|
256
256
|
turn_on_flags.map{|f| rec.class.human_const_name(bitset, f) }.join(' ')
|
|
257
257
|
end
|
|
258
258
|
|
|
259
|
-
# get enum Module.
|
|
260
|
-
#
|
|
261
|
-
# When Col(camelized argument col name) module exists, the Col is
|
|
262
|
-
# assumed enum definition.
|
|
263
|
-
def get_enum(model, col)
|
|
264
|
-
col_name = col.name
|
|
265
|
-
if model.const_defined?(col_name.camelize, false)
|
|
266
|
-
enum = model.const_get(col_name.camelize)
|
|
267
|
-
enum.is_a?(Module) ? enum : nil
|
|
268
|
-
else
|
|
269
|
-
nil
|
|
270
|
-
end
|
|
271
|
-
end
|
|
272
|
-
|
|
273
259
|
# draw enum column in list.
|
|
274
260
|
#
|
|
275
261
|
# When enum for col is defined, constant string (rather than rec.col value)
|
|
@@ -189,6 +189,7 @@ module Edgarj
|
|
|
189
189
|
@model.table_name + '.' + col.name
|
|
190
190
|
end
|
|
191
191
|
|
|
192
|
+
# overwrite to replace form drawer for the model
|
|
192
193
|
def form_drawer_class
|
|
193
194
|
Edgarj::FormDrawer::Base
|
|
194
195
|
end
|
|
@@ -229,6 +230,25 @@ module Edgarj
|
|
|
229
230
|
end
|
|
230
231
|
end
|
|
231
232
|
end
|
|
233
|
+
|
|
234
|
+
# overwrite to replace form drawer for search
|
|
235
|
+
def search_form_drawer_class
|
|
236
|
+
Edgarj::FormDrawer::Search
|
|
237
|
+
end
|
|
238
|
+
|
|
239
|
+
def draw_search_form(record)
|
|
240
|
+
@vc.form_for(record, url: {action: 'search'}, html: {
|
|
241
|
+
id: '_edgarj_search_form',
|
|
242
|
+
remote: true,
|
|
243
|
+
method: :get}) do |f|
|
|
244
|
+
f.fields_for(record._operator) do |o|
|
|
245
|
+
search_form_drawer_class.new(self, record, f, o).draw()
|
|
246
|
+
end +
|
|
247
|
+
|
|
248
|
+
# to avoid submit on 1-textfield form when hit [ENTER] key
|
|
249
|
+
'<input type="text" name="dummy" style="visibility:hidden" size=0>'.html_safe
|
|
250
|
+
end
|
|
251
|
+
end
|
|
232
252
|
end
|
|
233
253
|
end
|
|
234
254
|
end
|
|
@@ -24,17 +24,8 @@ _form.html.erb:: record form
|
|
|
24
24
|
</ul>
|
|
25
25
|
</div>
|
|
26
26
|
<% end %>
|
|
27
|
-
<%= form_for(@search, url: {action: 'search'}, html: {
|
|
28
|
-
id: '_edgarj_search_form',
|
|
29
|
-
remote: true,
|
|
30
|
-
method: :get}) do |f| %>
|
|
31
|
-
<%= f.fields_for(@search._operator) do |o| %>
|
|
32
|
-
<%= Edgarj::FormDrawer::Search.new(@drawer, @search, f, o).draw() %>
|
|
33
|
-
<%# to avoid submit on 1-textfield form when hit [ENTER] key: %>
|
|
34
|
-
<input type="text" name="dummy" style="visibility:hidden" size=0>
|
|
35
|
-
<% end %>
|
|
36
|
-
<% end %>
|
|
37
27
|
<%= draw_search_form_buttons %>
|
|
28
|
+
<%= @drawer.draw_search_form(@search) %>
|
|
38
29
|
|
|
39
30
|
<%= javascript_tag do %>
|
|
40
31
|
<% id = 'edgarj_search_operator_selection' %>
|
data/lib/edgarj/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: edgarj
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.01.
|
|
4
|
+
version: 0.01.17
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fuminori Ido
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-12-
|
|
11
|
+
date: 2014-12-10 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rails
|
|
@@ -151,14 +151,11 @@ dependencies:
|
|
|
151
151
|
- !ruby/object:Gem::Version
|
|
152
152
|
version: '0'
|
|
153
153
|
description: |
|
|
154
|
-
Edgarj
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
* QBE(Query By Example) search (under construction, sorry)
|
|
160
|
-
* CSV download
|
|
161
|
-
* popup for belongs_to attribute
|
|
154
|
+
Edgarj is an Ajax-based scaffold with QBE(Query By Example) search form,
|
|
155
|
+
column sort on record list,
|
|
156
|
+
popup view & controller for 'belongs_to' relation table to pick up a parent record,
|
|
157
|
+
csv download, and
|
|
158
|
+
user-role based access control.
|
|
162
159
|
email:
|
|
163
160
|
- ido00 at sourceforge.net
|
|
164
161
|
executables: []
|
|
@@ -367,90 +364,90 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
367
364
|
version: '0'
|
|
368
365
|
requirements: []
|
|
369
366
|
rubyforge_project:
|
|
370
|
-
rubygems_version: 2.
|
|
367
|
+
rubygems_version: 2.4.1
|
|
371
368
|
signing_key:
|
|
372
369
|
specification_version: 4
|
|
373
370
|
summary: Scaffold with Ajax, search, sort, 'belongs_to' popup, and more.
|
|
374
371
|
test_files:
|
|
375
|
-
- test/
|
|
376
|
-
- test/
|
|
377
|
-
- test/
|
|
378
|
-
- test/
|
|
379
|
-
- test/
|
|
380
|
-
- test/
|
|
381
|
-
- test/
|
|
382
|
-
- test/
|
|
383
|
-
- test/
|
|
384
|
-
- test/test_helper.rb
|
|
385
|
-
- test/dummy/test/helpers/authors_helper_test.rb
|
|
386
|
-
- test/dummy/test/unit/book_test.rb
|
|
387
|
-
- test/dummy/test/unit/author_test.rb
|
|
388
|
-
- test/dummy/test/functional/authors_controller_test.rb
|
|
389
|
-
- test/dummy/test/functional/books_controller_test.rb
|
|
390
|
-
- test/dummy/README.rdoc
|
|
372
|
+
- test/fixtures/users.yml
|
|
373
|
+
- test/fixtures/edgarj/model_permissions.yml
|
|
374
|
+
- test/fixtures/edgarj/sssns.yml
|
|
375
|
+
- test/fixtures/edgarj/user_group_users.yml
|
|
376
|
+
- test/fixtures/edgarj/page_infos.yml
|
|
377
|
+
- test/fixtures/edgarj/user_groups.yml
|
|
378
|
+
- test/fixtures/authors.yml
|
|
379
|
+
- test/fixtures/books.yml
|
|
380
|
+
- test/dummy/Rakefile
|
|
391
381
|
- test/dummy/config.ru
|
|
382
|
+
- test/dummy/bin/rails
|
|
392
383
|
- test/dummy/bin/bundle
|
|
393
384
|
- test/dummy/bin/rake
|
|
394
|
-
- test/dummy/
|
|
395
|
-
- test/dummy/
|
|
396
|
-
- test/dummy/
|
|
397
|
-
- test/dummy/
|
|
398
|
-
- test/dummy/
|
|
399
|
-
- test/dummy/
|
|
400
|
-
- test/dummy/
|
|
401
|
-
- test/dummy/
|
|
402
|
-
- test/dummy/
|
|
403
|
-
- test/dummy/
|
|
404
|
-
- test/dummy/
|
|
405
|
-
- test/dummy/
|
|
406
|
-
- test/dummy/
|
|
407
|
-
- test/dummy/
|
|
385
|
+
- test/dummy/app/decorators/models/edgarj/user_group_decorator.rb
|
|
386
|
+
- test/dummy/app/assets/stylesheets/application.css
|
|
387
|
+
- test/dummy/app/assets/stylesheets/authors.css
|
|
388
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
|
389
|
+
- test/dummy/app/assets/javascripts/application.js
|
|
390
|
+
- test/dummy/app/assets/javascripts/authors.js
|
|
391
|
+
- test/dummy/app/views/layouts/login.html.erb
|
|
392
|
+
- test/dummy/app/views/layouts/application.html.erb
|
|
393
|
+
- test/dummy/app/models/author.rb
|
|
394
|
+
- test/dummy/app/models/book.rb
|
|
395
|
+
- test/dummy/app/models/user.rb
|
|
396
|
+
- test/dummy/app/controllers/dummy_auth_mixin.rb
|
|
397
|
+
- test/dummy/app/controllers/application_controller.rb
|
|
398
|
+
- test/dummy/app/controllers/authors_popup_controller.rb
|
|
399
|
+
- test/dummy/app/controllers/books_controller.rb
|
|
400
|
+
- test/dummy/app/controllers/authors_controller.rb
|
|
401
|
+
- test/dummy/app/helpers/authors_helper.rb
|
|
402
|
+
- test/dummy/app/helpers/authors_popup_helper.rb
|
|
403
|
+
- test/dummy/app/helpers/application_helper.rb
|
|
404
|
+
- test/dummy/app/helpers/books_helper.rb
|
|
405
|
+
- test/dummy/config/locales/en.yml
|
|
408
406
|
- test/dummy/config/application.rb
|
|
409
407
|
- test/dummy/config/edgarj/menu_config.rb
|
|
410
|
-
- test/dummy/config/
|
|
411
|
-
- test/dummy/config/
|
|
412
|
-
- test/dummy/config/
|
|
408
|
+
- test/dummy/config/environments/production.rb
|
|
409
|
+
- test/dummy/config/environments/development.rb
|
|
410
|
+
- test/dummy/config/environments/test.rb
|
|
411
|
+
- test/dummy/config/environment.rb
|
|
413
412
|
- test/dummy/config/initializers/wrap_parameters.rb
|
|
414
|
-
- test/dummy/config/initializers/session_store.rb
|
|
415
|
-
- test/dummy/config/initializers/secret_token.rb
|
|
416
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
|
417
413
|
- test/dummy/config/initializers/mime_types.rb
|
|
418
414
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
|
419
|
-
- test/dummy/
|
|
415
|
+
- test/dummy/config/initializers/secret_token.rb
|
|
416
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
|
417
|
+
- test/dummy/config/initializers/inflections.rb
|
|
418
|
+
- test/dummy/config/initializers/strong_parameter.rb
|
|
419
|
+
- test/dummy/config/initializers/session_store.rb
|
|
420
|
+
- test/dummy/config/routes.rb
|
|
421
|
+
- test/dummy/config/database.yml
|
|
422
|
+
- test/dummy/config/boot.rb
|
|
420
423
|
- test/dummy/public/favicon.ico
|
|
421
|
-
- test/dummy/public/404.html
|
|
422
424
|
- test/dummy/public/422.html
|
|
423
425
|
- test/dummy/public/500.html
|
|
424
|
-
- test/dummy/
|
|
425
|
-
- test/dummy/
|
|
426
|
-
- test/dummy/
|
|
427
|
-
- test/dummy/
|
|
428
|
-
- test/dummy/
|
|
429
|
-
- test/dummy/
|
|
430
|
-
- test/dummy/
|
|
431
|
-
- test/dummy/
|
|
432
|
-
- test/dummy/
|
|
433
|
-
- test/dummy/
|
|
434
|
-
- test/dummy/
|
|
435
|
-
- test/dummy/
|
|
436
|
-
- test/dummy/
|
|
437
|
-
- test/
|
|
438
|
-
- test/
|
|
439
|
-
- test/
|
|
440
|
-
- test/
|
|
441
|
-
- test/
|
|
442
|
-
- test/
|
|
443
|
-
- test/
|
|
426
|
+
- test/dummy/public/404.html
|
|
427
|
+
- test/dummy/README.rdoc
|
|
428
|
+
- test/dummy/db/schema.rb
|
|
429
|
+
- test/dummy/db/migrate/20131218011851_create_books.rb
|
|
430
|
+
- test/dummy/db/migrate/20131107120635_create_authors.rb
|
|
431
|
+
- test/dummy/db/migrate/20140201000000_add_user_group_id_to_authors.rb
|
|
432
|
+
- test/dummy/db/migrate/20140807065420_create_users.rb
|
|
433
|
+
- test/dummy/test/unit/author_test.rb
|
|
434
|
+
- test/dummy/test/unit/book_test.rb
|
|
435
|
+
- test/dummy/test/functional/books_controller_test.rb
|
|
436
|
+
- test/dummy/test/functional/authors_controller_test.rb
|
|
437
|
+
- test/dummy/test/helpers/authors_helper_test.rb
|
|
438
|
+
- test/dummy/script/rails
|
|
439
|
+
- test/unit/edgarj/sssn_test.rb
|
|
440
|
+
- test/unit/edgarj/model_permission_test.rb
|
|
441
|
+
- test/unit/edgarj/user_group_test.rb
|
|
442
|
+
- test/unit/edgarj/user_group_user_test.rb
|
|
443
|
+
- test/unit/edgarj/page_info_test.rb
|
|
444
|
+
- test/unit/helpers/edgarj/user_group_users_helper_test.rb
|
|
445
|
+
- test/unit/helpers/edgarj/model_permissions_helper_test.rb
|
|
446
|
+
- test/support/edgarj/controller_supporter.rb
|
|
444
447
|
- test/edgar_test.rb
|
|
445
|
-
- test/
|
|
446
|
-
- test/
|
|
447
|
-
- test/fixtures/edgarj/page_infos.yml
|
|
448
|
-
- test/fixtures/edgarj/user_group_users.yml
|
|
449
|
-
- test/fixtures/edgarj/user_groups.yml
|
|
450
|
-
- test/fixtures/edgarj/model_permissions.yml
|
|
451
|
-
- test/fixtures/edgarj/sssns.yml
|
|
452
|
-
- test/fixtures/books.yml
|
|
448
|
+
- test/test_helper.rb
|
|
449
|
+
- test/integration/navigation_test.rb
|
|
453
450
|
- test/functional/edgarj/user_group_users_controller_test.rb
|
|
454
|
-
- test/functional/edgarj/edgarj_controller_test.rb
|
|
455
451
|
- test/functional/edgarj/model_permissions_controller_test.rb
|
|
452
|
+
- test/functional/edgarj/edgarj_controller_test.rb
|
|
456
453
|
has_rdoc:
|