Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release/11.2' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverguenther committed Feb 19, 2021
2 parents 6b94334 + 5db2af7 commit 3d4a216
Show file tree
Hide file tree
Showing 51 changed files with 256 additions and 109 deletions.
69 changes: 55 additions & 14 deletions app/controllers/groups_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,52 +38,93 @@ class GroupsController < ApplicationController
before_action :find_group, only: %i[destroy show create_memberships destroy_membership
edit_membership add_users]

# GET /groups
# GET /groups.xml
def index
@groups = Group.order(Arel.sql('lastname ASC'))

respond_to do |format|
format.html # index.html.erb
format.xml { render xml: @groups }
end
end

# GET /groups/1
# GET /groups/1.xml
def show
@group_users = group_members
render layout: 'no_menu'
respond_to do |format|
format.html do
@group_users = group_members
render layout: 'no_menu'
end
format.xml { render xml: @group }
end
end

# GET /groups/new
# GET /groups/new.xml
def new
@group = Group.new

respond_to do |format|
format.html # new.html.erb
format.xml { render xml: @group }
end
end

# GET /groups/1/edit
def edit
@group = Group.includes(:members, :users).find(params[:id])

set_filters_for_user_autocompleter
end

# POST /groups
# POST /groups.xml
def create
@group = Group.new permitted_params.group

if @group.save
flash[:notice] = I18n.t(:notice_successful_create)
redirect_to(groups_path)
else
render action: :new
respond_to do |format|
if @group.save
flash[:notice] = I18n.t(:notice_successful_create)
format.html { redirect_to(groups_path) }
format.xml { render xml: @group, status: :created, location: @group }
else
format.html { render action: :new }
format.xml { render xml: @group.errors, status: :unprocessable_entity }
end
end
end

# PUT /groups/1
# PUT /groups/1.xml
def update
@group = Group.includes(:users).find(params[:id])

if @group.update(permitted_params.group)
flash[:notice] = I18n.t(:notice_successful_update)
redirect_to action: :index
else
render action: :edit
respond_to do |format|
if @group.update(permitted_params.group)
flash[:notice] = I18n.t(:notice_successful_update)
format.html { redirect_to(groups_path) }
format.xml { head :ok }
else
format.html { render action: 'edit' }
format.xml { render xml: @group.errors, status: :unprocessable_entity }
end
end
end

# DELETE /groups/1
# DELETE /groups/1.xml
def destroy
::Principals::DeleteJob.perform_later(@group)

flash[:info] = I18n.t(:notice_deletion_scheduled)
redirect_to action: :index
respond_to do |format|
format.html do
flash[:info] = I18n.t(:notice_deletion_scheduled)
redirect_to(action: :index)
end
format.xml { head 202 }
end
end

