source: indico/indico/MaKaC/webinterface/tpls/ConfModAbstractBook.tpl @ 2f7eeb

hello-world-walkthroughipv6v0.98-seriesv0.98.2v0.98.3v0.99v1.0v1.1
Last change on this file since 2f7eeb was 2f7eeb, checked in by Pedro Ferreira <jose.pedro.ferreira@…>, 15 months ago

[FIX] BOA - caching - add option to disable/dirty

  • Property mode set to 100644
File size: 4.7 KB
Line 
1<div style="padding:20px 0px">
2
3<a href="${urlHandlers.UHConfAbstractBook.getURL(conf)}">${_("Download book of abstracts")}</a>
4
5<div style="margin-top: 10px;">
6% if bookOfAbstractsActive:
7    % if bookOfAbstractsMenuActive:
8        ${ _("Users will be able to download the book from the <a href='%s'>event home page</a>. You can disable the download from the <a href='%s'>Layout->Menu</a> configuration page.") % (urlHandlers.UHConferenceDisplay.getURL(conf), urlHandlers.UHConfModifDisplayMenu.getURL(conf))}
9    % else:
10        ${ _("Note that you need to enable the book of abstracts link in <a href='%s'>Layout->Menu</a>") % urlHandlers.UHConfModifDisplayMenu.getURL(conf) }.
11    % endif
12% else:
13    ${ _("Note that you need to enable call for abstracts if you wish to provide a link in the <a href='%s'>event home page</a> menu, so users can download your book of abstracts")% urlHandlers.UHConferenceDisplay.getURL(conf) }.
14% endif
15</div>
16</div>
17
18<div class="groupTitle">${ _("Customisation")}</div>
19<table width="90%" align="center" border="0">
20    <tr>
21        <td class="dataCaptionTD"><span class="dataCaptionFormat"> ${ _("Additional text")}</span></td>
22        <td>
23            <div class="blacktext" id="inPlaceEditAdditionalText">${ boaConfig.getText() }</div>
24        </td>
25    </tr>
26    <tr>
27        <td class="dataCaptionTD"><span class="dataCaptionFormat"> ${ _("Sort by")}</span></td>
28        <td class="blacktext" width="100%">
29            <div id="inPlaceEditSortBy" style="display:inline"></div>
30        </td>
31    </tr>
32    <tr>
33        <td class="dataCaptionTD">
34            <span class="dataCaptionFormat"> ${ _("Miscellaneous options")}</span><br/><br/>
35            <img src="${Config.getInstance().getSystemIconURL( 'enabledSection' )}" alt="${ _("Click to disable")}"> <small> ${ _("Enabled option")}</small>
36            <br />
37            <img src="${Config.getInstance().getSystemIconURL( 'disabledSection' )}" alt="${ _("Click to enable")}"> <small> ${ _("Disabled option")}</small>
38            <br />
39        </td>
40        <td bgcolor="white" width="100%" class="blacktext">
41            % if boaConfig.getShowIds():
42                <% icon = str(Config.getInstance().getSystemIconURL( "enabledSection" )) %>
43            % else:
44                <% icon = str(Config.getInstance().getSystemIconURL( "disabledSection" )) %>
45            % endif
46            <a href="${urlToogleShowIds}"><img src="${icon}"> ${_("Show Abstract IDs")}</a> ${_("(Table of Contents)")}
47            <br/>
48        </td>
49    </tr>
50</table>
51<div class="groupTitle">${ _("Caching")}</div>
52
53<table style="width: 50%;">
54  <tr>
55    <td class="dataCaptionTD dataCaptionFormat">
56      ${_("Cache book of abstracts")}
57    </td>
58    <td>
59      <input type="checkbox" id="cacheToggle" ${'checked="checked"' if boaConfig.isCacheEnabled() else ''}/>
60    </td>
61  </tr>
62  <tr>
63    <td></td>
64    <td><button id="cacheRefresh"">${_("Force cache refresh")}</button></td>
65  </tr>
66</table>
67
68<script type="text/javascript">
69
70$(function() {
71    <%  from MaKaC.common import info %>
72        $E('inPlaceEditAdditionalText').set(new RichTextInlineEditWidget('abstract.abstractsbook.changeAdditionalText', ${ jsonEncode(dict(conference="%s"%conf.getId())) }, ${ boaConfig.getText() | n,j }, 300, 45, "${_('No additional text')}").draw());
73    new IndicoUI.Widgets.Generic.selectionField($E('inPlaceEditSortBy'), 'abstract.abstractsbook.changeSortBy', ${dict(conference="%s"%conf.getId())}, ${sortByList|n,j}, '${sortBy}');
74
75    $('#cacheToggle').click(function(){
76        indicoRequest('abstract.abstractsbook.toggleCache',
77                      {conference: '${conf.getId()}'},
78                      function(result, error) {
79                          if (error) {
80                              IndicoUtil.errorReport(error);
81                          } else {
82                              $('.savedText').remove();
83                              $('#cacheToggle').after($('<span/>').text($T('Saved')).
84                                                      addClass('savedText').delay(1000).fadeOut('fast'));
85                          }
86                      });
87    });
88    $('#cacheRefresh').click(function() {
89        var self = this;
90        indicoRequest('abstract.abstractsbook.dirtyCache',
91                      {conference: '${conf.getId()}'},
92                      function(result, error) {
93                          if (error) {
94                              IndicoUtil.errorReport(error);
95                          } else {
96                              $('#cacheRefresh').after($('<span/>').text($T('Done')).
97                                                       addClass('savedText').delay(1000).fadeOut('fast'));
98                          }
99                      });
100    });
101});
102</script>
Note: See TracBrowser for help on using the repository browser.