Skip to content
Snippets Groups Projects
Commit 089bb957 authored by Thomas Hackl's avatar Thomas Hackl
Browse files

TIC 11447 Freitext Raumbelegungsplan

parent 7580842a
No related branches found
No related tags found
No related merge requests found
......@@ -1209,6 +1209,10 @@ class Resources_AdminController extends AuthenticatedController
'RESOURCES_BOOKING_PLAN_END_HOUR',
$this->resources_booking_plan_end_hour
);
$this->config->store(
'RESOURCES_ADDITIONAL_TEXT_ROOM_EXPORT',
Studip\Markup::purifyHtml(Request::get('additional_text'))
);
$this->config->store(
'RESOURCES_EXPORT_BOOKINGTYPES_DEFAULT',
......
......@@ -142,6 +142,10 @@ class Resources_PrintController extends AuthenticatedController
2 => _('Sperrbuchung'),
3 => _('Planungsbuchung')
];
// Get additional text to print
$this->additional_text = Config::get()->RESOURCES_ADDITIONAL_TEXT_ROOM_EXPORT;
if (!$this->clipboard_selected && !$this->print_schedules) {
//We have to load all selectable clipboards of the current user:
$this->available_clipboards = Clipboard::getClipboardsForUser(
......
......@@ -128,6 +128,12 @@
<? endforeach ?>
</select>
</label>
<label>
<?= _('Zusatztext, der beim Seriendruck unter jedem Raumplan angezeigt werden soll') ?>
<textarea class="add_toolbar wysiwyg" name="additional_text" cols="75" rows="4">
<?= wysiwygReady($config->RESOURCES_ADDITIONAL_TEXT_ROOM_EXPORT) ?>
</textarea>
</label>
</fieldset>
<?= \Studip\Button::create(_('Speichern'), 'save') ?>
</form>
......@@ -177,6 +177,12 @@
],
['class' => 'resource-plan']
) ?>
<? if ($additional_text != '') : ?>
<div>
<br>
<?= formatReady($additional_text) ?>
</div>
<? endif ?>
</section>
<? endforeach ?>
<? endif ?>
<?php
class FreetextInRoomExport extends Migration
{
public function description()
{
return 'Adds a global freetext for placing in room exports';
}
protected function up()
{
$query = "INSERT IGNORE INTO `config` (
`field`, `value`, `type`, `range`, `section`, `mkdate`, `chdate`, `description`
) VALUES (
'RESOURCES_ADDITIONAL_TEXT_ROOM_EXPORT', '', 'string', 'global', 'resources', UNIX_TIMESTAMP(),
UNIX_TIMESTAMP(), 'Zusatztext, der beim Seriendruck unter jedem Raumplan angezeigt werden soll'
)";
DBManager::get()->exec($query);
}
protected function down()
{
$query = "DELETE FROM `config` WHERE `field` = 'RESOURCES_ADDITIONAL_TEXT_ROOM_EXPORT'";
DBManager::get()->exec($query);
$query = "DELETE FROM `config_values` WHERE `field` = 'RESOURCES_ADDITIONAL_TEXT_ROOM_EXPORT'";
DBManager::get()->exec($query);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment