Mehrere Tickets 49, 50, 51, 52, 53

This commit is contained in:
Kevin Adametz 2021-10-08 17:07:28 +02:00
parent ae70577289
commit e3495be8b8
61 changed files with 1904 additions and 344 deletions

View file

@ -232,6 +232,19 @@ class HTMLHelper
return $ret;
}
public static function getCMSContentOptions($identifier, $setId = false, $empty=false){
$options = CMSContent::where('identifier', '=', $identifier)->get()->sortBy('pos');
$ret = "";
if($empty){
$ret = '<option value="0">Keine Vorlage</option>\n';
}
foreach ($options as $option){
$attr = ($option->id === $setId) ? 'selected="selected"' : '';
$ret .= '<option value="'.$option->id.'" '.$attr.'>'.$option->name.'</option>\n';
}
return $ret;
}
public static function getTravelClassOptions($programId = false, $setId = false){
$options = TravelClass::where('program_id', $programId)->get();
$ret = '<option value="">alle Kategorien</option>\n';