hyrax 2.1.0.rc1 → 2.1.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/.github/CONTRIBUTING.md +6 -6
  3. data/README.md +18 -8
  4. data/app/assets/javascripts/hyrax/app.js.erb +1 -1
  5. data/app/assets/javascripts/hyrax/collections.js +16 -13
  6. data/app/assets/javascripts/hyrax/monkey_patch_turbolinks.js.coffee +12 -0
  7. data/app/assets/stylesheets/hyrax/dashboard.scss +4 -0
  8. data/app/controllers/hyrax/dashboard/collections_controller.rb +4 -7
  9. data/app/controllers/hyrax/my_controller.rb +1 -0
  10. data/app/helpers/hyrax/collections_helper.rb +9 -0
  11. data/app/models/sipity/workflow.rb +6 -7
  12. data/app/presenters/hyrax/work_show_presenter.rb +4 -1
  13. data/app/services/hyrax/adapters/nesting_index_adapter.rb +1 -0
  14. data/app/services/hyrax/collection_types/create_service.rb +2 -2
  15. data/app/services/hyrax/file_set_fixity_check_service.rb +1 -1
  16. data/app/views/hyrax/dashboard/collections/_form.html.erb +1 -1
  17. data/app/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb +11 -6
  18. data/app/views/hyrax/dashboard/collections/_modal_parent_collection_remove_deny.html.erb +14 -0
  19. data/app/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb +1 -1
  20. data/app/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb +11 -1
  21. data/app/views/hyrax/dashboard/collections/show.html.erb +1 -0
  22. data/app/views/hyrax/my/collections/_modal_collection_types_to_create.html.erb +1 -1
  23. data/app/views/hyrax/my/collections/index.html.erb +8 -2
  24. data/app/views/hyrax/my/works/_tabs.html.erb +1 -2
  25. data/app/views/hyrax/my/works/index.html.erb +11 -0
  26. data/config/locales/hyrax.de.yml +19 -8
  27. data/config/locales/hyrax.en.yml +14 -3
  28. data/config/locales/hyrax.es.yml +13 -2
  29. data/config/locales/hyrax.fr.yml +13 -2
  30. data/config/locales/hyrax.it.yml +13 -2
  31. data/config/locales/hyrax.pt-BR.yml +13 -2
  32. data/config/locales/hyrax.zh.yml +13 -2
  33. data/hyrax.gemspec +1 -1
  34. data/lib/generators/hyrax/templates/db/migrate/20170810190549_update_collection_type_column_options.rb.erb +9 -1
  35. data/lib/hyrax/version.rb +1 -1
  36. data/spec/controllers/hyrax/dashboard/collections_controller_spec.rb +2 -3
  37. data/spec/features/collection_multi_membership_spec.rb +32 -33
  38. data/spec/features/dashboard/all_works.rb +2 -1
  39. data/spec/features/dashboard/collection_spec.rb +35 -13
  40. data/spec/features/work_show_spec.rb +6 -6
  41. data/spec/helpers/hyrax/collections_helper_spec.rb +16 -0
  42. data/spec/models/sipity/workflow_spec.rb +9 -0
  43. data/spec/presenters/hyrax/work_show_presenter_spec.rb +2 -2
  44. data/spec/services/hyrax/adapters/nesting_index_adapter_spec.rb +7 -3
  45. data/spec/services/hyrax/collection_types/create_service_spec.rb +2 -2
  46. data/spec/services/hyrax/collections_service_spec.rb +1 -1
  47. data/spec/services/hyrax/file_set_fixity_check_service_spec.rb +13 -0
  48. data/spec/spec_helper.rb +1 -0
  49. data/spec/support/optional_example.rb +16 -0
  50. data/spec/support/selectors.rb +15 -1
  51. data/spec/views/hyrax/dashboard/collections/_form_for_select_collection.html.erb_spec.rb +13 -21
  52. data/spec/views/hyrax/dashboard/collections/_show_add_items_actions.html.erb_spec.rb +5 -3
  53. data/spec/views/hyrax/dashboard/collections/_show_parent_collection_row.html.erb_spec.rb +35 -15
  54. data/spec/views/hyrax/my/collections/index.html.erb_spec.rb +34 -0
  55. data/spec/views/hyrax/my/works/index.html.erb_spec.rb +3 -0
  56. data/template.rb +1 -1
  57. metadata +15 -4
@@ -16,7 +16,7 @@
16
16
  <% if row_presenter.admin_set? %>
17
17
  data-path="<%= new_admin_admin_set_path %>"
18
18
  <% else %>
19
- data-path="<%= "#{new_dashboard_collection_path}&collection_type_id=#{row_presenter.id}" %>"
19
+ data-path="<%= append_collection_type_url(new_dashboard_collection_path, row_presenter.id) %>"
20
20
  <% end %> />
21
21
  <h4><%= row_presenter.title %></h4>
22
22
  <p><%= row_presenter.description %></p>
@@ -33,7 +33,7 @@
33
33
  </button>
34
34
  <% else @collection_type_list_presenter.any? %>
35
35
  <% # link directly to create collection form with type %>
36
- <%= link_to(t('helpers.action.collection.new'), "#{new_dashboard_collection_path}&collection_type_id=#{@collection_type_list_presenter.first_collection_type.id}", class: 'btn btn-primary') %>
36
+ <%= link_to(t('helpers.action.collection.new'), append_collection_type_url(new_dashboard_collection_path, @collection_type_list_presenter.first_collection_type.id), class: 'btn btn-primary') %>
37
37
  <% end %>