def add_users
Expand Down
2 changes: 1 addition & 1 deletion app/models/principals/scopes/ordered_by_name.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def user_concat_sql
'users.firstname'
when :lastname_firstname, :lastname_coma_firstname
"concat_ws(' ', users.lastname, users.firstname)"
when :login
when :username
"users.login"
else
raise ArgumentError, "Invalid user format"
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-ar.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ ar:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-bg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ bg:
automatic: 'Автоматично'
manually: 'Ръчно'
warning: 'Ще загубите предишното си сортиране, когато активирате автоматичния режим на сортиране.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-ca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ ca:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-cs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ cs:
automatic: 'Automaticky'
manually: 'Ručně'
warning: 'Při aktivaci režimu automatického řazení ztratíte své předchozí řazení.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Potřebujete určité pracovní balíčky, aby vyšly z celkového objemu?'
relation_columns: 'Potřebujete vidět vztahy v seznamu pracovních balíčků?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-da.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ da:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
4 changes: 2 additions & 2 deletions config/locales/crowdin/js-de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ de:
caption_rate_history: "Stundensatz-Historie"
clipboard:
browser_error: "Ihr Browser unterstützt das Kopieren in die Zwischenablage nicht nativ. Bitte selektieren und kopieren Sie den Text händisch."
copied_successful: "Successfully copied to clipboard!"
copied_successful: "Erfolgreich in die Zwischenablage kopiert!"
chart:
type: 'Art des Diagramms'
axis_criteria: 'Achsen-Kriterien'
Expand Down Expand Up @@ -844,7 +844,7 @@ de:
automatic: 'Automatisch'
manually: 'Manuell'
warning: 'Sie verlieren Ihre vorherige Sortierung beim Aktivieren des automatischen Sortiermodus.'
columns_help_text: "Verwenden Sie die obige Eingabe, um Spalten zur Tabellenansicht hinzuzufügen. Sie können die Spalten per Drag & Drop verschieben, um sie neu anzuordnen."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Sollen bestimmte Arbeitspakete aus der Menge herausstechen?'
relation_columns: 'Möchten Sie Zusammenhänge in der Arbeitspaketliste anzeigen?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-el.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ el:
automatic: 'Αυτόματα'
manually: 'Χειροκίνητα'
warning: 'Θα χάσετε την προηγούμενη ταξινόμηση όταν ενεργοποιήσετε την λειτουργία αυτόματης ταξινόμησης.'
columns_help_text: "Χρησιμοποιήστε την παραπάνω είσοδο για να προσθέσετε στήλες στην προβολή του πίνακα σας. Μπορείτε να σύρετε και να αποθέσετε τις στήλες για να τις αναδιατάξετε."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Χρειάζεστε συγκεκριμένα πακέτα εργασίας για να ξεχωρίσετε από την μάζα;'
relation_columns: 'Χρειάζεστε να βλέπετε συσχετίσεις στη λίστα πακέτων εργασίας;'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-es.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ es:
automatic: 'Automático'
manually: 'Manual'
warning: 'Al activar el modo de ordenación automática, se perderá la ordenación actual.'
columns_help_text: "Use los datos anteriores para añadir columnas a la vista de tabla. Puede arrastrar y colocar las columnas para cambiar el orden."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: '¿Necesita que algunos paquetes de trabajo destaquen del resto?'
relation_columns: '¿Necesita ver las relaciones en la lista del paquete de trabajo?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-fi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ fi:
automatic: 'Automaattinen'
manually: 'Manuaalinen'
warning: 'Automaattinen lajittelutapa korvaa nykyiset asetukset'
columns_help_text: "Käytä yläpuolella olevaa kenttää taulunäkymän sarakkeiden valintaan. Voit järjestää sarakkeita raahaamalla niitä."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Täytyy nähdä riippuvuudet tehtävälistassa?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-fil.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ fil:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Kailangan tingnan ang mga relasyon sa listahan ng work package?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-fr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ fr:
automatic: 'Automatique'
manually: 'Manuellement'
warning: 'Vous perdrez votre tri précédent lors de l''activation du mode de tri automatique.'
columns_help_text: "Utilisez l’entrée ci-dessus pour ajouter des colonnes à votre vue tableau. Vous pouvez déplacer les colonnes par glisser/déposer pour les réorganiser."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Vous avez besoin de lots de travaux qui sortent du lot ?'
relation_columns: 'Besoin de voir les relations sur la liste des lots de travaux ?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-hr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ hr:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-hu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ hu:
automatic: 'Automatikus'
manually: 'Kézi'
warning: 'Az automatikus válogatás üzemmód aktiválásakor elveszíti korábbi rendezését.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Szeretné látni a munkacsomag kapcsolatait?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-id.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ id:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Apakah perlu untuk melihat hubungan dalam daftar paker kerja?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-it.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ it:
automatic: 'Automatico'
manually: 'Manuale'
warning: 'Perderai il tuo ordinamento precedente quando attivi la modalità di ordinamento automatico.'
columns_help_text: "Utilizza l'input sopra per aggiungere colonne alla visualizzazione della tabella. È possibile trascinare e rilasciare le colonne per riordinarle."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Vuoi che alcune macro-attività si distinguano dalla massa?'
relation_columns: 'Vuoi visualizzare le relazioni nell''elenco di macro-attività?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-ko.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ ko:
automatic: '자동'
manually: '수동'
warning: '자동 정렬 모드를 활성화하면 이전 정렬이 손실됩니다.'
columns_help_text: "위 입력을 사용하여 테이블 보기에 열을 추가하세요. 열을 끌어다 놓아 순서를 바꿀 수 있습니다."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: '나머지 작업 중에 확연히 두드러지는 특정 작업 패키지가 필요합니까?'
relation_columns: '작업 패키지 목록에서 관계를 표시해야 합니까?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-lt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ lt:
automatic: 'Automatinis'
manually: 'Rankinis'
warning: 'Aktyvuojant automatinį rikiavimo režimą jūs prarasite savo ankstesnį rikiavimą.'
columns_help_text: "Aukščiau esančioje įvedimo eilutėje pridėkite stulpelius į lentelės vaizdą. Galite pele perkelti stulpelius, jei reikalinga kita jų tvarka."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Reikia išskirti tam tikrus darbo paketus iš didelės masės?'
relation_columns: 'Ar reikia matyti ryšius darbų paketų sąraše?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-nl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ nl:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Moeten bepaalde werkpakketten te onderscheiden zijn van de massa?'
relation_columns: 'Nodig om te zien van betrekkingen in de pakketlijst werk?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-no.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-pl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ pl:
automatic: 'Automatycznie'
manually: 'Ręcznie'
warning: 'Wskutek aktywacji trybu automatycznego sortowania utracisz poprzednie sortowanie.'
columns_help_text: "Użyj powyższych danych wejściowych, aby dodać kolumny do widoku tabeli. Możesz przeciągać i upuszczać kolumny, aby zmienić ich kolejność."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Czy określone pakiety robocze trzeba wyróżnić?'
relation_columns: 'Chcesz zobaczyć relacje w tej liście pakietów roboczych?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-pt.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ pt:
automatic: 'Automático'
manually: 'Manualmente'
warning: 'Você perderá sua ordenação anterior quando ativar o modo de ordenação automática.'
columns_help_text: "Utilize a entrada acima para adicionar colunas à sua visualização de tabela. Você pode arrastar e soltar as colunas para reorganizá-las."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Precisa de certos pacotes de trabalho para se destacar da massa?'
relation_columns: 'Necessário ver as relações na lista de pacote de trabalho?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-ro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ ro:
automatic: 'Automatic'
manually: 'Manually'
warning: 'You will lose your previous sorting when activating the automatic sorting mode.'
columns_help_text: "Use the input above to add columns to your table view. You can drag and drop the columns to reorder them."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Need certain work packages to stand out from the mass?'
relation_columns: 'Need to see relations in the work package list?'
Expand Down
2 changes: 1 addition & 1 deletion config/locales/crowdin/js-ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ ru:
automatic: 'Автоматически'
manually: 'Вручную'
warning: 'При активации режима автоматического упорядования вы потеряете свою предыдущую сортировку.'
columns_help_text: "С помощью поля ввода выше можно добавлять столбцы в табличное представление. Для изменения порядка столбцов перетаскивайте их мышью."
columns_help_text: "Use the input field above to add columns to your table view. You can drag and drop the columns to reorder them."
upsale:
attribute_highlighting: 'Хотите выделить некоторые пакеты работ из общей массы?'
relation_columns: 'Нужно видеть отношения в списке пакетов работ?'
Expand Down
Loading

0 comments on commit 3d4a216

Please sign in to comment.