diff --git a/app/controllers/calendar/calendar.php b/app/controllers/calendar/calendar.php index 983aaad31153697927ee18f445e9fd7aac6520d5..fdf2781c50d2839f41a87366f15c19b53617aaaf 100644 --- a/app/controllers/calendar/calendar.php +++ b/app/controllers/calendar/calendar.php @@ -54,19 +54,11 @@ class Calendar_CalendarController extends AuthenticatedController Icon::create('import'), ['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 0000000000000000000000000000000000000000..3937dc1b3bef0b9c9dd1feab91a6660fb4b1fac4 --- /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 c3868503ced343b6ad4815fcf8f68474b615ff97..6421d7ab211c2ab88d97b0df8a7f53701b1351fa 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;