38
38
  <% end %>
39
39
  </section>
@@ -41,7 +41,13 @@
41
41
  <%# Collections list %>
42
42
  <div class="panel panel-default collections-panel-wrapper">
43
43
  <div class="panel-heading">
44
- <h3 class="panel-title"><strong><%= @response.docs.count %> collections</strong> in the repository</h3>
44
+ <% if current_page?(hyrax.my_collections_path(locale: nil)) %>
45
+ <span class="count-display"><%= I18n.t('hyrax.my.count.collections.you_own', total_count: @response.total_count).html_safe %></span>
46
+ <% elsif current_page?(hyrax.dashboard_collections_path(locale: nil)) && !current_ability.admin? %>
47
+ <span class="count-display"><%= I18n.t('hyrax.my.count.collections.you_manage', total_count: @response.total_count).html_safe %></span>
48
+ <% else %>
49
+ <span class="count-display"><%= I18n.t('hyrax.my.count.collections.in_repo', total_count: @response.total_count).html_safe %></span>
50
+ <% end %>
45
51
  </div>
46
52
  <div class="panel-body">
47
53
  <h2 class="sr-only">Collections listing</h2>
@@ -1,5 +1,4 @@
1
- <ul class="nav nav-tabs" id="my_nav" role="navigation">
2
- <span class="sr-only">You are currently listing your works. You have <%= @response.docs.count %> <%= 'work'.pluralize(@response.docs.count) %> </span>
1
+ <ul class="nav nav-tabs" id="my_nav" role="navigation">
3
2
  <li<%= ' class="active"'.html_safe if current_page?(hyrax.dashboard_works_path(locale: nil)) %>>
4
3
  <%= link_to t("hyrax.dashboard.#{current_ability.admin? ? 'all' : 'managed'}.works"), hyrax.dashboard_works_path, data: { turbolinks: false } %>
5
4
  </li>
@@ -54,6 +54,15 @@
54
54
  <div class="col-md-12">
55
55
  <div class="panel panel-default <%= 'tabs' if current_page?(hyrax.dashboard_works_path(locale: nil)) || @managed_works_count > 0 %>">
56
56
  <%= render 'tabs' if current_page?(hyrax.dashboard_works_path(locale: nil)) || @managed_works_count > 0 %>
57
+ <div class="panel-heading">
58
+ <% if current_page?(hyrax.my_works_path(locale: nil)) %>
59
+ <span class="count-display"><%= I18n.t('hyrax.my.count.works.you_own', total_count: @response.total_count).html_safe %></span>
60
+ <% elsif current_page?(hyrax.dashboard_works_path(locale: nil)) && !current_ability.admin? %>
61
+ <span class="count-display"><%= I18n.t('hyrax.my.count.works.you_manage', total_count: @response.total_count).html_safe %></span>
62
+ <% else %>
63
+ <span class="count-display"><%= I18n.t('hyrax.my.count.works.in_repo', total_count: @response.total_count).html_safe %></span>
64
+ <% end %>
65
+ </div>
57
66
  <div class="panel-body">
58
67
  <%= render 'search_header' %>
59
68
  <h2 class="sr-only">Works listing</h2>
@@ -65,4 +74,6 @@
65
74
  </div>
66
75
  </div>
67
76
 
77
+
78
+
68
79
  <%= render '/shared/select_work_type_modal', create_work_presenter: @create_work_presenter if @create_work_presenter.many? %>
@@ -174,7 +174,7 @@ de:
174
174
  header: Admin-Set
175
175
  item_list_header: Arbeiten in diesem Admin-Set
176
176
  show_actions:
177
- confirm_delete: Möchten Sie dieses Verwaltungsset wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.
177
+ confirm_delete: Möchten Sie dieses Admin-Set wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.
178
178
  appearances:
179
179
  show:
180
180
  header: Design
@@ -196,7 +196,7 @@ de:
196
196
  not_empty: Der Sammlungstyp kann nicht geändert werden, da er Sammlungen enthält
197
197
  form:
198
198
  tab:
199
- appearance: Abzeichen Farbe
199
+ appearance: Emblemfarbe
200
200
  metadata: Beschreibung
201
201
  participants: Teilnehmer
202
202
  settings: Einstellungen
@@ -602,6 +602,7 @@ de:
602
602
  this_collection_in_other_collections: Diese Sammlung in anderen Sammlungen
603
603
  modals:
604
604
  remove_from_collection_description: Durch das Entfernen dieser Sammlung wird sie nicht aus dem Repository entfernt, sondern nur als übergeordnetes Objekt dieser Sammlung. Möchten Sie diese Sammlung wirklich entfernen?
605
+ remove_parent_collection_deny: Sie verfügen nicht über ausreichende Berechtigungen, damit die übergeordnete Sammlung entfernt werden kann.
605
606
  remove_this_sub_collection_description: Durch das Entfernen dieser Untersammlung wird sie nicht aus dieser übergeordneten Sammlung aus dem Repository entfernt. Möchten Sie diese Untersammlung wirklich entfernen?
606
607
  sub_collections_of_collection_description: Diese Sammlungen sind derzeit Untersammlungen dieser Sammlung
607
608
  table:
@@ -670,8 +671,8 @@ de:
670
671
  add_to_collection_only: Erlaubte Aktionen sind auf das Hinzufügen von Mitgliedern beschränkt
