diff --git a/migrations/07_add_additional_notes_config.php b/migrations/07_add_additional_notes_config.php new file mode 100644 index 0000000000000000000000000000000000000000..98b3cafc78002e2609d5acd6e121e1a6b37b77a4 --- /dev/null +++ b/migrations/07_add_additional_notes_config.php @@ -0,0 +1,36 @@ +<?php + +/** + * This file is part of the TandemPlugin for Stud.IP + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License as + * published by the Free Software Foundation; either version 2 of + * the License, or (at your option) any later version. + * + * @author Moritz Strohm <strohm@data-quest.de> + * @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2 + * @category Plugin + */ + + +class AddAdditionalNotesConfig extends Migration +{ + public function up() + { + Config::get()->create( + 'TANDEMPLUGIN_ADDITIONAL_PROFILE_NOTES', + [ + 'type' => 'string', + 'value' => '', + 'section' => 'tandemplugin', + 'description' => 'Zusätzliche wichtige Hinweise, die beim Anlegen oder Bearbeiten eines Tandem-Profiles angezeigt werden sollen.' + ] + ); + } + + public function down() + { + Config::get()->delete('TANDEMPLUGIN_ADDITIONAL_PROFILE_NOTES'); + } +} diff --git a/plugin.manifest b/plugin.manifest index bf322e4e9a66f693a3a4879b8474dcbf53dfed7f..73d8fa19216c2350e7268bcb725885e4edf03dbe 100644 --- a/plugin.manifest +++ b/plugin.manifest @@ -1,6 +1,6 @@ pluginname=TandemPlugin pluginclassname=TandemPlugin origin=data-quest -version=0.9.0 +version=0.9.1 description=Dieses Plugin ermöglicht es, Sprachtandems innerhalb der Stud.IP Platform zu bilden. studipMinVersion=4.0 diff --git a/views/profile/_add_edit_form.php b/views/profile/_add_edit_form.php index 7c6973f4f217008ad1f5829faf8a7d9387c1ad6e..1779ca0ab9ec4356b035ecd307af19b6701d04b3 100644 --- a/views/profile/_add_edit_form.php +++ b/views/profile/_add_edit_form.php @@ -56,10 +56,18 @@ </fieldset> <fieldset> <legend><?= dgettext('TandemPlugin', 'Wichtiger Hinweis') ?></legend> - <p><?= sprintf( - dgettext('TandemPlugin', 'Ein Gesuch wird nach %s Monaten automatisch gelöscht, sofern in der Zwischenzeit kein Tandem gebildet wurde! Wurde ein Gesuch automatisch gelöscht, kann es einfach über die Funktion "Gesuch hinzufügen" neu erstellt werden!'), - (int)(Config::get()->TANDEMPLUGIN_DELETE_OLD_PERIOD) - ) ?></p> + <p> + <?= sprintf( + dgettext('TandemPlugin', 'Ein Gesuch wird nach %s Monaten automatisch gelöscht, sofern in der Zwischenzeit kein Tandem gebildet wurde! Wurde ein Gesuch automatisch gelöscht, kann es einfach über die Funktion "Gesuch hinzufügen" neu erstellt werden!'), + (int)(Config::get()->TANDEMPLUGIN_DELETE_OLD_PERIOD) + ) ?> + </p> + <? $additional_notes = trim(Config::get()->TANDEMPLUGIN_ADDITIONAL_PROFILE_NOTES); ?> + <? if ($additional_notes): ?> + <p> + <?= $additional_notes ?> + </p> + <? endif ?> </fieldset> <div data-dialog-button> <?= \Studip\Button::create(