From f8529970a4018ee95b52a9c3bede75f3098186b4 Mon Sep 17 00:00:00 2001 From: Moritz Strohm Date: Wed, 11 May 2022 08:42:11 +0000 Subject: TIC #608 Merge request studip/studip!421 --- app/views/admin/course_wizard_steps/index.php | 2 +- app/views/admin/ilias_interface/index.php | 6 ++-- app/views/admin/plugin/index.php | 2 +- app/views/admin/semester/index.php | 2 +- app/views/admin/statusgroups/_group.php | 2 +- app/views/admin/statusgroups/_members.php | 2 +- app/views/admin/user/_course_files.php | 4 +-- app/views/admin/user/_institute_files.php | 2 +- app/views/admin/user/_results.php | 2 +- app/views/admin/user/list_files.php | 2 +- app/views/consultation/admin/index.php | 4 +-- app/views/consultation/admin/ungrouped.php | 4 +-- app/views/contact/index.php | 2 +- app/views/course/dates/_date_row-exdate.php | 2 +- app/views/course/dates/_date_row.php | 2 +- app/views/course/feedback/index.php | 2 +- app/views/course/ilias_interface/add_object.php | 2 +- app/views/course/ilias_interface/index.php | 4 +-- app/views/course/members/accepted_list.php | 2 +- app/views/course/members/autor_list.php | 2 +- app/views/course/members/awaiting_list.php | 2 +- app/views/course/members/dozent_list.php | 2 +- app/views/course/members/tutor_list.php | 2 +- app/views/course/members/user_list.php | 2 +- app/views/course/plus/index.php | 4 +-- app/views/course/room_requests/index.php | 2 +- app/views/course/statusgroups/_group.php | 2 +- app/views/course/statusgroups/_member.php | 2 +- app/views/course/timesrooms/_cycleRow.php | 2 +- app/views/course/timesrooms/_irregularEvents.php | 2 +- app/views/course/timesrooms/_regularEvents.php | 2 +- app/views/files/_folder_tr.php | 2 +- app/views/institute/members/_table_body.php | 1 + app/views/lvgruppen/lvgruppen/index.php | 8 ++--- app/views/materialien/files/index.php | 2 +- app/views/materialien/files/range.php | 2 +- app/views/module/module/details.php | 2 +- app/views/module/module/module.php | 2 +- app/views/module/module/modulteil_lvg.php | 2 +- app/views/my_ilias_accounts/index.php | 4 +-- app/views/news/admin_news.php | 2 +- app/views/online/user-row.php | 2 +- .../questionnaire/_overview_questionnaire.php | 2 +- app/views/resources/_common/_request_tr.php | 3 +- app/views/resources/_common/_resource_tr.php | 2 +- .../resources/_common/_room_search_result.php | 2 +- app/views/resources/admin/categories.php | 1 + app/views/resources/admin/global_locks.php | 11 ++++-- app/views/shared/contacts/details.php | 2 +- app/views/shared/contacts/index.php | 2 +- app/views/shared/contacts/range.php | 2 +- .../studiengaenge/informationen/showdegree.php | 3 +- .../informationen/showstudycourse.php | 2 +- .../studiengaenge/studiengaenge/studiengaenge.php | 2 +- .../studiengangteile/details_grouped.php | 2 +- app/views/studiengaenge/studiengangteile/index.php | 2 +- app/views/studiengaenge/versionen/abschnitte.php | 2 +- app/views/studiengaenge/versionen/versionen.php | 4 +-- app/views/tour/admin_details.php | 2 +- app/views/tour/admin_overview.php | 4 ++- lib/classes/ActionMenu.php | 39 ++++++++++++++++++++++ lib/classes/Range.interface.php | 6 ++++ lib/classes/StudipItem.interface.php | 8 +++++ lib/filesystem/FilesystemVueDataManager.php | 4 +-- lib/filesystem/StandardFile.php | 2 +- lib/models/ConsultationBlock.php | 15 +++++++++ lib/models/ConsultationSlot.php | 15 +++++++++ lib/models/Course.class.php | 9 +++++ lib/models/CourseDate.class.php | 15 +++++++++ lib/models/CourseExDate.class.php | 15 +++++++++ lib/models/Institute.class.php | 9 +++++ lib/models/User.class.php | 9 +++++ lib/models/resources/Building.class.php | 3 ++ lib/models/resources/Location.class.php | 3 ++ lib/models/resources/Resource.class.php | 4 +++ lib/models/resources/Room.class.php | 3 ++ lib/wiki.inc.php | 4 +-- .../assets/javascripts/bootstrap/actionmenu.js | 14 ++++++++ resources/assets/javascripts/lib/actionmenu.js | 36 ++++++++++++++++++++ resources/assets/stylesheets/scss/actionmenu.scss | 6 ++-- resources/vue/components/StudipActionMenu.vue | 10 +++--- .../courseware/CoursewareBlockActions.vue | 3 +- .../courseware/CoursewareStructuralElement.vue | 1 + templates/shared/action-menu.php | 10 +++--- templates/sidebar/room-clipboard-item.php | 2 +- 85 files changed, 310 insertions(+), 90 deletions(-) diff --git a/app/views/admin/course_wizard_steps/index.php b/app/views/admin/course_wizard_steps/index.php index 963d5da..bed64e5 100644 --- a/app/views/admin/course_wizard_steps/index.php +++ b/app/views/admin/course_wizard_steps/index.php @@ -42,7 +42,7 @@ - + setContext($step->name) ?> addLink( $controller->url_for("admin/coursewizardsteps/edit/{$step->id}"), _('Schritt bearbeiten'), diff --git a/app/views/admin/ilias_interface/index.php b/app/views/admin/ilias_interface/index.php index b9e1ff7..6c103ac 100755 --- a/app/views/admin/ilias_interface/index.php +++ b/app/views/admin/ilias_interface/index.php @@ -35,7 +35,7 @@ $text = _('Diese ILIAS-Installation ist inaktiv. Klicken Sie hier, um sie zu aktivieren.'); $img = 'checkbox-unchecked'; $cmd = 'activate'; - } + } ?> $text])->asImg() ?> @@ -45,7 +45,7 @@ - + setContext($ilias_config['name']) ?> addLink( $controller->url_for("admin/ilias_interface/edit_server/$ilias_index"), _('Servereinstellungen bearbeiten'), @@ -91,4 +91,4 @@ - \ No newline at end of file + diff --git a/app/views/admin/plugin/index.php b/app/views/admin/plugin/index.php index 3266c77..5f38b36 100644 --- a/app/views/admin/plugin/index.php +++ b/app/views/admin/plugin/index.php @@ -89,7 +89,7 @@ use Studip\Button, Studip\LinkButton; value="" > - + setContext($plugin['name']) ?> addLink( $controller->url_for('admin/role/assign_plugin_role/' . $pluginid), _('Zugriffsrechte bearbeiten'), diff --git a/app/views/admin/semester/index.php b/app/views/admin/semester/index.php index bae4737..c6aeb81 100644 --- a/app/views/admin/semester/index.php +++ b/app/views/admin/semester/index.php @@ -79,7 +79,7 @@ setContext($semester->name); $actionMenu->addLink( $controller->url_for("admin/semester/edit/{$semester->id}"), diff --git a/app/views/admin/statusgroups/_group.php b/app/views/admin/statusgroups/_group.php index 237254e..0b29329 100644 --- a/app/views/admin/statusgroups/_group.php +++ b/app/views/admin/statusgroups/_group.php @@ -11,7 +11,7 @@ name) ?> - + setContext($group->name) ?> addLink($controller->url_for("admin/statusgroups/editGroup/{$group->id}"), _('Gruppe bearbeiten'), Icon::create('edit'), ['data-dialog' => 'size=auto']) ?> addMultiPersonSearch( diff --git a/app/views/admin/statusgroups/_members.php b/app/views/admin/statusgroups/_members.php index a4e8bf7..956679e 100644 --- a/app/views/admin/statusgroups/_members.php +++ b/app/views/admin/statusgroups/_members.php @@ -5,7 +5,7 @@ avatar() ?> name()) ?> - + setContext($user->user) ?> addLink($controller->url_for('settings/statusgruppen/', ['open' => $group->id, 'type' => 'role', 'username' => $user->user->username]), _('Benutzer in dieser Rolle bearbeiten'), Icon::create('edit', 'clickable')) ?> diff --git a/app/views/admin/user/_course_files.php b/app/views/admin/user/_course_files.php index c427619..6da1662 100644 --- a/app/views/admin/user/_course_files.php +++ b/app/views/admin/user/_course_files.php @@ -51,7 +51,7 @@ setContext($data['course']->name); $actionMenu->addLink($controller->url_for('admin/user/list_files/' . $user['user_id'] . '/' . $data['course']->id, $params), _('Dateien auflisten'), Icon::create('folder-full', 'clickable'), @@ -73,4 +73,4 @@ - \ No newline at end of file + diff --git a/app/views/admin/user/_institute_files.php b/app/views/admin/user/_institute_files.php index 9f17a08..6aeb05d 100644 --- a/app/views/admin/user/_institute_files.php +++ b/app/views/admin/user/_institute_files.php @@ -36,7 +36,7 @@ setContext($institute['name']); $actionMenu->addLink($controller->url_for('admin/user/list_files/' . $user['user_id'] . '/' . $institute['Institut_id'] , $params), _('Dateien auflisten'), Icon::create('folder-full', 'clickable'), diff --git a/app/views/admin/user/_results.php b/app/views/admin/user/_results.php index 1d02f19..73b266d 100644 --- a/app/views/admin/user/_results.php +++ b/app/views/admin/user/_results.php @@ -114,7 +114,7 @@ auth_plugin) ?> setContext($user); $actionMenu->addLink( $controller->url_for("admin/user/edit/{$user->id}"), _('Nutzer bearbeiten'), diff --git a/app/views/admin/user/list_files.php b/app/views/admin/user/list_files.php index 3707d87..2d7ce9b 100644 --- a/app/views/admin/user/list_files.php +++ b/app/views/admin/user/list_files.php @@ -13,7 +13,7 @@ isFileDownloadable($file->id, $user->id)): ?> - addLink( + setContext($file->name)->addLink( $file->getDownloadURL(), _('Datei herunterladen'), Icon::create('download', 'clickable') diff --git a/app/views/consultation/admin/index.php b/app/views/consultation/admin/index.php index 6ee7550..cf8d6c0 100644 --- a/app/views/consultation/admin/index.php +++ b/app/views/consultation/admin/index.php @@ -44,7 +44,7 @@ render_partial('consultation/block-description.php', ['block' => $block['block']]) ?> - addLink( + setContext(strval($block['block']))->addLink( $controller->editURL($block['block'], 0, $page), _('Bearbeiten'), Icon::create('edit'), @@ -119,7 +119,7 @@ - addLink( + setContext(strval($slot))->addLink( $controller->noteURL($block['block'], $slot, $page), _('Information bearbeiten'), Icon::create('edit'), diff --git a/app/views/consultation/admin/ungrouped.php b/app/views/consultation/admin/ungrouped.php index 81b8275..e64efea 100644 --- a/app/views/consultation/admin/ungrouped.php +++ b/app/views/consultation/admin/ungrouped.php @@ -70,7 +70,7 @@ room) ?> - addLink( + setContext(strval($block))->addLink( $controller->editURL($block, 0, $page), _('Information bearbeiten'), Icon::create('edit'), @@ -206,7 +206,7 @@ - addLink( + setContext(strval($slot))->addLink( $controller->noteURL($slot->block, $slot, $page), _('Information bearbeiten'), Icon::create('edit'), diff --git a/app/views/contact/index.php b/app/views/contact/index.php index 6b417df..503c65a 100644 --- a/app/views/contact/index.php +++ b/app/views/contact/index.php @@ -68,7 +68,7 @@ - + setContext($contact) ?> BLUBBER_GLOBAL_MESSENGER_ACTIVATE) : ?> addLink( URLHelper::getURL('dispatch.php/blubber/write_to/' . $contact->user_id), diff --git a/app/views/course/dates/_date_row-exdate.php b/app/views/course/dates/_date_row-exdate.php index b905663..c9b95f5 100644 --- a/app/views/course/dates/_date_row-exdate.php +++ b/app/views/course/dates/_date_row-exdate.php @@ -19,7 +19,7 @@
id}/1") ?>" method="post"> - + setContext($date) ?> addButton('restore_date', _('Termin wiederherstellen'), Icon::create('trash+decline'), ['data-confirm' => _('Diesen Termin wiederherstellen?')]) ?> render() ?> diff --git a/app/views/course/dates/_date_row.php b/app/views/course/dates/_date_row.php index 152b6fc..fe045ed 100644 --- a/app/views/course/dates/_date_row.php +++ b/app/views/course/dates/_date_row.php @@ -49,7 +49,7 @@ $dialog_url = $show_raumzeit - + setContext($date) ?> getAccessibleFolderFiles($GLOBALS['user']->id)['files']); ?> addLink($dialog_url, _('Termin bearbeiten'), Icon::create('edit'), ['data-dialog' => '']) ?> diff --git a/app/views/course/feedback/index.php b/app/views/course/feedback/index.php index 28d04f3..fe4c83f 100644 --- a/app/views/course/feedback/index.php +++ b/app/views/course/feedback/index.php @@ -93,7 +93,7 @@ setContext($feedback->question); $actionMenu->addLink( $controller->link_for('course/feedback/edit_form/' . $feedback->id), _('Feedback-Element bearbeiten'), diff --git a/app/views/course/ilias_interface/add_object.php b/app/views/course/ilias_interface/add_object.php index 429ee58..b2b5e02 100755 --- a/app/views/course/ilias_interface/add_object.php +++ b/app/views/course/ilias_interface/add_object.php @@ -96,7 +96,7 @@ getModuleTypeName() ?> - addButton( + setContext($module->getTitle())->addButton( 'view', _('Info'), Icon::create('info-circle'), diff --git a/app/views/course/ilias_interface/index.php b/app/views/course/ilias_interface/index.php index 9deab9f..c45d058 100755 --- a/app/views/course/ilias_interface/index.php +++ b/app/views/course/ilias_interface/index.php @@ -35,7 +35,7 @@ getModuleTypeName()?> - + setContext($module->getTitle()) ?> is_offline) $actionMenu->addButton( 'view', _('Info'), @@ -97,7 +97,7 @@ - + setContext(sprintf(_('Kurs in %s'), $ilias->getName())) ?> addButton( 'start', _('In ILIAS anzeigen'), diff --git a/app/views/course/members/accepted_list.php b/app/views/course/members/accepted_list.php index e789a10..53e6918 100644 --- a/app/views/course/members/accepted_list.php +++ b/app/views/course/members/accepted_list.php @@ -111,7 +111,7 @@ ]) ?> - + setContext($fullname) ?> addLink( $controller->url_for('course/members/add_comment/' . $accept['user_id']), _('Bemerkung hinzufügen'), diff --git a/app/views/course/members/autor_list.php b/app/views/course/members/autor_list.php index ed031a4..e40a454 100644 --- a/app/views/course/members/autor_list.php +++ b/app/views/course/members/autor_list.php @@ -128,7 +128,7 @@ - + setContext($fullname) ?> addLink( $controller->url_for('course/members/add_comment/' . $autor['user_id']), diff --git a/app/views/course/members/awaiting_list.php b/app/views/course/members/awaiting_list.php index 6ac535c..cb44dea 100644 --- a/app/views/course/members/awaiting_list.php +++ b/app/views/course/members/awaiting_list.php @@ -98,7 +98,7 @@ ]) ?> - + setContext($fullname) ?> addLink( URLHelper::getURL('dispatch.php/messages/write', [ diff --git a/app/views/course/members/dozent_list.php b/app/views/course/members/dozent_list.php index e955b56..d839b7e 100644 --- a/app/views/course/members/dozent_list.php +++ b/app/views/course/members/dozent_list.php @@ -66,7 +66,7 @@ - + setContext($fullname) ?> addLink( $controller->url_for('course/members/add_comment/' . $dozent['user_id']), diff --git a/app/views/course/members/tutor_list.php b/app/views/course/members/tutor_list.php index e07b430..bb77d3a 100644 --- a/app/views/course/members/tutor_list.php +++ b/app/views/course/members/tutor_list.php @@ -116,7 +116,7 @@ - + setContext($fullname) ?> addLink( $controller->url_for('course/members/add_comment/' . $tutor['user_id']), diff --git a/app/views/course/members/user_list.php b/app/views/course/members/user_list.php index 6ebd3b0..c3102ea 100644 --- a/app/views/course/members/user_list.php +++ b/app/views/course/members/user_list.php @@ -109,7 +109,7 @@ - + setContext($fullname) ?> addLink( URLHelper::getURL('dispatch.php/messages/write', [ diff --git a/app/views/course/plus/index.php b/app/views/course/plus/index.php index 9daa3de..b50bd53 100644 --- a/app/views/course/plus/index.php +++ b/app/views/course/plus/index.php @@ -55,8 +55,8 @@ use Studip\Button; -
+
setContext($pluginname); $actionMenu->addLink( $controller->url_for('/edittool/' . $key), _('Optionen bearbeiten'), diff --git a/app/views/course/room_requests/index.php b/app/views/course/room_requests/index.php index e8b94dc..3f13b05 100644 --- a/app/views/course/room_requests/index.php +++ b/app/views/course/room_requests/index.php @@ -51,7 +51,7 @@ echo $flash['message']; - + setContext($rr->getTypeString()) ?> addLink( $controller->url_for('course/room_requests/request_summary/' . $rr->id, ['clear_cache' => 1]), _('Diese Anfrage bearbeiten'), diff --git a/app/views/course/statusgroups/_group.php b/app/views/course/statusgroups/_group.php index ebd9972..1110e7c 100644 --- a/app/views/course/statusgroups/_group.php +++ b/app/views/course/statusgroups/_group.php @@ -64,7 +64,7 @@ id != 'nogroup') : ?> - setContext($group->name) ->addLink( $controller->url_for('messages/write', [ 'group_id' => $group->id, diff --git a/app/views/course/statusgroups/_member.php b/app/views/course/statusgroups/_member.php index a874e6b..ce3507b 100644 --- a/app/views/course/statusgroups/_member.php +++ b/app/views/course/statusgroups/_member.php @@ -34,7 +34,7 @@ - setContext($user_fullname); if ($is_tutor || $m->user_id !== $GLOBALS['user']->id) { $actions->addLink( $controller->url_for('messages/write', [ diff --git a/app/views/course/timesrooms/_cycleRow.php b/app/views/course/timesrooms/_cycleRow.php index c58990b..cfb291a 100644 --- a/app/views/course/timesrooms/_cycleRow.php +++ b/app/views/course/timesrooms/_cycleRow.php @@ -77,7 +77,7 @@ $is_exTermin = $termin instanceof CourseExDate; - + setContext($termin) ?> addLink( $controller->url_for( diff --git a/app/views/course/timesrooms/_irregularEvents.php b/app/views/course/timesrooms/_irregularEvents.php index 0181ec5..f85b18b 100644 --- a/app/views/course/timesrooms/_irregularEvents.php +++ b/app/views/course/timesrooms/_irregularEvents.php @@ -14,7 +14,7 @@ $room_request_filter = function ($date) {