671
672
  admin_set_confirmation: Löschen eines Admin-Set von %{application_name} ist dauerhaft. Klicken Sie auf OK, um dieses Admin-Set aus %{application_name} zu löschen, oder auf Abbrechen, um diesen Vorgang abzubrechen
672
673
  collection_create_success: Die Sammlung wurde erfolgreich erstellt.
673
- collection_delete_fail: Sammlung %{id} konnte nicht gelöscht werden
674
- collection_delete_success: Sammlung %{id} wurde erfolgreich gelöscht
674
+ collection_delete_fail: Sammlung konnte nicht gelöscht werden
675
+ collection_delete_success: Sammlung wurde erfolgreich gelöscht
675
676
  collection_deny_add_members: Sie verfügen nicht über ausreichende Berechtigungen zum Hinzufügen von Mitgliedern zur Sammlung
676
677
  collection_update_success: Die Sammlung wurde erfolgreich aktualisiert.
677
678
  collections_confirmation_html: "<span class='pluralized'>Diese Sammlung</span> löschen , wird permanent <span class='pluralized'>diese Sammlung</span> aus dem Repository entfernen. Elemente in <span class='pluralized'>dieser Sammlung</span> verbleiben im Repository. Möchten Sie <span class='pluralized'>diese Sammlung</span> wirklich löschen?"
@@ -705,9 +706,9 @@ de:
705
706
  edit_access: 'Bearbeiten der Zugriffsrechte:'
706
707
  groups: 'Gruppen:'
707
708
  managed_access:
708
- deposit: Anzahlung
709
+ deposit: Deponieren
709
710
  manage: Verwalten
710
- view: Aussicht
711
+ view: Ansicht
711
712
  users: 'Benutzer:'
712
713
  collections: Ihre Sammlungen
713
714
  facet_label:
@@ -746,7 +747,7 @@ de:
746
747
  removed_relationship: "'%{child_title}' wurde aus '%{parent_title}' entfernt"
747
748
  no_activity: Benutzer hat keine aktuellen Aufgaben
748
749
  no_notifications: Benutzer hat keine Benachrichtigungen
749
- no_proxies: Es sind keine Proxys zugewiesen
750
+ no_proxies: Es sind keine Vertreter zugewiesen
750
751
  no_transfer_requests: Sie haben keine Übertragungsanfragen für Arbeiten erhalten
751
752
  no_transfers: Sie haben keine Arbeit übertragen
752
753
  proxy_activity: Vertreter-Aktivität
@@ -925,6 +926,16 @@ de:
925
926
  single: wurde gespeichert.
926
927
  subject: Stapelweises Hochladen abgeschlossen
927
928
  title: Dateien erfolgreich hochgeladen
929
+ my:
930
+ count:
931
+ collections:
932
+ in_repo: "<strong> %{total_count} Sammlungen </ strong> im Repository"
933
+ you_manage: "<strong> %{total_count} Sammlungen </ strong>, die Sie im Repository verwalten können"
934
+ you_own: "<strong> %{total_count} Sammlungen </ strong>, die Sie im Repository besitzen"
935
+ works:
936
+ in_repo: "<strong> %{total_count} funktioniert </ strong> im Repository"
937
+ you_manage: "<strong> %{total_count} funktioniert </ strong>, das Sie im Repository verwalten können"
938
+ you_own: "<strong> %{total_count} funktioniert </ strong>, das Sie im Repository besitzen"
928
939
  nav_safety:
929
940
  change_tab_message: Möchten Sie diesen Tab wirklich verlassen? Nicht gespeicherte Daten gehen verloren.
930
941
  pages:
@@ -1144,7 +1155,7 @@ de:
1144
1155
  allow_multiple_membership: MEHRFACHE MITGLIEDSCHAFT
1145
1156
  assigns_visibility: SICHTBARKEIT
1146
1157
  assigns_workflow: WORKFLOW
1147
- badge_color: Abzeichen Farbe
1158
+ badge_color: Emblemfarbe
1148
1159
  brandable: HERVORHEBBAR (MARKE)
1149
1160
  description: Typbeschreibung
1150
1161
  discoverable: EINSEHBAR
@@ -601,6 +601,7 @@ en:
601
601
  this_collection_in_other_collections: This Collection in Other Collections
602
602
  modals:
603
603
  remove_from_collection_description: Removing this collection will not remove it from the repository, only as a parent of this collection. Are you sure you want to remove this collection?
604
+ remove_parent_collection_deny: You do not have sufficient privileges for the parent collection to be able to remove it.
604
605
  remove_this_sub_collection_description: Removing this sub-collection will not remove it from the repository, only from this parent collection. Are you sure you want to remove this sub-collection?
605
606
  sub_collections_of_collection_description: These collections are currently sub-collections of this collection
606
607
  table:
@@ -669,8 +670,8 @@ en:
669
670
  add_to_collection_only: Allowed actions are limited to adding members
670
671
  admin_set_confirmation: Deleting an admin set from %{application_name} is permanent. Click OK to delete this admin set from %{application_name}, or Cancel to cancel this operation
671
672
  collection_create_success: Collection was successfully created.
672
- collection_delete_fail: Collection %{id} could not be deleted
673
- collection_delete_success: Collection %{id} was successfully deleted
673
+ collection_delete_fail: Collection could not be deleted
674
+ collection_delete_success: Collection was successfully deleted
674
675
  collection_deny_add_members: You do not have sufficient privileges to add members to the collection
675
676
  collection_update_success: Collection was successfully updated.
