mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-21 05:59:27 +00:00
Disabled recommendation buttons if Lector is not empfehlungsberechtigt
If lector should see Anrechnung but not give a recommendation (because is not the LV-Leitung), then recommendation buttons are disabled.
This commit is contained in:
@@ -94,10 +94,14 @@ class reviewAnrechnungDetail extends Auth_Controller
|
||||
// Get Empfehlung data
|
||||
$empfehlungData = $this->anrechnunglib->getEmpfehlungData($anrechnung_id);
|
||||
|
||||
// False if LV-Leitung is present and user is not LV-Leitung. Otherwise always true.
|
||||
$isEmpfehlungsberechtigt = $this->anrechnunglib->isEmpfehlungsberechtigt($anrechnung_id);
|
||||
|
||||
$viewData = array(
|
||||
'antragData' => $antragData,
|
||||
'anrechnungData' => $anrechnungData,
|
||||
'empfehlungData' => $empfehlungData
|
||||
'empfehlungData' => $empfehlungData,
|
||||
'isEmpfehlungsberechtigt' => $isEmpfehlungsberechtigt
|
||||
);
|
||||
|
||||
$this->load->view('lehre/anrechnung/reviewAnrechnungDetail.php', $viewData);
|
||||
|
||||
@@ -287,12 +287,12 @@ $this->load->view(
|
||||
<div class="pull-right">
|
||||
<button id="reviewAnrechnungDetail-dont-recommend-anrechnung-ask" class="btn btn-danger btn-w200"
|
||||
type="button"
|
||||
<?php echo is_null($empfehlungData->empfehlung) ? '' : 'disabled' ?>>
|
||||
<?php echo (is_null($empfehlungData->empfehlung) && $isEmpfehlungsberechtigt) ? '' : 'disabled' ?>>
|
||||
<?php echo ucfirst($this->p->t('anrechnung', 'nichtEmpfehlen')); ?>
|
||||
</button>
|
||||
<button id="reviewAnrechnungDetail-recommend-anrechnung-ask" class="btn btn-primary btn-w200"
|
||||
type="button"
|
||||
<?php echo is_null($empfehlungData->empfehlung) ? '' : 'disabled' ?>>
|
||||
<?php echo (is_null($empfehlungData->empfehlung) && $isEmpfehlungsberechtigt) ? '' : 'disabled' ?>>
|
||||
<?php echo ucfirst($this->p->t('anrechnung', 'empfehlen')); ?>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user