Mercurial > public > sg101
annotate gpp/templates/gcalendar/google_sync.html @ 505:a5d11471d031
Refactor the logic in the rate limiter decorator. Check to see if the request was ajax, as the ajax view always returns 200. Have to decode the JSON response to see if an error occurred or not.
author | Brian Neal <bgneal@gmail.com> |
---|---|
date | Sat, 03 Dec 2011 19:13:38 +0000 |
parents | bba1782992eb |
children |
rev | line source |
---|---|
gremmie@1 | 1 {% extends 'admin/base_site.html' %} |
bgneal@458 | 2 {% load url from future %} |
bgneal@458 | 3 {% load core_tags %} |
gremmie@1 | 4 {% block title %}Sync Events w/Google Calendar{% endblock %} |
gremmie@1 | 5 {% block breadcrumbs %} |
gremmie@1 | 6 <div class="breadcrumbs"> |
gremmie@1 | 7 <a href="../../../">Home</a> › |
gremmie@1 | 8 <a href="../../">Gcalendar</a> › |
gremmie@1 | 9 <a href="../">Events</a> › Google Sync |
gremmie@1 | 10 </div> |
gremmie@1 | 11 {% endblock %} |
gremmie@1 | 12 {% block content %} |
gremmie@1 | 13 <h1>Synchronize Approved Events with Google Calendar</h1> |
bgneal@69 | 14 {% if err_msg %} |
gremmie@1 | 15 <ul class="errorlist"> |
bgneal@69 | 16 <li>{{ err_msg }}</li> |
gremmie@1 | 17 </ul> |
gremmie@1 | 18 {% endif %} |
bgneal@458 | 19 |
bgneal@458 | 20 <p>Access token status: {% bool_icon access_token %} — <a href="{% url 'admin:gcalendar-fetch_auth' %}">Request new access token</a></p> |
bgneal@458 | 21 |
gremmie@1 | 22 {% if events %} |
bgneal@458 | 23 <p>The following pending events have been approved and are ready to be synchronized with the Google calendar.</p> |
gremmie@1 | 24 <ol> |
gremmie@1 | 25 {% for event in events %} |
gremmie@1 | 26 {% if not event.on_calendar %} |
bgneal@464 | 27 <li><a href="../{{ event.id }}">{{ event.start_date|date:"M d, Y" }} - {{ event.what }}</a> |
gremmie@1 | 28 • Submitted by {{ event.user.username }} • <strong>{{ event.get_status_display }}</strong></li> |
gremmie@1 | 29 {% endif %} |
gremmie@1 | 30 {% endfor %} |
gremmie@1 | 31 </ol> |
bgneal@458 | 32 |
bgneal@458 | 33 {% if access_token %} |
bgneal@194 | 34 <form action="." method="POST">{% csrf_token %} |
bgneal@458 | 35 <p><input type="submit" name="synchronize" value="Synchronize Events" /></p> |
gremmie@1 | 36 </form> |
bgneal@458 | 37 {% endif %} |
gremmie@1 | 38 {% else %} |
gremmie@1 | 39 <p>No events to synchronize at this time.</p> |
gremmie@1 | 40 {% endif %} |
gremmie@1 | 41 {% endblock %} |