676
677
  collections_confirmation_html: Deleting <span class='pluralized'>this collection</span> will permanently remove <span class='pluralized'>this collection</span> from the repository. Items in <span class='pluralized'>this collection</span> will remain in the repository. Are you sure you want to delete <span class='pluralized'>this collection</span>?
@@ -750,7 +751,7 @@ en:
750
751
  no_transfers: You haven't transferred any work
751
752
  proxy_activity: Proxy Activity
752
753
  proxy_delete: Delete Proxy
753
- proxy_help: Select a user who can deposit works on your behalf. You will be the owner of works that this user deposits for you. You can revoke a proxy by clicking the Delete Proxy button.
754
+ proxy_help: Select a user who can deposit works on your behalf. Both you and your proxy will be able to make changes to these works. You can revoke a proxy by clicking the Delete Proxy button. To revoke their ability to edit a work they previously submitted, remove them from the Sharing tab on each work.
754
755
  proxy_user: Proxy User
755
756
  show_admin:
756
757
  new_visitors: New Visitors
@@ -924,6 +925,16 @@ en:
924
925
  single: has been saved.
925
926
  subject: Batch upload complete
926
927
  title: Files uploaded successfully
928
+ my:
929
+ count:
930
+ collections:
931
+ in_repo: "<strong>%{total_count} collections</strong> in the repository"
932
+ you_manage: "<strong>%{total_count} collections</strong> you can manage in the repository"
933
+ you_own: "<strong>%{total_count} collections</strong> you own in the repository"
934
+ works:
935
+ in_repo: "<strong>%{total_count} works</strong> in the repository"
936
+ you_manage: "<strong>%{total_count} works</strong> you can manage in the repository"
937
+ you_own: "<strong>%{total_count} works</strong> you own in the repository"
927
938
  nav_safety:
928
939
  change_tab_message: Are you sure you want to leave this tab? Any unsaved data will be lost.
929
940
  pages:
@@ -600,6 +600,7 @@ es:
600
600
  this_collection_in_other_collections: Esta colección en otras colecciones
601
601
  modals:
602
602
  remove_from_collection_description: La eliminación de esta colección no la eliminará del repositorio, solo como padre de esta colección. ¿Seguro que quieres eliminar esta colección?
603
+ remove_parent_collection_deny: No tiene suficientes privilegios para que la colección principal pueda eliminarla.
603
604
  remove_this_sub_collection_description: La eliminación de esta subcolección no la eliminará del repositorio, solo de esta colección principal. ¿Seguro que quieres eliminar esta subcolección?
604
605
  sub_collections_of_collection_description: Estas colecciones son actualmente subcolecciones de esta colección
605
606
  table:
@@ -668,8 +669,8 @@ es:
668
669
  add_to_collection_only: Las acciones permitidas están limitadas a agregar miembros
669
670
  admin_set_confirmation: La eliminación de un conjunto de administración de %{application_name} es permanente. Haga clic en Aceptar para eliminar este conjunto de administrador de %{application_name}, o en Cancelar para cancelar esta operación
670
671
  collection_create_success: La colección fue creada con éxito.
671
- collection_delete_fail: Colección %{id} no se pudo eliminar
672
- collection_delete_success: Colección %{id} fue eliminada exitosamente
672
+ collection_delete_fail: Colección no se pudo eliminar
673
+ collection_delete_success: Colección fue eliminada exitosamente
673
674
  collection_deny_add_members: No tiene suficientes privilegios para agregar miembros a la colección
674
675
  collection_update_success: La colección fue actualizada con éxito.
675
676
  collections_confirmation_html: Eliminar <span class='pluralized'>esta colección</span> eliminará permanentemente <span class='pluralized'>esta colección</span> del repositorio. Los elementos de <span class='pluralized'>esta colección</span> permanecerán en el repositorio. ¿Seguro que quieres eliminar <span class='pluralized'>esta colección</span> ?
@@ -925,6 +926,16 @@ es:
925
926
  single: ha sido guardado.
926
927
  subject: Subida en lote completa
927
928
  title: Archivos cargados satisfactoriamente
929
+ my:
930
+ count:
931
+ collections:
932
+ in_repo: "<strong> colecciones %{total_count} </ strong> en el repositorio"
933
+ you_manage: "<strong> colecciones %{total_count} </ strong> puede administrar en el repositorio"
934
+ you_own: "<strong> colecciones %{total_count} </ strong> que posee en el repositorio"
935
+ works:
936
+ in_repo: "<strong> %{total_count} funciona </ strong> en el repositorio"
937
+ you_manage: "<strong> %{total_count} funciona </ strong> puedes administrar en el repositorio"
938
+ you_own: "<strong> %{total_count} funciona </ strong> en el repositorio"
928
939
  nav_safety:
929
940
  change_tab_message: "¿Seguro que quieres salir de esta pestaña? Cualquier información no guardada se perderá."
930
941
  pages:
@@ -601,6 +601,7 @@ fr:
601
601
  this_collection_in_other_collections: Cette collection dans d'autres collections
602
602
  modals:
603
603
  remove_from_collection_description: La suppression de cette collection ne la supprimera pas du référentiel, uniquement en tant que parent de cette collection. Êtes-vous sûr de vouloir supprimer cette collection?
604
+ remove_parent_collection_deny: Vous n'avez pas les privilèges suffisants pour la collection parent pour pouvoir le supprimer.
604
605
  remove_this_sub_collection_description: La suppression de cette sous-collection ne la supprimera pas du référentiel, uniquement à partir de cette collection parent. Êtes-vous sûr de vouloir supprimer cette sous-collection?
