edgarj 4.01.01 → 4.02.00
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/controllers/edgarj/popup_controller.rb +12 -1
- data/app/helpers/edgarj/assoc_helper.rb +4 -4
- data/app/views/edgarj/popup/index.js.erb +1 -2
- data/lib/edgarj/version.rb +1 -1
- metadata +68 -68
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fb262ae814e088c79954becacd222d8cdc4b3797
|
4
|
+
data.tar.gz: 7fe707418fcedd8a51a40f15100008390ec30829
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5595e58910da9ee716808607d7e28dd435d16d029feb749feb035c0192d8ba350e44a6f09b471508caba00006601506a7767117cea4dbaa1bb76fb3676681476
|
7
|
+
data.tar.gz: e51083e18e3578df94d6691ab653d4ddce11eaf27d0c8601361ff6abe48d0280c36ae27107a6f7a958fb62af38b131acc4ce0e3b14ea289d358a04232e052d6d
|
@@ -8,7 +8,7 @@ module Edgarj
|
|
8
8
|
include ControllerMixinCommon
|
9
9
|
include Edgarj::PermissionMixin
|
10
10
|
|
11
|
-
helper_method :model, :popup_drawer
|
11
|
+
helper_method :title, :model, :popup_drawer
|
12
12
|
before_filter :require_read_permission
|
13
13
|
|
14
14
|
# draw popup windows
|
@@ -16,6 +16,8 @@ module Edgarj
|
|
16
16
|
# === INPUTS
|
17
17
|
# params[:id_target]:: id target DOM on click entry of popup
|
18
18
|
# params[:page]:: on paginate
|
19
|
+
# params[:title]:: (optional) popup title
|
20
|
+
# default: t('edgarj.form.popup.title') % model_label
|
19
21
|
#
|
20
22
|
# === Paginate logic
|
21
23
|
# - params[:page] exists -> save it to @page_info and use it
|
@@ -112,6 +114,15 @@ module Edgarj
|
|
112
114
|
@popup_drawer
|
113
115
|
end
|
114
116
|
|
117
|
+
# popup window title is used in the following priority:
|
118
|
+
#
|
119
|
+
# 1. params[:title]
|
120
|
+
# 1. this method
|
121
|
+
# 1. t('edgarj.form.popup.title') % model_label
|
122
|
+
def title
|
123
|
+
''
|
124
|
+
end
|
125
|
+
|
115
126
|
# This works as:
|
116
127
|
#
|
117
128
|
# before_render :set_popup_drawer
|
@@ -119,15 +119,15 @@ module Edgarj
|
|
119
119
|
end
|
120
120
|
=end
|
121
121
|
|
122
|
-
# 1. t('view.CONTROLLER.
|
123
|
-
# 1.
|
122
|
+
# 1. t('view.CONTROLLER.MODEL.COL_NAME')
|
123
|
+
# 1. MODEL.human_attribute_name(COL_NAME)
|
124
124
|
# 1. else, parent.human_name is used.
|
125
125
|
def draw_belongs_to_label_sub(model, col_name, parent_model)
|
126
126
|
@controller_model ||= controller.send(:model)
|
127
|
+
|
127
128
|
I18n.t(col_name,
|
128
129
|
scope: "view.#{controller_path}.#{@controller_model.name.underscore}",
|
129
|
-
default:
|
130
|
-
scope: "activerecord.attributes.#{model.to_s.underscore}",
|
130
|
+
default: model.human_attribute_name(col_name,
|
131
131
|
default: parent_model.human_name))
|
132
132
|
end
|
133
133
|
|
@@ -1,5 +1,4 @@
|
|
1
1
|
$('#edgarj_form_popup').html("<%= j(render 'index') %>");
|
2
2
|
$('#edgarj_form_popup').dialog('option', 'title',
|
3
|
-
'<%= t('edgarj.form.popup.title') % model_label %>');
|
3
|
+
'<%= params[:title] || title || t('edgarj.form.popup.title') % model_label %>');
|
4
4
|
$('#edgarj_form_popup').dialog('open');
|
5
|
-
|
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: 4.
|
4
|
+
version: 4.02.00
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fuminori Ido
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -364,91 +364,91 @@ signing_key:
|
|
364
364
|
specification_version: 4
|
365
365
|
summary: Scaffold with Ajax, search, sort, 'belongs_to' popup, and more.
|
366
366
|
test_files:
|
367
|
-
- test/
|
368
|
-
- test/
|
369
|
-
- test/
|
370
|
-
- test/
|
371
|
-
- test/models/edgarj/user_group_test.rb
|
372
|
-
- test/models/edgarj/page_info_test.rb
|
373
|
-
- test/models/edgarj/model_permission_test.rb
|
374
|
-
- test/integration/navigation_test.rb
|
375
|
-
- test/support/edgarj/controller_supporter.rb
|
376
|
-
- test/controllers/edgarj/user_group_users_controller_test.rb
|
377
|
-
- test/controllers/edgarj/edgarj_controller_test.rb
|
378
|
-
- test/controllers/edgarj/model_permissions_controller_test.rb
|
379
|
-
- test/edgarj_test.rb
|
380
|
-
- test/test_helper.rb
|
367
|
+
- test/dummy/config.ru
|
368
|
+
- test/dummy/test/controllers/books_controller_test.rb
|
369
|
+
- test/dummy/test/controllers/authors_controller_test.rb
|
370
|
+
- test/dummy/test/controllers/authors_popup_controller_test.rb
|
381
371
|
- test/dummy/test/helpers/authors_helper_test.rb
|
382
|
-
- test/dummy/test/models/book_test.rb
|
383
372
|
- test/dummy/test/models/author_test.rb
|
384
373
|
- test/dummy/test/models/rails_config_test.rb
|
385
|
-
- test/dummy/test/
|
386
|
-
- test/dummy/
|
387
|
-
- test/dummy/
|
388
|
-
- test/dummy/
|
389
|
-
- test/dummy/
|
390
|
-
- test/dummy/
|
391
|
-
- test/dummy/
|
392
|
-
- test/dummy/
|
393
|
-
- test/dummy/
|
394
|
-
- test/dummy/
|
395
|
-
- test/dummy/
|
396
|
-
- test/dummy/
|
397
|
-
- test/dummy/
|
374
|
+
- test/dummy/test/models/book_test.rb
|
375
|
+
- test/dummy/app/assets/javascripts/application.js
|
376
|
+
- test/dummy/app/assets/javascripts/authors.js
|
377
|
+
- test/dummy/app/assets/stylesheets/authors.css
|
378
|
+
- test/dummy/app/assets/stylesheets/scaffold.css
|
379
|
+
- test/dummy/app/assets/stylesheets/application.css
|
380
|
+
- test/dummy/app/decorators/models/edgarj/user_group_decorator.rb
|
381
|
+
- test/dummy/app/controllers/authors_popup_controller.rb
|
382
|
+
- test/dummy/app/controllers/dummy_auth_mixin.rb
|
383
|
+
- test/dummy/app/controllers/application_controller.rb
|
384
|
+
- test/dummy/app/controllers/books_controller.rb
|
385
|
+
- test/dummy/app/controllers/authors_controller.rb
|
386
|
+
- test/dummy/app/helpers/authors_popup_helper.rb
|
387
|
+
- test/dummy/app/helpers/authors_helper.rb
|
388
|
+
- test/dummy/app/helpers/books_helper.rb
|
389
|
+
- test/dummy/app/helpers/application_helper.rb
|
390
|
+
- test/dummy/app/models/author.rb
|
391
|
+
- test/dummy/app/models/user.rb
|
392
|
+
- test/dummy/app/models/book.rb
|
393
|
+
- test/dummy/app/views/layouts/application.html.erb
|
394
|
+
- test/dummy/app/views/layouts/login.html.erb
|
398
395
|
- test/dummy/Rakefile
|
399
|
-
- test/dummy/config/routes.rb
|
400
|
-
- test/dummy/config/boot.rb
|
401
|
-
- test/dummy/config/environment.rb
|
402
396
|
- test/dummy/config/database.yml
|
403
397
|
- test/dummy/config/settings.yml
|
404
|
-
- test/dummy/config/
|
405
|
-
- test/dummy/config/
|
406
|
-
- test/dummy/config/environments/development.rb
|
407
|
-
- test/dummy/config/application.rb
|
398
|
+
- test/dummy/config/boot.rb
|
399
|
+
- test/dummy/config/environment.rb
|
408
400
|
- test/dummy/config/settings/production.yml
|
409
401
|
- test/dummy/config/settings/development.yml
|
410
402
|
- test/dummy/config/settings/test.yml
|
411
|
-
- test/dummy/config/
|
403
|
+
- test/dummy/config/routes.rb
|
404
|
+
- test/dummy/config/application.rb
|
412
405
|
- test/dummy/config/locales/en.yml
|
413
406
|
- test/dummy/config/locales/ja.yml
|
414
|
-
- test/dummy/config/initializers/
|
415
|
-
- test/dummy/config/initializers/
|
407
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
408
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
416
409
|
- test/dummy/config/initializers/wrap_parameters.rb
|
417
|
-
- test/dummy/config/initializers/session_store.rb
|
418
410
|
- test/dummy/config/initializers/secret_token.rb
|
419
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
420
411
|
- test/dummy/config/initializers/mime_types.rb
|
421
|
-
- test/dummy/config/initializers/
|
422
|
-
- test/dummy/
|
412
|
+
- test/dummy/config/initializers/session_store.rb
|
413
|
+
- test/dummy/config/initializers/inflections.rb
|
414
|
+
- test/dummy/config/initializers/config.rb
|
415
|
+
- test/dummy/config/edgarj/menu_config.rb
|
416
|
+
- test/dummy/config/environments/production.rb
|
417
|
+
- test/dummy/config/environments/development.rb
|
418
|
+
- test/dummy/config/environments/test.rb
|
423
419
|
- test/dummy/public/404.html
|
424
|
-
- test/dummy/public/
|
420
|
+
- test/dummy/public/favicon.ico
|
425
421
|
- test/dummy/public/500.html
|
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/
|
437
|
-
- test/
|
438
|
-
- test/
|
439
|
-
- test/
|
440
|
-
- test/
|
441
|
-
- test/dummy/app/controllers/authors_controller.rb
|
442
|
-
- test/dummy/app/controllers/books_controller.rb
|
443
|
-
- test/dummy/app/controllers/dummy_auth_mixin.rb
|
444
|
-
- test/dummy/app/controllers/application_controller.rb
|
445
|
-
- test/dummy/app/controllers/authors_popup_controller.rb
|
422
|
+
- test/dummy/public/422.html
|
423
|
+
- test/dummy/README.rdoc
|
424
|
+
- test/dummy/bin/bundle
|
425
|
+
- test/dummy/bin/rake
|
426
|
+
- test/dummy/bin/rails
|
427
|
+
- test/dummy/db/schema.rb
|
428
|
+
- test/dummy/db/migrate/20140807065420_create_users.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/test_helper.rb
|
433
|
+
- test/integration/navigation_test.rb
|
434
|
+
- test/controllers/edgarj/user_group_users_controller_test.rb
|
435
|
+
- test/controllers/edgarj/edgarj_controller_test.rb
|
436
|
+
- test/controllers/edgarj/model_permissions_controller_test.rb
|
446
437
|
- test/fixtures/authors.yml
|
438
|
+
- test/fixtures/books.yml
|
447
439
|
- test/fixtures/users.yml
|
448
|
-
- test/fixtures/edgarj/page_infos.yml
|
449
440
|
- test/fixtures/edgarj/user_group_users.yml
|
450
441
|
- test/fixtures/edgarj/user_groups.yml
|
451
|
-
- test/fixtures/edgarj/
|
442
|
+
- test/fixtures/edgarj/page_infos.yml
|
452
443
|
- test/fixtures/edgarj/sssns.yml
|
453
|
-
- test/fixtures/
|
444
|
+
- test/fixtures/edgarj/model_permissions.yml
|
445
|
+
- test/edgarj_test.rb
|
446
|
+
- test/support/edgarj/controller_supporter.rb
|
447
|
+
- test/models/helpers/edgarj/model_permissions_helper_test.rb
|
448
|
+
- test/models/helpers/edgarj/user_group_users_helper_test.rb
|
449
|
+
- test/models/edgarj/user_group_test.rb
|
450
|
+
- test/models/edgarj/sssn_test.rb
|
451
|
+
- test/models/edgarj/model_permission_test.rb
|
452
|
+
- test/models/edgarj/page_info_test.rb
|
453
|
+
- test/models/edgarj/user_group_user_test.rb
|
454
454
|
has_rdoc:
|