mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 08:34:29 +00:00
Task #1353: First solution, to be refined
This commit is contained in:
@@ -4,13 +4,29 @@ class Vorlage_widget extends DropdownWidget
|
||||
{
|
||||
public function display($widgetData)
|
||||
{
|
||||
$this->load->model('system/Vorlage_model', 'VorlageModel');
|
||||
$this->VorlageModel->addOrder('vorlage_kurzbz');
|
||||
// Loads
|
||||
$this->load->library('OrganisationseinheitLib');
|
||||
|
||||
$this->addSelectToModel($this->VorlageModel, 'vorlage_kurzbz', 'bezeichnung');
|
||||
$vorlage = $this->organisationseinheitlib->treeSearchEntire(
|
||||
'(
|
||||
SELECT v.vorlage_kurzbz, v.bezeichnung, vs.version, vs.oe_kurzbz, vs.aktiv, vs.subject, vs.text, v.mimetype
|
||||
FROM tbl_vorlagestudiengang vs INNER JOIN tbl_vorlage v USING(vorlage_kurzbz)
|
||||
) templates',
|
||||
'templates',
|
||||
array("templates.vorlage_kurzbz AS id", "UPPER(templates.oe_kurzbz) || ' - ' || templates.bezeichnung || ' - V' || templates.version AS description"),
|
||||
'templates.aktiv = TRUE
|
||||
AND templates.subject IS NOT NULL
|
||||
AND templates.text IS NOT NULL
|
||||
AND templates.mimetype = \'text/html\'',
|
||||
"description ASC",
|
||||
'eas',
|
||||
true
|
||||
);
|
||||
|
||||
array_pop($vorlage->retval);
|
||||
|
||||
$this->setElementsArray(
|
||||
$this->VorlageModel->loadWhere(array('mimetype' => 'text/html')),
|
||||
$vorlage,
|
||||
true,
|
||||
'Select a vorlage...',
|
||||
'No vorlage found'
|
||||
|
||||
Reference in New Issue
Block a user