605
606
  sub_collections_of_collection_description: Ces collections sont actuellement des sous-collections de cette collection
606
607
  table:
@@ -669,8 +670,8 @@ fr:
669
670
  add_to_collection_only: Les actions autorisées sont limitées à l'ajout de membres
670
671
  admin_set_confirmation: La suppression d'un ensemble d'administrateurs à partir de %{application_name} est permanente. Cliquez sur OK pour supprimer cet ensemble d'administrateurs de %{application_name}, ou sur Annuler pour annuler cette opération
671
672
  collection_create_success: La collection a été créée avec succès.
672
- collection_delete_fail: La collection %{id} n'a pas pu être supprimée
673
- collection_delete_success: La collection %{id} a été supprimée avec succès
673
+ collection_delete_fail: La collection n'a pas pu être supprimée
674
+ collection_delete_success: La collection a été supprimée avec succès
674
675
  collection_deny_add_members: Vous n'avez pas les privilèges suffisants pour ajouter des membres à la collection
675
676
  collection_update_success: La collection a été mise à jour avec succès.
676
677
  collections_confirmation_html: La suppression de <span class='pluralized'>cette collection</span> supprimera définitivement <span class='pluralized'>cette collection</span> du référentiel. Les éléments de <span class='pluralized'>cette collection</span> resteront dans le référentiel. Êtes-vous sûr de vouloir supprimer <span class='pluralized'>cette collection</span> ?
@@ -924,6 +925,16 @@ fr:
924
925
  single: a été enregistré.
925
926
  subject: Téléchargement par lots complet
926
927
  title: Fichiers téléchargés avec succès
928
+ my:
929
+ count:
930
+ collections:
931
+ in_repo: "<strong> Collections %{total_count} </ strong> dans le référentiel"
932
+ you_manage: "<strong> collections %{total_count} </ strong> que vous pouvez gérer dans le référentiel"
933
+ you_own: "<strong> collections %{total_count} </ strong> que vous possédez dans le référentiel"
934
+ works:
935
+ in_repo: "<strong> %{total_count} fonctionne </ strong> dans le référentiel"
936
+ you_manage: "<strong> %{total_count} fonctionne </ strong> vous pouvez gérer dans le référentiel"
937
+ you_own: "<strong> %{total_count} fonctionne </ strong> que vous possédez dans le référentiel"
927
938
  nav_safety:
928
939
  change_tab_message: Êtes-vous sûr de vouloir quitter cet onglet? Toutes les données non enregistrées seront perdues.
929
940
  pages:
@@ -600,6 +600,7 @@ it:
600
600
  this_collection_in_other_collections: Questa collezione in altre collezioni
601
601
  modals:
602
602
  remove_from_collection_description: La rimozione di questa raccolta non la rimuoverà dal repository, ma solo come genitore di questa raccolta. Sei sicuro di voler rimuovere questa raccolta?
603
+ remove_parent_collection_deny: Non disponi di privilegi sufficienti per la raccolta principale per poterlo rimuovere.
603
604
  remove_this_sub_collection_description: La rimozione di questa sotto-raccolta non la rimuoverà dal repository, solo da questa raccolta genitore. Sei sicuro di voler rimuovere questa sottoraccolta?
604
605
  sub_collections_of_collection_description: Queste raccolte sono attualmente sotto-raccolte di questa collezione
605
606
  table:
@@ -668,8 +669,8 @@ it:
668
669
  add_to_collection_only: Le azioni consentite sono limitate all'aggiunta di membri
669
670
  admin_set_confirmation: L'eliminazione di un set di amministratori da %{application_name} è permanente. Fare clic su OK per eliminare questo set di amministratori da %{application_name}, o Annulla per annullare questa operazione
670
671
  collection_create_success: La raccolta è stata creata con successo.
671
- collection_delete_fail: Collezione %{id} non può essere cancellata
672
- collection_delete_success: La raccolta %{id} è stata cancellata con successo
672
+ collection_delete_fail: Collezione non può essere cancellata
673
+ collection_delete_success: La raccolta è stata cancellata con successo
673
674
  collection_deny_add_members: Non disponi di privilegi sufficienti per aggiungere membri alla raccolta
674
675
  collection_update_success: La raccolta è stata aggiornata con successo.
675
676
  collections_confirmation_html: L'eliminazione di <span class='pluralized'>questa raccolta</span> rimuove definitivamente <span class='pluralized'>questa raccolta</span> dal repository. Gli articoli di <span class='pluralized'>questa raccolta</span> rimarranno nel repository. Sei sicuro di voler eliminare <span class='pluralized'>questa raccolta</span> ?
@@ -923,6 +924,16 @@ it:
923
924
  single: È stato salvato.
924
925
  subject: Caricamento batch completato
925
926
  title: I file sono stati caricati correttamente
927
+ my:
928
+ count:
929
+ collections:
930
+ in_repo: "<strong> collezioni %{total_count} </ strong> nel repository"
931
+ you_manage: "<strong> collezioni %{total_count} </ strong> che puoi gestire nel repository"
932
+ you_own: "<strong> collezioni %{total_count} </ strong> che possiedi nel repository"
933
+ works:
934
+ in_repo: "<strong> %{total_count} funziona </ strong> nel repository"
935
+ you_manage: "<strong> %{total_count} funziona </ strong> che puoi gestire nel repository"
936
+ you_own: "<strong> %{total_count} funziona </ strong> nel repository"
926
937
  nav_safety:
