GUI-changes in writeTemplate

- Show only "bezeichnung" of template in select for regular users
- New styled "Preview"-Button.
- Click on "Preview" automatically scrolls to Preview-Div
This commit is contained in:
Manfred Kindl
2020-02-23 20:51:16 +01:00
parent 304d7727f0
commit 8507f63936
2 changed files with 14 additions and 17 deletions
@@ -129,34 +129,30 @@
</label>
</div>
</div>
<div class="well">
<div class="well" id="templatePreviewDiv">
<div class="row">
<div class="col-lg-3">
<div class="form-grop form-inline">
<div class="col-sm-12" style="display: inline">
<div class="form-group form-inline">
<div class="input-group">
<?php
echo $this->widgetlib->widget(
'Dropdown_widget',
array('elements' => success($recipientsArray), 'emptyElement' => 'Select...'),
array('elements' => success($recipientsArray), 'emptyElement' => ucfirst($this->p->t('global', 'empfaenger')).'...'),
array(
'title' => ucfirst($this->p->t('global', 'empfaenger')).': ',
/*'title' => ucfirst($this->p->t('global', 'empfaenger')).':&nbsp;',*/
'name' => 'recipients[]',
'id' => 'recipients'
)
);
?>
<span class="input-group-btn">
<a class="btn btn-default" href="#templatePreviewDiv" id="refresh">
<?php echo ucfirst($this->p->t('ui', 'refresh')); ?>
</a>
</span>
</div>
</div>
</div>
<div class="col-lg-1 valign-middle">
<strong>
<a href="#" id="refresh">
<?php echo ucfirst($this->p->t('ui', 'refresh')); ?>
</a>
</strong>
</div>
</div>
<br>
<textarea id="tinymcePreview"></textarea>
+2 -1
View File
@@ -63,7 +63,8 @@ class Vorlage_widget extends DropdownWidget
FROM tbl_vorlagestudiengang vs INNER JOIN tbl_vorlage v USING(vorlage_kurzbz)
) templates';
$alias = 'templates';
$fields = array("templates.vorlage_kurzbz AS id", "UPPER(templates.oe_kurzbz) || ' - ' || templates.bezeichnung || ' - V' || templates.version AS description");
//$fields = array("templates.vorlage_kurzbz AS id", "UPPER(templates.oe_kurzbz) || ' - ' || templates.bezeichnung || ' - V' || templates.version AS description");
$fields = array("templates.vorlage_kurzbz AS id", "templates.bezeichnung AS description");
$where = 'templates.aktiv = TRUE
AND templates.subject IS NOT NULL
AND templates.text IS NOT NULL