Skip to content
Snippets Groups Projects
Commit f1808c9a authored by Moritz Strohm's avatar Moritz Strohm
Browse files

added calendar/calendar/share_select action, re #3635

Merge request studip/studip!2564
parent 686d05bf
No related branches found
No related tags found
No related merge requests found
...@@ -54,19 +54,11 @@ class Calendar_CalendarController extends AuthenticatedController ...@@ -54,19 +54,11 @@ class Calendar_CalendarController extends AuthenticatedController
Icon::create('import'), Icon::create('import'),
['data-dialog' => 'size=auto'] ['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( $actions->addLink(
_('Kalender teilen'), _('Kalender teilen'),
$this->url_for('calendar/calendar/share'), $this->url_for('calendar/calendar/share_select'),
Icon::create('share'), Icon::create('share'),
['data-dialog' => 'size=default'] ['data-dialog' => 'size=auto']
); );
$actions->addLink( $actions->addLink(
_('Gruppen verwalten'), _('Gruppen verwalten'),
...@@ -776,6 +768,13 @@ class Calendar_CalendarController extends AuthenticatedController ...@@ -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() public function share_action()
{ {
PageLayout::setTitle(_('Kalender teilen')); PageLayout::setTitle(_('Kalender teilen'));
......
<?
/**
* @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>
...@@ -87,8 +87,10 @@ ...@@ -87,8 +87,10 @@
} }
} }
/* for file/edit view and file/new_edit_folder_form view: */ /* 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 { div.file_select_possibilities,
.folder_type_select_possibilities,
.square-item-container {
@width: 100px; @width: 100px;
@height: 100px; @height: 100px;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment