Display study_groups in the show view of internal and external users

This commit is contained in:
Janis Vaneylen
2022-09-16 13:38:26 +02:00
committed by Sebastian Serth
parent 4d2fe22daf
commit 2e3480a068
4 changed files with 6 additions and 0 deletions

View File

@ -7,6 +7,7 @@ h1 = @user.displayname
= @user.external_id
= row(label: 'external_user.consumer', value: link_to_if(policy(@user.consumer).show?, @user.consumer, @user.consumer))
= row(label: 'external_user.platform_admin', value: @user.platform_admin?)
= row(label: 'external_users.form.study_groups', value: @user.study_groups.map{|sg| "#{sg.name}"}.sort.join(", "))
h4.mt-4 = link_to(t('.exercise_statistics'), statistics_external_user_path(@user)) if policy(@user).statistics?

View File

@ -7,5 +7,6 @@ h1
= row(label: 'internal_user.consumer', value: @user.consumer ? link_to_if(policy(@user.consumer).show?, @user.consumer, @user.consumer) : nil)
= row(label: 'internal_user.platform_admin', value: @user.platform_admin?)
= row(label: 'internal_user.activated', value: @user.activated?)
= row(label: 'internal_users.form.study_groups', value: @user.study_groups.map{|sg| "#{sg.name}"}.sort.join(", "))
= row(label: 'codeharbor_link.profile_label', value: @user.codeharbor_link.nil? ? link_to(t('codeharbor_link.new'), new_codeharbor_link_path, class: 'btn btn-secondary') : link_to(t('codeharbor_link.edit'), edit_codeharbor_link_path(@user.codeharbor_link), class: 'btn btn-secondary'))