/feed/calendar/NzbDrone.ics or through the calendar page.pull/4/head
parent
7445adb455
commit
cf1e0a4946
@ -0,0 +1,16 @@
|
|||||||
|
'use strict';
|
||||||
|
define(
|
||||||
|
[
|
||||||
|
'marionette',
|
||||||
|
], function (Marionette) {
|
||||||
|
return Marionette.Layout.extend({
|
||||||
|
template: 'Calendar/CalendarFeedViewTemplate',
|
||||||
|
|
||||||
|
onRender: function() {
|
||||||
|
// hackish way to determine the correct url, as using urlBase seems to only work for reverse proxies or so
|
||||||
|
var ics = '//' + window.location.host + '/feed/calendar/NzbDrone.ics';
|
||||||
|
this.$('#ical-url').val(window.location.protocol + ics);
|
||||||
|
this.$('#ical-subscribe-button').attr('href', 'webcal:' + ics);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
@ -0,0 +1,26 @@
|
|||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
|
||||||
|
<h3>NzbDrone Calendar feed</h3>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body edit-series-modal">
|
||||||
|
<div class="row">
|
||||||
|
<div>
|
||||||
|
<div class="form-horizontal">
|
||||||
|
<div class="control-group">
|
||||||
|
<label class="control-label" for="ical-url">iCal feed</label>
|
||||||
|
|
||||||
|
<div class="controls">
|
||||||
|
<input type="text" id="ical-url" class="x-ical-url" value="/feed/calendar/NzbDrone.ics" name="ical-url">
|
||||||
|
<span class="help-inline">
|
||||||
|
<i class="icon-nd-form-info" title="copy this url into your clients subscription form or use the subscribe now link if you have a webcal protocol handler installed"/>
|
||||||
|
</span>
|
||||||
|
or <a href="webcal:///feed/calendar/NzbDrone.ics" id="ical-subscribe-button">subscribe now!</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<button class="btn" data-dismiss="modal">close</button>
|
||||||
|
</div>
|
Loading…
Reference in new issue