{% load static %}<html>
  <head>
    <title>Events</title>
    <link rel="stylesheet" type="text/css" href="{% static "css/table.css" %}" />
    <style type="text/css">
    body {
        font-family: sans-serif;
        font-size: 16px;
        margin: 50px;
        max-width: 1200px;
    }
    </style>


    </head>
    <body>
        <div id="title" style="text-align:center">
            <h1>graphite events</h1>
        </div>
        <div class="graphite">
            <div id="main" >
              {% if events %}
                <table class="styledtable" width=100%>
                  <tr><th>when</th><th>what</th><th>tags</th></tr>
                  {% for event in events %}
                      <tr>
                          <td>{{event.when|date:"H:i:s D d M Y" }}</td>
                          <td><a href="{% url "events_detail" event.id %}">{{event.what}}</a></td>
                          <td>[&#39;{{ event.tags|join:"&#39;, &#39;"}}&#39;]</td>
                      </tr>
                  {% endfor %}
              {% else %}
                <br/>No events. Add events using
                <a href="{% url "admin:events_event_add" %}">the admin interface</a> or by posting
                (eg, curl -X POST {{ protocol }}://{{ site.domain }}{% url "events" %} -d
                '{"what": "Something Interesting", "tags" : "tag1"}')
              {% endif %}
              </table>
            </div>
        </div>
    </body>
</html>
