$('kronolithC' + type + 'PAdvanced').select('tr').findAll(function(tr) {
return tr.retrieve('remove');
}).invoke('remove');
+ $('kronolithCalendar' + type + 'Urls').hide();
}
var newCalendar = !calendar;
} else {
$('kronolithCalendar' + type + 'LinkImport').up('li').hide();
}
+ $('kronolithCalendar' + type + 'UrlFeed')
+ .writeAttribute('href', info.feed)
+ .update(info.feed.escapeHTML());
// Fall through.
case 'tasklists':
$('kronolithCalendar' + type + 'Description').setValue(info.desc);
$('kronolithCalendar' + type + 'Export').href = type == 'internal'
? Kronolith.conf.URI_CALENDAR_EXPORT + '=' + calendar
: Kronolith.conf.tasks.URI_TASKLIST_EXPORT + '=' + calendar.substring(6);
+ $('kronolithCalendar' + type + 'Urls').show();
+ $('kronolithCalendar' + type + 'UrlSub')
+ .writeAttribute('href', info.sub)
+ .update(info.sub.escapeHTML());
break;
case 'remote':
$('kronolithCalendarremoteUrl').setValue(calendar);
$code['conf']['tasks'] = $registry->tasks->ajaxDefaults();
}
+ $subscriptionCals = Horde::url($registry->get('webroot', 'horde') . ($GLOBALS['conf']['urls']['pretty'] == 'rewrite' ? '/rpc/kronolith/' : '/rpc.php/kronolith/'), true, -1);
+ $subscriptionTasks = Horde::url($registry->get('webroot', 'horde') . ($GLOBALS['conf']['urls']['pretty'] == 'rewrite' ? '/rpc/nag/' : '/rpc.php/nag/'), true, -1);
+
// Calendars
foreach (array(true, false) as $my) {
foreach ($GLOBALS['all_calendars'] as $id => $calendar) {
'show' => in_array($id, $GLOBALS['display_calendars']),
'perms' => $calendar->getPermission()->data,
'edit' => $calendar->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT),
+ 'sub' => $subscriptionCals . ($calendar->get('owner') ? $calendar->get('owner') : '-system-') . '/' . $calendar->getName() . '.ics',
+ 'feed' => (string)Kronolith::feedUrl($calendar->getName()),
'tg' => array_values($tagger->getTags($calendar->getName(), 'calendar')));
}
}
'bg' => self::backgroundColor($tasklist),
'show' => in_array('tasks/' . $id, $GLOBALS['display_external_calendars']),
'perms' => $tasklist->getPermission()->data,
- 'edit' => $tasklist->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT));
+ 'edit' => $tasklist->hasPermission(Horde_Auth::getAuth(), Horde_Perms::EDIT),
+ 'sub' => $subscriptionTasks . ($tasklist->get('owner') ? $tasklist->get('owner') : '-system-') . '/' . $tasklist->getName() . '.ics');
}
}
}
</label>
</div>
+<div id="kronolithCalendarinternalUrls" style="display:none">
+ <label><?php echo _("Subscription URL") ?></label>
+ <span class="kronolithSeparator">—</span>
+ <span class="kronolithDialogInfo"><?php echo _("To subscribe to this calendar from another calendar program, use this URL:") ?></span><br />
+ <a id="kronolithCalendarinternalUrlSub" href="#" target="_blank"></a><br />
+ <label><?php echo _("Feed URL") ?></label>
+ <span class="kronolithSeparator">—</span>
+ <span class="kronolithDialogInfo"><?php echo _("To subscribe to this calendar from a feed reader, use this URL:") ?></span><br />
+ <a id="kronolithCalendarinternalUrlFeed" href="#" target="_blank"></a><br />
+</div>
+
<div class="tabset">
<ul>
<li class="activeTab"><a href="#" class="kronolithTabLink" id="kronolithCalendarinternalLinkDescription"><?php echo _("Description") ?></a></li>
</label>
</div>
+<div id="kronolithCalendartasklistsUrls" style="display:none">
+ <label><?php echo _("Subscription URL") ?></label>
+ <span class="kronolithSeparator">—</span>
+ <span class="kronolithDialogInfo"><?php echo _("To subscribe to this taks list from another program, use this URL:") ?></span><br />
+ <a id="kronolithCalendartasklistsUrlSub" href="#" target="_blank"></a><br />
+</div>
+
<div class="tabset">
<ul>
<li class="activeTab"><a href="#" class="kronolithTabLink" id="kronolithCalendartasklistsLinkDescription"><?php echo _("Description") ?></a></li>
<?php endif; ?>
<p>
<?php echo $owner_name ? sprintf(_("Task List owned by %s."), $owner_name) : _("Task List owned by system.") ?>
- <?php echo _("To subscribe to this task list from another program, use this URL: ") ?>
+ <?php echo _("To subscribe to this task list from another program, use this URL:") ?>
</p>
<p class="tasklist-info-url">
<?php echo htmlspecialchars($subscribe_url) ?>