From 8e4abea184cd951ffea2f3532d69501eaf13fb47 Mon Sep 17 00:00:00 2001 From: Arnaud Levy <contact@arnaudlevy.com> Date: Thu, 6 Jul 2023 15:20:50 +0200 Subject: [PATCH] scope to language --- .../admin/communication/extranets/contacts_controller.rb | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/communication/extranets/contacts_controller.rb b/app/controllers/admin/communication/extranets/contacts_controller.rb index b0c127fc5..6283e05b3 100644 --- a/app/controllers/admin/communication/extranets/contacts_controller.rb +++ b/app/controllers/admin/communication/extranets/contacts_controller.rb @@ -13,14 +13,18 @@ class Admin::Communication::Extranets::ContactsController < Admin::Communication end def export_people - @people = @extranet.connected_people.ordered + @people = @extranet.connected_people + .for_language_id(current_university.default_language_id) + .ordered filename = "people-#{Time.now.strftime("%Y%m%d%H%M%S")}.xlsx" response.headers['Content-Disposition'] = "attachment; filename=#{filename}" render "admin/university/people/index" end def export_organizations - @organizations = @extranet.connected_organizations.ordered + @organizations = @extranet.connected_organizations + .for_language_id(current_university.default_language_id) + .ordered filename = "organizations-#{Time.now.strftime("%Y%m%d%H%M%S")}.xlsx" response.headers['Content-Disposition'] = "attachment; filename=#{filename}" render "admin/university/organizations/index" -- GitLab