Welcome to mirror list, hosted at ThFree Co, Russian Federation.

part.choosecalendar.php « templates « calendar « apps - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: af3b82a48fc553d44a83439b623b2cafb86c36a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<div id="choosecalendar_dialog" title="<?php echo $l->t("Choose active calendars"); ?>">
<p><b><?php echo $l->t('Your calendars'); ?>:</b></p>
<table width="100%" style="border: 0;">
<?php
$option_calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
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>";
}
?>
<tr>
	<td colspan="6">
		<a href="#" onclick="Calendar.UI.Calendar.newCalendar(this);"><input type="button" value="<?php echo $l->t('New Calendar') ?>"></a>
	</td>
</tr>
<tr>
	<td colspan="6">
		<p style="margin: 0 auto;width: 90%;"><input style="display:none;width: 90%;float: left;" type="text" id="caldav_url" onmouseover="$('#caldav_url').select();" title="<?php echo $l->t("CalDav Link"); ?>"><img id="caldav_url_close" style="height: 20px;vertical-align: middle;display: none;" src="../../core/img/actions/delete.svg" alt="close" onclick="$('#caldav_url').hide();$('#caldav_url_close').hide();"/></p>
	</td>
</tr>
</table><br>
<p><b><?php echo $l->t('Shared calendars'); ?>: </b></p>
<table width="100%" style="border: 0;">
<?php
$share = OC_Calendar_Share::allSharedwithuser(OCP\USER::getUser(), OC_Calendar_Share::CALENDAR);
$count = count($share);
for($i = 0; $i < $count; $i++){
	$share[$i]['calendar'] = OC_Calendar_App::getCalendar($share[$i]['calendarid'], false, false);
	echo '<tr>';
	$tmpl = new OC_Template('calendar', 'part.choosecalendar.rowfields.shared');
	$tmpl->assign('share', $share[$i]);
	$tmpl->printpage();
	echo '</tr>';
}
?>
</table>
<?php
if($count == 0){
	echo '<p style="text-align:center;"><b>' . $l->t('No shared calendars') . '</b></p>';
}
?>
</div>