This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
tabellio.agenda/tabellio/agenda/folder_templates/view.pt

257 lines
12 KiB
XML

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en"
xmlns:tal="http://xml.zope.org/namespaces/tal"
xmlns:metal="http://xml.zope.org/namespaces/metal"
xmlns:i18n="http://xml.zope.org/namespaces/i18n"
lang="en"
metal:use-macro="context/main_template/macros/master"
i18n:domain="tabellio.agenda">
<body>
<metal:main fill-slot="main">
<tal:main-macro metal:define-macro="main"
tal:define="toLocalizedTime nocall:context/@@plone/toLocalizedTime;
updated view/update;
viewname view/viewname">
<div tal:replace="structure provider:plone.abovecontenttitle" />
<h1 tal:condition="view/has_view_switcher" class="documentFirstHeading">Agenda</h1>
<h1 tal:condition="not: view/has_view_switcher" class="documentFirstHeading" tal:content="context/title" />
<div tal:replace="structure provider:plone.belowcontenttitle" />
<div tal:replace="structure provider:plone.abovecontentbody" />
<div id="content-core" tal:condition="view/as_month">
<h2 tal:condition="view/has_view_switcher" tal:content="context/title" />
<div tal:condition="view/has_view_switcher" id="agenda-view-switcher">
<span>Calendrier</span> | <a tal:attributes="href string:list?navyear=${view/year}&navmonth=${view/month}#${view/todayanchor}">Liste</a>
</div>
<table class="ploneCalendar"
summary="Agenda"
id="tabellio-agenda"
i18n:domain="plone"
i18n:attributes="summary summary_calendar;">
<caption class="hiddenStructure"
tal:content="view/monthName">Month name</caption>
<thead>
<tr class="monthnames">
<td colspan="7">
<a href="#" rel="nofollow"
title="Previous month"
id="agenda-calendar-previous"
tal:define="prevMonthMonth view/prevMonthMonth;
prevMonthYear view/prevMonthYear"
tal:attributes="href string:${viewname}?navyear=${prevMonthYear}&navmonth=${prevMonthMonth}"
i18n:attributes="title title_previous_month;">&laquo;</a>
<span i18n:translate="" tal:omit-tag="">
<span i18n:name="monthname" i18n:translate=""
tal:content="view/monthName"
tal:omit-tag="">monthname</span>
<span i18n:name="year" i18n:translate="" tal:content="view/year" tal:omit-tag="">year</span>
</span>
<a href="#" rel="nofollow" title="Next month" id="agenda-calendar-next"
tal:define="nextMonthMonth view/nextMonthMonth;
nextMonthYear view/nextMonthYear"
tal:attributes="href string:${viewname}?navyear=${nextMonthYear}&navmonth=${nextMonthMonth}"
i18n:attributes="title title_next_month;">&raquo;</a>
</tr>
<tr class="weekdays"
><tal:data tal:repeat="weekday view/getWeekdays"
><th scope="col"
i18n:translate=""
tal:content="weekday">Su</th
></tal:data>
</tr>
</thead>
<tbody>
<tr tal:repeat="week view/getEventsForCalendar"
><tal:block repeat="day week"
><tal:day define="daynumber day/day;"
><tal:isday condition="daynumber"
><tal:block define="day_event day/event;
is_today day/is_today"
><td class="event"
tal:condition="day_event"
tal:attributes="class python:is_today and 'todayevent' or 'event'"
><span tal:attributes="class day/eventclass"><strong>
<a tal:condition="python: day['eventclass'] == 'misc' or len(day['eventslist']) > 1"
href=""
tal:attributes="href string:#d-${view/year}-${view/month}-${daynumber};
title day/eventstring;"
tal:content="daynumber">31</a
><a tal:condition="python: day['eventclass'] != 'misc' and len(day['eventslist']) <= 1"
href=""
tal:attributes="href string:#event-${day/eventid};
title day/eventstring;"
tal:content="daynumber">31</a
></strong></span></td
><tal:notdayevent tal:condition="not: day_event"
><td tal:condition="python:is_today"
class="todaynoevent"><strong
tal:content="daynumber">31</strong></td
><td tal:condition="python:not is_today"
tal:content="daynumber">31</td
></tal:notdayevent
></tal:block
></tal:isday
><tal:notisday condition="not: daynumber"
><td></td
></tal:notisday
></tal:day
></tal:block>
</tr>
</tbody>
</table>
<div id="agenda-legend">
<ul>
<li class="parlevent" tal:condition="python: 'parl' in view.shown_events()">Séances plénières</li>
<li class="comevent" tal:condition="python: 'com' in view.shown_events()">Commissions</li>
<li class="event" tal:condition="python: 'gen' in view.shown_events()">Activités</li>
<li class="misc">Événements multiples</li>
</ul>
</div>
<div id="month-events">
<div tal:repeat="event view/getMonthEvents" style="display: none;"
tal:attributes="id string:event-${event/id};
class string:d-${event/start/year}-${event/start/month}-${event/start/day}">
<h3><span tal:content="event/longdatetime"/> <span tal:content="event/title"/></h3>
<p tal:condition="event/place" class="place" tal:content="event/place"></p>
<a href="#" class="event-details" tal:attributes="href event/absolute_url">Détail de l'événement</a>
<span class="closediv"/>
</div>
</div>
<script type="text/javascript">
jq('#tabellio-agenda tbody a').click(
function(event) {
if (this.href.indexOf('#d-') != -1) {
/* multiple events */
eventdiv = jq('.'+this.href.split('#')[1]);
} else {
eventdiv = jq('#'+this.href.split('#')[1]);
}
if (eventdiv.css('display') != 'none') {
eventdiv.fadeOut();
return false;
}
jq('#month-events div').hide();
eventdiv.click(function(event){jq(this).hide();});
var boxtop = 6+jq(this).position().top;
eventdiv.css('position', 'absolute').each(function(idx, elem) {
$(elem).css('top', boxtop);
boxtop += $(elem).height() + 40;
}).css('left', 6+jq(this).position().left).fadeIn()
return false;
});
</script>
</div> <!-- not:view/as_list -->
<div id="content-core" tal:condition="python: view.as_list() or view.as_seances()">
<h2 tal:condition="view/has_view_switcher" tal:content="context/title" />
<div tal:condition="view/has_view_switcher" id="agenda-view-switcher">
<a tal:attributes="href string:?navyear=${view/year}&navmonth=${view/month}">Calendrier</a> | <span>Liste</span>
</div>
<div id="events-list-header">
<div class="nav-list-month">
<a href="#" rel="nofollow"
title="Previous month"
id="agenda-calendar-previous"
class="agenda-calendar-previous"
tal:define="prevMonthMonth view/prevMonthMonth;
prevMonthYear view/prevMonthYear"
tal:attributes="href string:${viewname}?navyear=${prevMonthYear}&navmonth=${prevMonthMonth}"
i18n:attributes="title title_previous_month;">&laquo;</a>
<span i18n:translate="" tal:omit-tag="">
<span i18n:name="monthname" i18n:translate=""
tal:content="view/monthName"
tal:omit-tag="">monthname</span>
<span i18n:name="year" i18n:translate="" tal:content="view/year" tal:omit-tag="">year</span>
</span>
<a href="#" rel="nofollow" title="Next month" id="agenda-calendar-next"
class="agenda-calendar-next"
tal:define="nextMonthMonth view/nextMonthMonth;
nextMonthYear view/nextMonthYear"
tal:attributes="href string:${viewname}?navyear=${nextMonthYear}&navmonth=${nextMonthMonth}"
i18n:attributes="title title_next_month;">&raquo;</a>
</div>
<div id="agenda-legend">
<ul>
<li class="parlevent" tal:condition="python: 'parl' in view.shown_events()">Séances plénières</li>
<li class="comevent" tal:condition="python: 'com' in view.shown_events()">Commissions</li>
<li class="event" tal:condition="python: 'gen' in view.shown_events()">Activités</li>
</ul>
</div>
</div>
<ul id="events-ul-list" tal:condition="view/as_list">
<li tal:repeat="event view/getMonthEventsWithRepetition"
tal:attributes="id string:event-${event/id};
class string:${event/klass} ${event/todayclass}">
<div tal:attributes="id string:d${event/start/year}-${event/start/month}-${event/start/day}">
<p class="date"><span tal:content="event/longdatetime"/>
<br/><span tal:condition="event/place" class="place" tal:content="event/place"></span>
</p>
<div class="event-data">
<h3><span class="event-type-square"></span><span tal:replace="event/title"/></h3>
<p class="description" tal:condition="event/description" tal:content="event/description"></p>
<p class="details"><a href="#" tal:attributes="href event/absolute_url">Détails</a></p>
</div>
</div>
</li>
</ul>
<ul id="events-table-seances" tal:condition="view/as_seances">
<li tal:repeat="event view/getMonthEvents"
tal:attributes="id string:event-${event/id};
class event/klass">
<div>
<p class="date"><a tal:attributes="href event/absolute_url"><span tal:content="event/shortdatetime"/></a></p>
<div tal:define="stream_url event/get_stream_url">
<a tal:condition="stream_url" tal:attributes="href stream_url" class="streaming">Streaming</a>
<span tal:condition="not: stream_url" class="streaming">Streaming</span>
<a class="cri" tal:condition="python: event.cri and event.cri.to_object" href="#"
tal:attributes="href event/cri/to_object/absolute_url">Compte-rendu intégral</a>
<span class="cri" tal:condition="python: not (event.cri and event.cri.to_object)"
>Compte-rendu intégral</span>
</div>
</div>
</li>
</ul>
<script>
$('a.streaming').click(function(event) {
if ($(this).attr('href').indexOf('.m3u') == -1) {
window.open($(this).attr('href'), 'streaming', 'width=220,height=220');
event.preventDefault();
}
});
</script>
</div>
<div tal:replace="structure provider:plone.belowcontentbody" />
</tal:main-macro>
</metal:main>
</body>
</html>