view src/ltpdarepo/templates/activity.html @ 230:5c5f6d93d9d4

Add hg revision id to version string for dev builds.
author Daniele Nicolodi <daniele@grinta.net>
date Wed, 30 Nov 2011 09:41:29 +0100
parents 397404473430
children
line wrap: on
line source

{% extends "layout.html" %}
{% block title %}{{ database.id }}{% endblock %}
{% block body %}
<h2>Database &#x00AB;{{ database.id }}&#x00BB;</h2>
<p>{{ database.description }}</p>
<p>&nbsp;</p>

<div class="pagination wrapper">
  <div class="count">
    {% if span == 'MONTH' %}
    {% set frmt = '%d' %}
    <span>{{ curr.strftime('%B %Y') }}</span>
    {% else %}
    {% set frmt = '%H' %}
    <span>{{ curr.strftime('%A %d %B %Y') }}</span>
    <a href="{{ url_for('browse.activity', database=database.id, when=curr.strftime('%Y-%m')) }}">view month</a>
    {% endif %}
  </div>
  <div class="monthes">
    <a href="{{ url_for('browse.activity', database=database.id, when=prev) }}">prev</a>
    <a href="{{ url_for('browse.activity', database=database.id, when=next) }}">next</a>
    <a href="{{ url_for('browse.activity', database=database.id) }}">today</a>
  </div>
</div>
<div class="activity" style="">
  <table>
    <tr>
      {% for when, num in activity %}
      {% set height = num * 300 / nmax %}
      <td class="bars" style="height: 300px;">
        <span>{{ num }}</span><a href="{{ url_for('browse.activity', database=database.id, when=when.strftime('%Y-%m-%d')) }}" style="height: {{height}}px;"></a>
      </td>
      {% endfor %}
    </tr>
    <tr>
      {% for when, num in activity %}
      {% set url = url_for('browse.query', database=database.id, field=('submitted', 'submitted'), operator=('>', '<'), value=(when, when + dt)) %}
      <td><a class="day" href="{{ url }}">{{ when.strftime(frmt) }}</a></td>
      {% endfor %}
    </tr>
  </table>
</div>
{% endblock %}