c5t / c5t / core / templates / calendar / event / get_all.mak

Full commit
<%inherit file="local:templates.master"/>
<%! from c5t.core.lib import helpers as h %>

<%def name="page_name()">calendars</%def>
<%! import calendar %>
<%! from datetime import date %>

<%def name="title()">${cal and 'Calendar: %s' % cal.title or 'All events'}</%def>

<%def name="head()">\
  <link rel='stylesheet' type='text/css' href='/css/fullcalendar.css' />
  <script type="text/javascript" src="/javascript/jquery/jquery.min.js"></script>
  <script type='text/javascript' src='/javascript/fullcalendar/fullcalendar.js'></script>
  <script type='text/javascript'>
  $(document).ready(function() {
      header: {
  			left: 'prev,next today',
  			center: 'title',
  			right: 'month,agendaWeek,agendaDay'
			events: "json"
%if page:
  ${page.text | n}
%if h.can_edit(page):
  %if cal:
    %if page:
      <a href="/cal${cal._id}/edit">[edit content]</a>
      <a href="/cal${cal._id}/new">[add content]</a>
    %if page:
      <a href="/events_content/edit">[edit content]</a>
      <a href="/events_content/new">[add content]</a>

%if cal and cal.text:
    <p>Description: ${cal.text}</p>

%if h.can_add(None):
<p><a href="new">Add Event</a></p>
<div id="calendar"></div>


%if cal:
  <a href="../edit">[edit]</a>
  <a href="../delete">[delete]</a>