blacklight-spotlight 1.5.1 → 2.0.0.rc1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (119) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -3
  3. data/app/assets/javascripts/spotlight/translation_progress.js +23 -0
  4. data/app/assets/stylesheets/spotlight/_spotlight.scss +2 -0
  5. data/app/assets/stylesheets/spotlight/_translations.scss +47 -0
  6. data/app/assets/stylesheets/spotlight/_utilities.scss +3 -0
  7. data/app/assets/stylesheets/spotlight/_variables.scss +5 -0
  8. data/app/controllers/concerns/spotlight/controller.rb +12 -1
  9. data/app/controllers/spotlight/about_pages_controller.rb +6 -0
  10. data/app/controllers/spotlight/browse_controller.rb +1 -1
  11. data/app/controllers/spotlight/catalog_controller.rb +6 -1
  12. data/app/controllers/spotlight/exhibits_controller.rb +10 -2
  13. data/app/controllers/spotlight/feature_pages_controller.rb +6 -0
  14. data/app/controllers/spotlight/filters_controller.rb +2 -2
  15. data/app/controllers/spotlight/home_pages_controller.rb +10 -0
  16. data/app/controllers/spotlight/languages_controller.rb +46 -0
  17. data/app/controllers/spotlight/pages_controller.rb +57 -3
  18. data/app/controllers/spotlight/solr_controller.rb +3 -3
  19. data/app/controllers/spotlight/translations_controller.rb +34 -0
  20. data/app/helpers/spotlight/application_helper.rb +1 -0
  21. data/app/helpers/spotlight/languages_helper.rb +33 -0
  22. data/app/helpers/spotlight/translations_helper.rb +13 -0
  23. data/app/models/concerns/spotlight/custom_translation_extension.rb +4 -0
  24. data/app/models/concerns/spotlight/translatables.rb +30 -0
  25. data/app/models/spotlight/ability.rb +5 -2
  26. data/app/models/spotlight/about_page.rb +1 -1
  27. data/app/models/spotlight/exhibit.rb +14 -6
  28. data/app/models/spotlight/feature_page.rb +1 -2
  29. data/app/models/spotlight/home_page.rb +1 -3
  30. data/app/models/spotlight/language.rb +24 -0
  31. data/app/models/spotlight/main_navigation.rb +12 -0
  32. data/app/models/spotlight/page.rb +53 -1
  33. data/app/models/spotlight/resources/upload.rb +6 -1
  34. data/app/models/spotlight/search.rb +4 -0
  35. data/app/services/spotlight/clone_translated_page_from_locale.rb +32 -0
  36. data/app/views/_user_util_links.html.erb +1 -0
  37. data/app/views/devise/mailer/invitation_instructions.html.erb +2 -2
  38. data/app/views/layouts/spotlight/spotlight.html.erb +2 -2
  39. data/app/views/shared/_curated_features_navbar.html.erb +2 -2
  40. data/app/views/spotlight/about_pages/_sidebar.html.erb +1 -1
  41. data/app/views/spotlight/admin_users/index.html.erb +1 -1
  42. data/app/views/spotlight/catalog/_edit_default.html.erb +1 -1
  43. data/app/views/spotlight/exhibits/_export.html.erb +1 -1
  44. data/app/views/spotlight/exhibits/_form.html.erb +1 -1
  45. data/app/views/spotlight/exhibits/_import.html.erb +2 -1
  46. data/app/views/spotlight/exhibits/_languages.html.erb +56 -0
  47. data/app/views/spotlight/exhibits/edit.html.erb +11 -5
  48. data/app/views/spotlight/feature_pages/_sidebar.html.erb +1 -1
  49. data/app/views/spotlight/filters/_form.html.erb +2 -1
  50. data/app/views/spotlight/resources/upload/_form.html.erb +1 -1
  51. data/app/views/spotlight/shared/_curation_sidebar.html.erb +5 -0
  52. data/app/views/spotlight/shared/_locale_picker.html.erb +14 -0
  53. data/app/views/spotlight/translations/_browse_categories.html.erb +67 -0
  54. data/app/views/spotlight/translations/_general.html.erb +176 -0
  55. data/app/views/spotlight/translations/_metadata.html.erb +67 -0
  56. data/app/views/spotlight/translations/_page.html.erb +45 -0
  57. data/app/views/spotlight/translations/_pages.html.erb +37 -0
  58. data/app/views/spotlight/translations/_pages_table.html.erb +15 -0
  59. data/app/views/spotlight/translations/_search_fields.html.erb +97 -0
  60. data/app/views/spotlight/translations/edit.html.erb +55 -0
  61. data/config/i18n-tasks.yml +81 -0
  62. data/config/locales/devise.en.yml +2 -1
  63. data/config/locales/spotlight.en.yml +657 -614
  64. data/config/routes.rb +19 -1
  65. data/db/migrate/20180308203409_create_spotlight_languages.rb +12 -0
  66. data/db/migrate/20180403130857_translation_uniqueness.rb +5 -0
  67. data/db/migrate/20180405044000_add_locale_to_pages.rb +6 -0
  68. data/db/migrate/20180406212516_add_default_locale_reference_to_spotlight_pages.rb +7 -0
  69. data/lib/generators/spotlight/templates/catalog_controller.rb +2 -2
  70. data/lib/generators/spotlight/templates/config/initializers/spotlight_initializer.rb +14 -4
  71. data/lib/generators/spotlight/templates/config/initializers/translation.rb +4 -2
  72. data/lib/migration/page_language.rb +27 -0
  73. data/lib/spotlight/engine.rb +32 -4
  74. data/lib/spotlight/upload_field_config.rb +27 -0
  75. data/lib/spotlight/version.rb +1 -1
  76. data/lib/tasks/spotlight_tasks.rake +6 -0
  77. data/spec/controllers/spotlight/about_pages_controller_spec.rb +67 -1
  78. data/spec/controllers/spotlight/feature_pages_controller_spec.rb +50 -0
  79. data/spec/controllers/spotlight/filters_controller_spec.rb +4 -4
  80. data/spec/controllers/spotlight/home_pages_controller_spec.rb +25 -0
  81. data/spec/controllers/spotlight/languages_controller_spec.rb +66 -0
  82. data/spec/controllers/spotlight/pages_controller_spec.rb +45 -0
  83. data/spec/controllers/spotlight/solr_controller_spec.rb +1 -1
  84. data/spec/controllers/spotlight/translations_controller_spec.rb +67 -0
  85. data/spec/examples.txt +1171 -1281
  86. data/spec/factories/exhibits.rb +1 -1
  87. data/spec/factories/language.rb +6 -0
  88. data/spec/factories/main_navigation.rb +7 -0
  89. data/spec/factories/searches.rb +1 -0
  90. data/spec/factories/tags.rb +1 -0
  91. data/spec/features/exhibits/language_create_edit_spec.rb +53 -0
  92. data/spec/features/exhibits/translation_editing_spec.rb +397 -0
  93. data/spec/features/javascript/locale_selector_spec.rb +61 -0
  94. data/spec/helpers/spotlight/languages_helper_spec.rb +73 -0
  95. data/spec/helpers/spotlight/translations_helper_spec.rb +16 -0
  96. data/spec/i18n_spec.rb +29 -0
  97. data/spec/lib/migration/page_language_spec.rb +21 -0
  98. data/spec/lib/spotlight/upload_field_config_spec.rb +24 -0
  99. data/spec/models/spotlight/ability_spec.rb +17 -4
  100. data/spec/models/spotlight/exhibit_spec.rb +49 -0
  101. data/spec/models/spotlight/language_spec.rb +41 -0
  102. data/spec/models/spotlight/page_spec.rb +109 -0
  103. data/spec/models/translation_spec.rb +11 -0
  104. data/spec/services/spotlight/clone_translated_page_from_locale_spec.rb +29 -0
  105. data/spec/spec_helper.rb +1 -13
  106. data/spec/support/disable_friendly_id_deprecation_warnings.rb +7 -6
  107. data/spec/test_app_templates/Gemfile.extra +3 -0
  108. data/spec/test_app_templates/catalog_controller.rb +31 -31
  109. data/spec/test_app_templates/lib/generators/test_app_generator.rb +9 -6
  110. data/spec/views/spotlight/contacts/edit.html.erb_spec.rb +13 -0
  111. data/spec/views/spotlight/exhibits/_form.html.erb_spec.rb +33 -0
  112. data/spec/views/spotlight/exhibits/edit.html.erb_spec.rb +4 -1
  113. data/spec/views/spotlight/resources/_external_resources_form.html.erb_spec.rb +13 -0
  114. data/spec/views/spotlight/resources/new.html.erb_spec.rb +10 -4
  115. data/spec/views/spotlight/translations/_page.html.erb_spec.rb +75 -0
  116. metadata +88 -28
  117. data/app/assets/javascripts/spotlight/sir-trevor.js +0 -0
  118. data/app/views/shared/_share_follow.html.erb +0 -5
  119. data/config/locales/social_share_button.en.yml +0 -18
File without changes
@@ -1,5 +0,0 @@
1
- <div class="col-md-3 col-md-offset-9" class="share_follow">
2
- <h5><%= t :'.share_follow' %></h5>
3
- <%= social_share_button_tag(application_name) %>
4
- </div>
5
-
@@ -1,18 +0,0 @@
1
- en:
2
- social_share_button:
3
- share_to: "%{name}"
4
- weibo: Sina Weibo
5
- twitter: Twitter
6
- facebook: Facebook
7
- douban: Douban
8
- qq: Qzone
9
- tqq: Tqq
10
- delicious: Delicious
11
- baidu: Baidu.com
12
- kaixin001: Kaixin001.com
13
- renren: Renren.com
14
- google_plus: Google+
15
- google_bookmark: Google Bookmark
16
- tumblr: Tumblr
17
- plurk: Plurk
18
- email: Email