source: indico/indico/MaKaC/webinterface/tpls/ConferenceICalExport.tpl @ 6f816f

hello-world-walkthroughipv6v0.98-seriesv0.98.2v0.98.3v0.99v1.0v1.1
Last change on this file since 6f816f was 6f816f, checked in by Alberto Resco Perez <alberto.resco.perez@…>, 15 months ago

[IMP] Small refactor of iCal export popup.

  • Use of template inheritance in order to not duplicate code.
  • Rewritten some text for being more friendly.
  • Property mode set to 100644
File size: 2.1 KB
Line 
1<%inherit file="ICalExportBase.tpl"/>
2<%block name="downloadText">${_('Download current event:')}</%block>
3<%block name="downloadTextFile">  ${_("Event calendar file")}</%block>
4<%block name="extraDownload">
5    <div class="iCalExportSection">
6         <a href='${ urlHandlers.UHConferenceToiCal.getURL(target, detailLevel = "contributions") }'>
7            <img src="${icsIconURL}" border="0" style="vertical-align: middle">
8             ${_("Detailed timetable calendar file")}
9         </a>
10    </div>
11</%block>
12<%block name="extraInfo">
13    <input type="checkbox" id="detailExport${target.getUniqueId()}"> ${("Detailed timetable")}
14</%block>
15
16<%block name="script">
17    <script type="text/javascript">
18    var setURLs = function(urls){
19        if($('#detailExport${self_._conf.getUniqueId()}')[0].checked){
20            $('#publicLink${self_._conf.getUniqueId()}').attr('value', urls["publicRequestAllURL"]);
21            $('#publicLink${self_._conf.getUniqueId()}').attr('title', urls["publicRequestAllURL"]);
22            $('#authLink${self_._conf.getUniqueId()}').attr('value', urls["authRequestAllURL"]);
23            $('#authLink${self_._conf.getUniqueId()}').attr('title', urls["authRequestAllURL"]);
24        }else{
25            $('#publicLink${self_._conf.getUniqueId()}').attr('value', urls["publicRequestTopURL"]);
26            $('#publicLink${self_._conf.getUniqueId()}').attr('title', urls["publicRequestTopURL"]);
27            $('#authLink${self_._conf.getUniqueId()}').attr('value', urls["authRequestTopURL"]);
28            $('#authLink${self_._conf.getUniqueId()}').attr('title', urls["authRequestTopURL"]);
29        }
30    }
31
32    exportPopups["${self_._conf.getUniqueId()}"] = new ExportIcalInterface(${apiMode}, ${persistentUserEnabled | n,j}, ${persistentAllowed | n,j}, ${apiActive | n,j}, ${userLogged | n,j}, setURLs, 'event.api.getExportURLs', {confId:"${self_._conf.getId()}"}, ${requestURLs | n,j}, "${self_._conf.getUniqueId()}");
33
34    $("body").delegate('#detailExport${self_._conf.getUniqueId()}', "click", function(e) {
35        setURLs(exportPopups["${self_._conf.getUniqueId()}"].getRequestURLs());
36    });
37
38    </script>
39</%block>
Note: See TracBrowser for help on using the repository browser.