diff options
| author | Moritz Strohm <strohm@data-quest.de> | 2024-02-15 09:06:42 +0000 |
|---|---|---|
| committer | Moritz Strohm <strohm@data-quest.de> | 2024-02-15 09:06:42 +0000 |
| commit | f1808c9aeca7f107ee788da78e2ca26526941dbb (patch) | |
| tree | 92ada6fa39f027dfc7619886eb124722865e845d | |
| parent | 686d05bf11bc6aff42e12bc07df45122ee7ef431 (diff) | |
added calendar/calendar/share_select action, re #3635
Merge request studip/studip!2564
| -rw-r--r-- | app/controllers/calendar/calendar.php | 19 | ||||
| -rw-r--r-- | app/views/calendar/calendar/share_select.php | 19 | ||||
| -rw-r--r-- | resources/assets/stylesheets/less/files.less | 6 |
3 files changed, 32 insertions, 12 deletions
diff --git a/app/controllers/calendar/calendar.php b/app/controllers/calendar/calendar.php index 983aaad..fdf2781 100644 --- a/app/controllers/calendar/calendar.php +++ b/app/controllers/calendar/calendar.php @@ -55,18 +55,10 @@ class Calendar_CalendarController extends AuthenticatedController ['data-dialog' => 'size=auto'] ); $actions->addLink( - _('Kalender veröffentlichen'), - $this->url_for('calendar/calendar/publish'), - Icon::create('export'), - ['data-dialog' => 'size=auto'] - ); - } - if (!$schedule && Config::get()->CALENDAR_GROUP_ENABLE) { - $actions->addLink( _('Kalender teilen'), - $this->url_for('calendar/calendar/share'), + $this->url_for('calendar/calendar/share_select'), Icon::create('share'), - ['data-dialog' => 'size=default'] + ['data-dialog' => 'size=auto'] ); $actions->addLink( _('Gruppen verwalten'), @@ -776,6 +768,13 @@ class Calendar_CalendarController extends AuthenticatedController } } + public function share_select_action() + { + if (!Config::get()->CALENDAR_GROUP_ENABLE) { + $this->redirect($this->url_for('calendar/calendar/publish')); + } + } + public function share_action() { PageLayout::setTitle(_('Kalender teilen')); diff --git a/app/views/calendar/calendar/share_select.php b/app/views/calendar/calendar/share_select.php new file mode 100644 index 0000000..3937dc1 --- /dev/null +++ b/app/views/calendar/calendar/share_select.php @@ -0,0 +1,19 @@ +<? +/** + * @var $controller AuthenticatedController + */ +?> +<section class="square-item-container"> + <div> + <a href="<?= $controller->link_for('calendar/calendar/share') ?>" + data-dialog="size=default"> + <?= Icon::create('group2')->asImg(50) ?> + <?= _('Kalender mit anderen Personen teilen') ?> + </a> + <a href="<?= $controller->link_for('calendar/calendar/publish') ?>" + data-dialog="size=auto"> + <?= Icon::create('globe')->asImg(50) ?> + <?= _('Kalender weltweit veröffentlichen') ?> + </a> + </div> +</section> diff --git a/resources/assets/stylesheets/less/files.less b/resources/assets/stylesheets/less/files.less index c386850..6421d7a 100644 --- a/resources/assets/stylesheets/less/files.less +++ b/resources/assets/stylesheets/less/files.less @@ -87,8 +87,10 @@ } } -/* for file/edit view and file/new_edit_folder_form view: */ -div.file_select_possibilities, .folder_type_select_possibilities { +/* for file/edit view and file/new_edit_folder_form view and other views that offer a selection via tiles: */ +div.file_select_possibilities, +.folder_type_select_possibilities, +.square-item-container { @width: 100px; @height: 100px; |
