view gpp/templates/gcalendar/google_sync.html @ 467:b910cc1460c8

Add the ability to conditionally add model instances to the search index on update. This is not perfect, as some instances should be deleted from the index if they are updated such that they should not be in the index anymore. Will think about and address that later.
author Brian Neal <bgneal@gmail.com>
date Sun, 24 Jul 2011 18:12:20 +0000
parents bba1782992eb
children
line wrap: on
line source
{% extends 'admin/base_site.html' %}
{% load url from future %}
{% load core_tags %}
{% block title %}Sync Events w/Google Calendar{% endblock %}
{% block breadcrumbs %}
<div class="breadcrumbs">
   <a href="../../../">Home</a> &rsaquo;
   <a href="../../">Gcalendar</a> &rsaquo; 
   <a href="../">Events</a> &rsaquo; Google Sync
</div>
{% endblock %}
{% block content %}
<h1>Synchronize Approved Events with Google Calendar</h1>
{% if err_msg %}
<ul class="errorlist">
   <li>{{ err_msg }}</li>
</ul>
{% endif %}

<p>Access token status: {% bool_icon access_token %} &mdash; <a href="{% url 'admin:gcalendar-fetch_auth' %}">Request new access token</a></p>

{% if events %}
<p>The following pending events have been approved and are ready to be synchronized with the Google calendar.</p>
<ol>
{% for event in events %}
{% if not event.on_calendar %}
<li><a href="../{{ event.id }}">{{ event.start_date|date:"M d, Y" }} - {{ event.what }}</a>
&bull; Submitted by {{ event.user.username }} &bull; <strong>{{ event.get_status_display }}</strong></li>
{% endif %}
{% endfor %}
</ol>

{% if access_token %}
<form action="." method="POST">{% csrf_token %}
   <p><input type="submit" name="synchronize" value="Synchronize Events" /></p>
</form>
{% endif %}
{% else %}
<p>No events to synchronize at this time.</p>
{% endif %}
{% endblock %}