927
938
  change_tab_message: Sei sicuro di voler lasciare questa scheda? Tutti i dati non salvati andranno persi.
928
939
  pages:
@@ -595,6 +595,7 @@ pt-BR:
595
595
  this_collection_in_other_collections: Esta coleção em outras coleções
596
596
  modals:
597
597
  remove_from_collection_description: A remoção desta coleção não o removerá do repositório, apenas como pai dessa coleção. Tem certeza de que deseja remover essa coleção?
598
+ remove_parent_collection_deny: Você não tem privilégios suficientes para que a coleção pai possa removê-la.
598
599
  remove_this_sub_collection_description: A remoção desta subculpa não a removerá do repositório, apenas a partir dessa coleção original. Tem certeza de que deseja remover essa subculpa?
599
600
  sub_collections_of_collection_description: Essas coleções são atualmente sub-coleções desta coleção
600
601
  table:
@@ -663,8 +664,8 @@ pt-BR:
663
664
  add_to_collection_only: As ações permitidas estão limitadas à adição de membros
664
665
  admin_set_confirmation: Excluir um conjunto de administradores de %{application_name} é permanente. Clique em OK para excluir este conjunto de administrador de %{application_name} ou Cancelar para cancelar esta operação
665
666
  collection_create_success: A coleção foi criada com sucesso.
666
- collection_delete_fail: Coleção %{id} não pôde ser excluída
667
- collection_delete_success: Coleção %{id} foi excluída com sucesso
667
+ collection_delete_fail: Coleção não pôde ser excluída
668
+ collection_delete_success: Coleção foi excluída com sucesso
668
669
  collection_deny_add_members: Você não tem privilégios suficientes para adicionar membros à coleção
669
670
  collection_update_success: A coleção foi atualizada com sucesso.
670
671
  collections_confirmation_html: A exclusão <span class='pluralized'>dessa coleção</span> removerá permanentemente <span class='pluralized'>essa coleção</span> do repositório. Os itens <span class='pluralized'>desta coleção</span> permanecerão no repositório. Tem certeza de que deseja excluir <span class='pluralized'>esta coleção</span> ?
@@ -918,6 +919,16 @@ pt-BR:
918
919
  single: Foi salvo.
919
920
  subject: Carregamento em lote completo
920
921
  title: Arquivos carregados com sucesso
922
+ my:
923
+ count:
924
+ collections:
925
+ in_repo: "<strong> coleções %{total_count} </ strong> no repositório"
926
+ you_manage: "<strong> coleções %{total_count} </ strong> você pode gerenciar no repositório"
927
+ you_own: "<strong> coleções %{total_count} </ strong> você possui no repositório"
928
+ works:
929
+ in_repo: "<strong> %{total_count} funciona </ strong> no repositório"
930
+ you_manage: "<strong> %{total_count} funciona </ strong> você pode gerenciar no repositório"
931
+ you_own: "<strong> %{total_count} funciona </ strong> você possui no repositório"
921
932
  nav_safety:
922
933
  change_tab_message: Sei sicuro di voler lasciare questa scheda? Tutti i dati non salvati andranno persi.
923
934
  pages:
@@ -598,6 +598,7 @@ zh:
598
598
  this_collection_in_other_collections: 此集合在其他集合中
599
599
  modals:
600
600
  remove_from_collection_description: 删除此集合不会将其从存储库中删除,只能作为此集合的父项。你确定要删除这个集合吗?
601
+ remove_parent_collection_deny: 您没有足够的权限让父级集合能够将其删除。
601
602
  remove_this_sub_collection_description: 删除此子集合不会将其从存储库中删除,只能从此父集合中删除。你确定要删除这个子集合吗?
602
603
  sub_collections_of_collection_description: 这些集合目前是该集合的子集合
603
604
  table:
@@ -666,8 +667,8 @@ zh:
666
667
  add_to_collection_only: 允许的操作仅限于添加成员
667
668
  admin_set_confirmation: 从%{application_name}删除管理员集合是永久性的。单击确定从%{application_name}删除此管理集,或单击取消取消此操作
668
669
  collection_create_success: 收集已成功创建。
669
- collection_delete_fail: 收藏%{id}无法删除
670
- collection_delete_success: 收藏夹%{id}已成功删除
670
+ collection_delete_fail: 收藏无法删除
671
+ collection_delete_success: 收藏夹已成功删除
671
672
  collection_deny_add_members: 您没有足够的权限将成员添加到集合中
672
673
  collection_update_success: 收集已成功更新。
673
674
  collections_confirmation_html: 删除<span class='pluralized'>这个集合</span>将永久地从存储库中删除<span class='pluralized'>这个集合</span> 。 <span class='pluralized'>此集合中的</span>项目将保留在存储库中。你确定要删除<span class='pluralized'>这个集合</span>吗?
@@ -921,6 +922,16 @@ zh:
921
922
  single: 已保存。
922
923
  subject: 批量上传完成
923
924
  title: 文件上传成功
925
+ my:
926
+ count:
927
+ collections:
928
+ in_repo: 存储库中的<strong> %{total_count}集合</ strong>
929
+ you_manage: 您可以在存储库中管理<strong> %{total_count}集合</ strong>
930
+ you_own: 您在存储库中拥有<strong> %{total_count}集合</ strong>
931
+ works:
932
+ in_repo: 存储库中的<strong> %{total_count}有效</ strong>
933
+ you_manage: 您可以在存储库中管理<strong> %{total_count}作品</ strong>
934
+ you_own: 您在存储库中拥有<strong> %{total_count}作品</ strong>
924
935
  nav_safety:
