Show coach's officer position - refs BT#9889 #TMI

1.10.x
Angel Fernando Quiroz Campos 10 years ago
parent 4a83416105
commit 8c963ea7ac
  1. 15
      main/session/about.php
  2. 3
      main/template/default/session/about.tpl

@ -43,6 +43,10 @@ $workOrStudyPlaceField = $fieldsRepo->findOneBy([
'extraFieldType' => ExtraField::USER_FIELD_TYPE,
'variable' => 'work_or_study_place'
]);
$officerPositionField = $fieldsRepo->findOneBy([
'extraFieldType' => ExtraField::USER_FIELD_TYPE,
'variable' => 'officer_position'
]);
foreach ($sessionCourses as $sessionCourse) {
$courseVideo = null;
@ -84,6 +88,17 @@ foreach ($sessionCourses as $sessionCourse) {
}
}
if (!is_null($officerPositionField)) {
$officerPositionValue = $fieldValuesRepo->findOneBy([
'field' => $officerPositionField,
'itemId' => $courseCoach->getId()
]);
if (!is_null($officerPositionValue)) {
$coachData['officer_position'] = $officerPositionValue->getValue();
}
}
$coachesData[] = $coachData;
}

@ -79,6 +79,9 @@
{% for coach in course_data.coaches %}
<li>
<p>{{ coach.complete_name }}</p>
{% if coach.officer_position %}
<p>{{ coach.officer_position }}</p>
{% endif %}
{% if coach.work_or_study_place %}
<p>{{ coach.work_or_study_place }}</p>
{% endif %}

Loading…
Cancel
Save