diff --git a/app/views/file/add_files_window.php b/app/views/file/add_files_window.php index 64b2ff9010685843e6f6d745739714f2d622db0e..cefd7a897e25e1a33d046a70e787a0d21808b100 100644 --- a/app/views/file/add_files_window.php +++ b/app/views/file/add_files_window.php @@ -17,7 +17,8 @@ if ($folder_id) { <div class="files_source_selector" data-folder_id="<?= htmlReady($folder_id) ?>" <? if ($hidden) echo ' style="display: none;"'; ?>> <h2 class="dialog-subtitle"><?= _('Quelle auswählen') ?></h2> <div class="file_select_possibilities"> - <? if (($range instanceof Course) && !$range->getSemClass()['studygroup_mode'] && $GLOBALS['perm']->have_studip_perm('tutor', $range->id) && $GLOBALS['LIBRARY_CATALOGS'] && $show_library_functions) : ?> + <? if ($range instanceof Course && !$range->getSemClass()['studygroup_mode'] && $GLOBALS['perm']->have_studip_perm('tutor', $range->id) + && $GLOBALS['LIBRARY_CATALOGS'] && $show_library_functions && $library_search_description) : ?> <div> <a class="important-item" data-dialog="size=medium-43" href="<?= $controller->link_for('file/add_from_library/' . $folder_id)?>"> @@ -45,16 +46,21 @@ if ($folder_id) { <?= Icon::create('files')->asImg(50) ?> <?= _('Persönlicher Dateibereich') ?> </a> - <a href="<?= $controller->link_for('file/choose_file_from_course/' . htmlReady($folder_id), array_merge($options, ['from_plugin' => ""])) ?>" data-dialog> + <a href="<?= $controller->link_for('file/choose_file_from_course/' . $folder_id, array_merge($options, ['from_plugin' => ""])) ?>" data-dialog> <?= Icon::create('seminar')->asImg(50) ?> <?= _('Meine Veranstaltungen') ?> </a> - <? if (($range instanceof Course) && $GLOBALS['perm']->have_studip_perm('tutor', $range->id) && $show_library_functions) : ?> - <a href="<?= $controller->link_for('library_file/select_type/' . htmlReady($folder_id)) ?>" - data-dialog="size=auto"> + <? if ($range instanceof Course && $GLOBALS['perm']->have_studip_perm('tutor', $range->id) && $show_library_functions) : ?> + <a href="<?= $controller->link_for('library_file/select_type/' . $folder_id) ?>" data-dialog="size=auto"> <?= Icon::create('literature')->asImg(50) ?> <?= _('Literatur') ?> </a> + <? if ($GLOBALS['LIBRARY_CATALOGS'] && !$range->getSemClass()['studygroup_mode'] && !$library_search_description) : ?> + <a href="<?= $controller->link_for('file/add_from_library/' . $folder_id) ?>" data-dialog="size=medium-43"> + <?= Icon::create('literature')->asImg(50) ?> + <?= _('Originaldokument aus Bibliothek') ?> + </a> + <? endif ?> <? endif ?> <? if (Config::get()->OERCAMPUS_ENABLED && $GLOBALS['perm']->have_perm(Config::get()->OERCAMPUS_PUBLIC_STATUS)) : ?> <a href="<?= $controller->link_for('oer/addfile/choose_file', array_merge($options, ['from_plugin' => ""])) ?>"