925
936
  change_tab_message: 你确定要离开这个标签吗?任何未保存的数据都将丢失。
926
937
  pages:
data/hyrax.gemspec CHANGED
@@ -46,7 +46,7 @@ SUMMARY
46
46
  spec.add_dependency 'flot-rails', '~> 0.0.6'
47
47
  spec.add_dependency 'font-awesome-rails', '~> 4.2'
48
48
  spec.add_dependency 'hydra-derivatives', '~> 3.3'
49
- spec.add_dependency 'hydra-editor', '~> 3.3'
49
+ spec.add_dependency 'hydra-editor', '>= 3.3', '< 5.0'
50
50
  spec.add_dependency 'hydra-head', '>= 10.5.0'
51
51
  spec.add_dependency 'hydra-works', '~> 0.16'
52
52
  spec.add_dependency 'iiif_manifest', '>= 0.3', '< 0.5'
@@ -1,9 +1,17 @@
1
1
  class UpdateCollectionTypeColumnOptions < ActiveRecord::Migration<%= migration_version %>
2
- def change
2
+ def up
3
3
  change_column :hyrax_collection_types, :title, :string, unique: true
4
4
  change_column :hyrax_collection_types, :machine_id, :string, unique: true
5
5
 
6
6
  remove_index :hyrax_collection_types, :machine_id
7
7
  add_index :hyrax_collection_types, :machine_id, unique: true
8
8
  end
9
+
10
+ def down
11
+ change_column :hyrax_collection_types, :title, :string
12
+ change_column :hyrax_collection_types, :machine_id, :string
13
+
14
+ remove_index :hyrax_collection_types, :machine_id
15
+ add_index :hyrax_collection_types, :machine_id
16
+ end
9
17
  end
data/lib/hyrax/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Hyrax
2
- VERSION = '2.1.0.rc1'.freeze
2
+ VERSION = '2.1.0.rc2'.freeze
3
3
  end
@@ -251,7 +251,6 @@ RSpec.describe Hyrax::Dashboard::CollectionsController, :clean_repo do
251
251
  }
252
252
  expect(response).to be_successful
253
253
  expect(response).to render_template(:edit)
254
- expect(assigns[:member_docs]).to be_kind_of Array
255
254
  end
256
255
  end
257
256
 
@@ -402,7 +401,7 @@ RSpec.describe Hyrax::Dashboard::CollectionsController, :clean_repo do
402
401
  delete :destroy, params: { id: collection }
403
402
  expect(response).to have_http_status(:found)
404
403
  expect(response).to redirect_to(Hyrax::Engine.routes.url_helpers.my_collections_path(locale: 'en'))
405
- expect(flash[:notice]).to eq "Collection #{collection.id} was successfully deleted"
404
+ expect(flash[:notice]).to eq "Collection was successfully deleted"
406
405
  end
407
406
 
408
407
  it "returns json" do
@@ -420,7 +419,7 @@ RSpec.describe Hyrax::Dashboard::CollectionsController, :clean_repo do
420
419
  delete :destroy, params: { id: collection }
421
420
  expect(response).to have_http_status(:unprocessable_entity)
422
421
  expect(response).to render_template(:edit)
423
- expect(flash[:notice]).to eq "Collection #{collection.id} could not be deleted"
422
+ expect(flash[:notice]).to eq "Collection could not be deleted"
424
423
  end
425
424
 
426
425
  it "returns json" do
@@ -11,21 +11,20 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
11
11
  end
12
12
 
13
13
  describe 'when both collections support multiple membership' do
14
- let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_1.gid) }
14
+ let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_1.gid, title: ['OldCollectionTitle']) }
15
15
  let!(:work) { create(:generic_work, user: admin_user, member_of_collections: [old_collection], title: ['The highly valued work that everyone wants in their collection']) }
16
16
 
17
17
  context 'and are of different types' do
18
- let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_2.gid) }
18
+ let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_2.gid, title: ['NewCollectionTitle']) }
19
19
 
20
20
  it 'then the work is added to both collections' do
21
+ optional 'ability to get capybara to find css select2-result (see Issue #3038)' if ENV['TRAVIS']
21
22
  # Add to second multi-membership collection of a different type
22
23
  visit '/dashboard/my/works'
23
24
  check 'check_all'
24
25
  click_button 'Add to collection' # opens the modal
25
- within('div#collection-list-container') do
26
- choose new_collection.title.first # selects the collection
27
- click_button 'Save changes'
28
- end
26
+ select_member_of_collection(new_collection)
27
+ click_button 'Save changes'
29
28
 
30
29
  # forwards to collection show page
31
30
  expect(page).to have_content new_collection.title.first
@@ -36,17 +35,16 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
36
35
  end
37
36
 
38
37
  context 'and are of the same type' do
39
- let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_1.gid) }
38
+ let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_1.gid, title: ['NewCollectionTitle']) }
40
39
 
41
40
  it 'then the work is added to both collections' do
41
+ optional 'ability to get capybara to find css select2-result (see Issue #3038)' if ENV['TRAVIS']
42
42
  # Add to second multi-membership collection of a different type
43
43
  visit '/dashboard/my/works'
44
44
  check 'check_all'
45
45
  click_button 'Add to collection' # opens the modal
46
- within('div#collection-list-container') do
47
- choose new_collection.title.first # selects the collection
48
- click_button 'Save changes'
49
- end
46
+ select_member_of_collection(new_collection)
47
+ click_button 'Save changes'
50
48
 
