diff --git a/.dassie/app/controllers/catalog_controller.rb b/.dassie/app/controllers/catalog_controller.rb
index 79cd7e79b5..07529c4694 100644
--- a/.dassie/app/controllers/catalog_controller.rb
+++ b/.dassie/app/controllers/catalog_controller.rb
@@ -292,10 +292,10 @@ def self.modified_field
# except in the relevancy case).
# label is key, solr field is value
config.add_sort_field "score desc, #{uploaded_field} desc", label: "relevance"
- config.add_sort_field "#{uploaded_field} desc", label: "date uploaded \u25BC"
- config.add_sort_field "#{uploaded_field} asc", label: "date uploaded \u25B2"
- config.add_sort_field "#{modified_field} desc", label: "date modified \u25BC"
- config.add_sort_field "#{modified_field} asc", label: "date modified \u25B2"
+ config.add_sort_field "#{uploaded_field} desc", label: I18n.t('hyrax.sort.uploaded.desc')
+ config.add_sort_field "#{uploaded_field} asc", label: I18n.t('hyrax.sort.uploaded.asc')
+ config.add_sort_field "#{modified_field} desc", label: I18n.t('hyrax.sort.modified.desc')
+ config.add_sort_field "#{modified_field} asc", label: I18n.t('hyrax.sort.modified.asc')
# If there are more than this many search results, no spelling ("did you
# mean") suggestion is offered.
diff --git a/.koppie/app/controllers/catalog_controller.rb b/.koppie/app/controllers/catalog_controller.rb
index 6b192772ae..39d23b0e7a 100644
--- a/.koppie/app/controllers/catalog_controller.rb
+++ b/.koppie/app/controllers/catalog_controller.rb
@@ -295,10 +295,10 @@ def self.modified_field
# except in the relevancy case).
# label is key, solr field is value
config.add_sort_field "score desc, #{uploaded_field} desc", label: "relevance"
- config.add_sort_field "#{uploaded_field} desc", label: "date uploaded \u25BC"
- config.add_sort_field "#{uploaded_field} asc", label: "date uploaded \u25B2"
- config.add_sort_field "#{modified_field} desc", label: "date modified \u25BC"
- config.add_sort_field "#{modified_field} asc", label: "date modified \u25B2"
+ config.add_sort_field "#{uploaded_field} desc", label: I18n.t('hyrax.sort.uploaded.desc')
+ config.add_sort_field "#{uploaded_field} asc", label: I18n.t('hyrax.sort.uploaded.asc')
+ config.add_sort_field "#{modified_field} desc", label: I18n.t('hyrax.sort.modified.desc')
+ config.add_sort_field "#{modified_field} asc", label: I18n.t('hyrax.sort.modified.asc')
# If there are more than this many search results, no spelling ("did you
# mean") suggestion is offered.
diff --git a/app/views/hyrax/collections/_default_group.html.erb b/app/views/hyrax/collections/_default_group.html.erb
index 0512cc0094..d6cfb0ef12 100644
--- a/app/views/hyrax/collections/_default_group.html.erb
+++ b/app/views/hyrax/collections/_default_group.html.erb
@@ -8,7 +8,10 @@
<% if Hyrax.config.collection_flexible? %>
<%= t("hyrax.dashboard.my.heading.profile_version") %> |
<% end %>
- "><%= t("hyrax.dashboard.my.heading.date_uploaded") %> |
+
+ <%= t("hyrax.dashboard.my.heading.date_uploaded") %>
+ <%= params[:sort] == "#{CatalogController.uploaded_field} desc" ? '(newest first)' : params[:sort] == "#{CatalogController.uploaded_field} asc" ? '(oldest first)' : '' %>
+ |
<%= t("hyrax.dashboard.my.heading.visibility") %> |
<%= t("hyrax.dashboard.my.heading.action") %> |
diff --git a/app/views/hyrax/users/index.html.erb b/app/views/hyrax/users/index.html.erb
index 8b61828fa7..30f28a6140 100644
--- a/app/views/hyrax/users/index.html.erb
+++ b/app/views/hyrax/users/index.html.erb
@@ -6,9 +6,18 @@
| <%= t('.avatar') %> |
- "> <%= t('.user_name') %> |
- "> <%= t('.user_id') %> |
- "> <%= t('.department') %> |
+
+ <%= t('.user_name') %>
+ <%= params[:sort] == "name desc" ? '(Z-A)' : '(A-Z)' %>
+ |
+
+ <%= t('.user_id') %>
+ <%= params[:sort] == "login desc" ? '(Z-A)' : params[:sort] == "login" ? '(A-Z)' : '' %>
+ |
+
+ <%= t('.department') %>
+ <%= params[:sort] == "department desc" ? '(Z-A)' : params[:sort] == "department" ? '(A-Z)' : '' %>
+ |
<%= t('.works_created') %> |
diff --git a/config/locales/hyrax.de.yml b/config/locales/hyrax.de.yml
index a7f21286ac..a7e6a2c7c0 100644
--- a/config/locales/hyrax.de.yml
+++ b/config/locales/hyrax.de.yml
@@ -1624,6 +1624,13 @@ de:
link_expired_not_found: Single Use Link abgelaufen oder nicht gefunden
link_not_found: Single Use Link nicht gefunden
sort_label: Sortieren Sie die Auflistung der Artikel
+ sort:
+ uploaded:
+ desc: "Datum hochgeladen (neueste zuerst)"
+ asc: "Datum hochgeladen (älteste zuerst)"
+ modified:
+ desc: "Datum geändert (neueste zuerst)"
+ asc: "Datum geändert (älteste zuerst)"
sr:
thumbnail: Standardrepräsentationsbild
static:
diff --git a/config/locales/hyrax.en.yml b/config/locales/hyrax.en.yml
index 08b1597934..a5f74e42d9 100644
--- a/config/locales/hyrax.en.yml
+++ b/config/locales/hyrax.en.yml
@@ -1625,6 +1625,13 @@ en:
link_expired_not_found: Single Use Link Expired or Not Found
link_not_found: Single use link Not Found
sort_label: Sort the listing of items
+ sort:
+ uploaded:
+ desc: "date uploaded (newest first)"
+ asc: "date uploaded (oldest first)"
+ modified:
+ desc: "date modified (newest first)"
+ asc: "date modified (oldest first)"
sr:
thumbnail: Default representative image
stats:
diff --git a/config/locales/hyrax.es.yml b/config/locales/hyrax.es.yml
index 0e1b207d1a..1da41de01d 100644
--- a/config/locales/hyrax.es.yml
+++ b/config/locales/hyrax.es.yml
@@ -1633,6 +1633,13 @@ es:
link_expired_not_found: Enlace de uso único caducado o no encontrado
link_not_found: Enlace de uso único no encontrado
sort_label: Ordenar el listado de elementos
+ sort:
+ uploaded:
+ desc: "fecha de carga (más reciente primero)"
+ asc: "fecha de carga (más antiguo primero)"
+ modified:
+ desc: "fecha de modificación (más reciente primero)"
+ asc: "fecha de modificación (más antiguo primero)"
sr:
thumbnail: imagen representativa predeterminada
static:
diff --git a/config/locales/hyrax.fr.yml b/config/locales/hyrax.fr.yml
index 093857321e..949e39bb0a 100644
--- a/config/locales/hyrax.fr.yml
+++ b/config/locales/hyrax.fr.yml
@@ -1631,6 +1631,13 @@ fr:
link_expired_not_found: Lien à usage unique expiré ou introuvable
link_not_found: Lien à usage unique introuvable
sort_label: Trier la liste des articles
+ sort:
+ uploaded:
+ desc: "date de téléchargement (le plus récent d'abord)"
+ asc: "date de téléchargement (le plus ancien d'abord)"
+ modified:
+ desc: "date de modification (le plus récent d'abord)"
+ asc: "date de modification (le plus ancien d'abord)"
sr:
thumbnail: image représentative par défaut
static:
diff --git a/config/locales/hyrax.it.yml b/config/locales/hyrax.it.yml
index c370d7dbe4..8a3327ae70 100644
--- a/config/locales/hyrax.it.yml
+++ b/config/locales/hyrax.it.yml
@@ -1630,6 +1630,13 @@ it:
link_expired_not_found: Link monouso scaduto o non trovato
link_not_found: Link monouso non trovato
sort_label: Ordina l'elenco degli articoli
+ sort:
+ uploaded:
+ desc: "data di caricamento (più recente prima)"
+ asc: "data di caricamento (più vecchio prima)"
+ modified:
+ desc: "data di modifica (più recente prima)"
+ asc: "data di modifica (più vecchio prima)"
sr:
thumbnail: immagine rappresentativa predefinita
static:
diff --git a/config/locales/hyrax.pt-BR.yml b/config/locales/hyrax.pt-BR.yml
index a871f481bb..aee7e42ac7 100644
--- a/config/locales/hyrax.pt-BR.yml
+++ b/config/locales/hyrax.pt-BR.yml
@@ -1623,6 +1623,13 @@ pt-BR:
link_expired_not_found: Link de uso único expirado ou não encontrado
link_not_found: Link de uso único não encontrado
sort_label: Ordene a lista de itens
+ sort:
+ uploaded:
+ desc: "data de upload (mais recente primeiro)"
+ asc: "data de upload (mais antigo primeiro)"
+ modified:
+ desc: "data de modificação (mais recente primeiro)"
+ asc: "data de modificação (mais antigo primeiro)"
sr:
thumbnail: imagem representativa padrão
static:
diff --git a/config/locales/hyrax.zh.yml b/config/locales/hyrax.zh.yml
index 43873af119..423de12e60 100644
--- a/config/locales/hyrax.zh.yml
+++ b/config/locales/hyrax.zh.yml
@@ -1628,6 +1628,13 @@ zh:
link_expired_not_found: 单次使用链接已过期或未找到
link_not_found: 单用链接未找到
sort_label: 对清单中单件排序
+ sort:
+ uploaded:
+ desc: "上传日期(最新优先)"
+ asc: "上传日期(最旧优先)"
+ modified:
+ desc: "修改日期(最新优先)"
+ asc: "修改日期(最旧优先)"
sr:
thumbnail: 默认代表性图片
static:
diff --git a/lib/generators/hyrax/templates/catalog_controller.rb b/lib/generators/hyrax/templates/catalog_controller.rb
index 10a37ab0a2..48fd183b8b 100644
--- a/lib/generators/hyrax/templates/catalog_controller.rb
+++ b/lib/generators/hyrax/templates/catalog_controller.rb
@@ -285,10 +285,10 @@ def self.modified_field
# except in the relevancy case).
# label is key, solr field is value
config.add_sort_field "score desc, #{uploaded_field} desc", label: "relevance"
- config.add_sort_field "#{uploaded_field} desc", label: "date uploaded \u25BC"
- config.add_sort_field "#{uploaded_field} asc", label: "date uploaded \u25B2"
- config.add_sort_field "#{modified_field} desc", label: "date modified \u25BC"
- config.add_sort_field "#{modified_field} asc", label: "date modified \u25B2"
+ config.add_sort_field "#{uploaded_field} desc", label: I18n.t('hyrax.sort.uploaded.desc')
+ config.add_sort_field "#{uploaded_field} asc", label: I18n.t('hyrax.sort.uploaded.asc')
+ config.add_sort_field "#{modified_field} desc", label: I18n.t('hyrax.sort.modified.desc')
+ config.add_sort_field "#{modified_field} asc", label: I18n.t('hyrax.sort.modified.asc')
# If there are more than this many search results, no spelling ("did you
# mean") suggestion is offered.
diff --git a/spec/features/collection_spec.rb b/spec/features/collection_spec.rb
index 4d9ded2f97..22a1ccffbc 100644
--- a/spec/features/collection_spec.rb
+++ b/spec/features/collection_spec.rb
@@ -115,7 +115,7 @@
expect(page).to have_css(".pagination")
- select('date modified ▲', from: 'Sort')
+ select(I18n.t('hyrax.sort.modified.desc'), from: 'Sort')
click_button 'Refresh'
expect(page).to have_text(/Test Resource 0.+1.+2.+3.+4.+5.+6.+7.+8.+9/m)