diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-04-21 22:27:19 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-04-21 22:27:19 +0200 |
commit | 74e540271122222f650bbbfaeaac310b0e592674 (patch) | |
tree | 8b7519d1b82b4f950ea9fda552ab19e4e7c329c2 | |
parent | e29ae46609f42a03ade20c7f935e2cded84db51f (diff) | |
download | nextcloud-server-74e540271122222f650bbbfaeaac310b0e592674.tar.gz nextcloud-server-74e540271122222f650bbbfaeaac310b0e592674.zip |
fix a php notice
-rw-r--r-- | apps/calendar/templates/part.choosecalendar.php | 6 | ||||
-rw-r--r-- | apps/calendar/templates/part.choosecalendar.rowfields.php | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/apps/calendar/templates/part.choosecalendar.php b/apps/calendar/templates/part.choosecalendar.php index d93a85aeca0..4f6680bb497 100644 --- a/apps/calendar/templates/part.choosecalendar.php +++ b/apps/calendar/templates/part.choosecalendar.php @@ -7,6 +7,12 @@ for($i = 0; $i < count($option_calendars); $i++){ echo "<tr>"; $tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields'); $tmpl->assign('calendar', $option_calendars[$i]); + if(OC_Calendar_Share::allUsersSharedwith($option_calendars[$i]['id'], OC_Calendar_Share::CALENDAR) == array()){ + $shared = false; + }else{ + $shared = true; + } + $tmpl->assign('shared', $shared); $tmpl->printpage(); echo "</tr>"; } diff --git a/apps/calendar/templates/part.choosecalendar.rowfields.php b/apps/calendar/templates/part.choosecalendar.rowfields.php index 21fb3f8a097..cf85f0dc53e 100644 --- a/apps/calendar/templates/part.choosecalendar.rowfields.php +++ b/apps/calendar/templates/part.choosecalendar.rowfields.php @@ -1,7 +1,7 @@ <?php echo '<td width="20px"><input id="active_' . $_['calendar']['id'] . '" type="checkbox" onClick="Calendar.UI.Calendar.activation(this,' . $_['calendar']['id'] . ')"' . ($_['calendar']['active'] ? ' checked="checked"' : '') . '></td>'; echo '<td id="' . OC_User::getUser() . '_' . $_['calendar']['id'] . '"><label for="active_' . $_['calendar']['id'] . '">' . $_['calendar']['displayname'] . '</label></td>'; -echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img class="svg action" src="' . ((!$shared) ? '../../core/img/actions/share.svg' : '../../core/img/actions/shared.svg') . '"></a></td>'; +echo '<td width="20px"><a href="#" onclick="Calendar.UI.Share.dropdown(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['id'] . '\');" title="' . $l->t("Share Calendar") . '" class="action"><img class="svg action" src="' . ((!$_['shared']) ? '../../core/img/actions/share.svg' : '../../core/img/actions/shared.svg') . '"></a></td>'; echo '<td width="20px"><a href="#" onclick="Calendar.UI.showCalDAVUrl(\'' . OC_User::getUser() . '\', \'' . $_['calendar']['uri'] . '\');" title="' . $l->t("CalDav Link") . '" class="action"><img class="svg action" src="../../core/img/actions/public.svg"></a></td>'; echo '<td width="20px"><a href="export.php?calid=' . $_['calendar']['id'] . '" title="' . $l->t('Download') . '" class="action"><img class="svg action" src="../../core/img/actions/download.svg"></a></td>'; echo '<td width="20px"><a href="#" title="' . $l->t('Edit') . '" class="action" onclick="Calendar.UI.Calendar.edit(this, ' . $_['calendar']['id'] . ');"><img class="svg action" src="../../core/img/actions/rename.svg"></a></td>'; |