51
49
  # forwards to collection show page
52
50
  expect(page).to have_content new_collection.title.first
@@ -58,7 +56,7 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
58
56
  end
59
57
 
60
58
  describe 'when both collections require single membership' do
61
- let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_1.gid) }
59
+ let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_1.gid, title: ['OldCollectionTitle']) }
62
60
  let!(:work) do
63
61
  create(:generic_work,
64
62
  user: admin_user,
@@ -69,17 +67,17 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
69
67
  end
70
68
 
71
69
  context 'and are of different types' do
72
- let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_2.gid) }
70
+ let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_2.gid, title: ['NewCollectionTitle']) }
73
71
 
74
72
  it 'then the work is added to both collections' do
73
+ optional 'ability to get capybara to find css select2-result (see Issue #3038)' if ENV['TRAVIS']
75
74
  # Add to second single-membership collection of a different type
76
75
  visit '/dashboard/my/works'
77
76
  check 'check_all'
78
77
  click_button 'Add to collection' # opens the modal
79
- within('div#collection-list-container') do
80
- choose new_collection.title.first # selects the collection
81
- click_button 'Save changes'
82
- end
78
+ select_member_of_collection(new_collection)
79
+ click_button 'Save changes'
80
+
83
81
  # forwards to collection show page
84
82
  expect(page).to have_content new_collection.title.first
85
83
  expect(page).to have_content 'Works (1)'
@@ -89,18 +87,18 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
89
87
  end
90
88
 
91
89
  context 'and are of the same type' do
92
- let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_1.gid) }
90
+ let!(:new_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_1.gid, title: ['NewCollectionTitle']) }
93
91
 
94
92
  context 'then the work fails to add to the second collection' do
95
93
  it 'from the dashboard->works batch add to collection' do
94
+ optional 'ability to get capybara to find css select2-result (see Issue #3038)' if ENV['TRAVIS']
96
95
  # Attempt to add to second single-membership collection of the same type
97
96
  visit '/dashboard/my/works'
98
97
  check 'check_all'
99
98
  click_button 'Add to collection' # opens the modal
100
- within('div#collection-list-container') do
101
- choose new_collection.title.first # selects the collection
102
- click_button 'Save changes'
103
- end
99
+ select_member_of_collection(new_collection)
100
+ click_button 'Save changes'
101
+
104
102
  # forwards to collections index page and shows flash message
105
103
  within('section.tabs-row') do
106
104
  expect(page).to have_link 'All Collections'
@@ -141,7 +139,8 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
141
139
  check 'check_all'
142
140
  click_button 'Add to collection' # opens the modal
143
141
  within('div#collection-list-container') do
144
- choose new_collection.title.first # selects the collection
142
+ expect(page).to have_selector "#member_of_collection_ids[value=\"#{new_collection.id}\"]", visible: false
143
+ expect(page).to have_selector "#member_of_collection_label[value=\"#{new_collection.title.first}\"]"
145
144
  click_button 'Save changes'
146
145
  end
147
146
  # forwards to collections index page and shows flash message
@@ -162,18 +161,18 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
162
161
  let!(:work) { create(:generic_work, user: admin_user, member_of_collections: [old_collection], title: ['The highly valued work that everyone wants in their collection']) }
163
162
 
164
163
  context 'allowing multi-membership' do
165
- let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_1.gid) }
164
+ let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: multi_membership_type_1.gid, title: ['CollectionTitle']) }
166
165
  let!(:new_collection) { old_collection }
167
166
 
168
167
  it 'then the add is treated as a success' do
168
+ optional 'ability to get capybara to find css select2-result (see Issue #3038)' if ENV['TRAVIS']
169
169
  # Re-add to same multi-membership collection
170
170
  visit '/dashboard/my/works'
171
171
  check 'check_all'
172
172
  click_button 'Add to collection' # opens the modal
173
- within('div#collection-list-container') do
174
- choose new_collection.title.first # selects the collection
175
- click_button 'Save changes'
176
- end
173
+ select_member_of_collection(new_collection)
174
+ click_button 'Save changes'
175
+
177
176
  # forwards to collection show page
178
177
  expect(page).to have_content new_collection.title.first
179
178
  expect(page).to have_content 'Works (1)'
@@ -183,18 +182,18 @@ RSpec.describe 'Adding a work to multiple collections', type: :feature, clean_re
183
182
  end
184
183
 
185
184
  context 'requiring single-membership' do
186
- let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_1.gid) }
185
+ let(:old_collection) { create(:collection_lw, user: admin_user, collection_type_gid: single_membership_type_1.gid, title: ['CollectionTitle']) }
187
186
  let!(:new_collection) { old_collection }
188
187
 
189
188
  it 'then the add is treated as a success' do
189
+ optional 'ability to get capybara to find css select2-result (see Issue #3038)' if ENV['TRAVIS']
190
190
  # Re-add to same single-membership collection
191
191
  visit '/dashboard/my/works'
192
192
  check 'check_all'
193
193
  click_button 'Add to collection' # opens the modal
194
- within('div#collection-list-container') do
195
- choose new_collection.title.first # selects the collection
196
- click_button 'Save changes'
197
- end
194
+ select_member_of_collection(new_collection)
195
+ click_button 'Save changes'
196
+
198
197
  # forwards to collection show page
199
198
  expect(page).to have_content new_collection.title.first
200
199
  expect(page).to have_content 'Works (1)'