zulip/templates/zephyr/activity.html
Scott Feeney 2c33320746 Reuse minified JS from previous deploys
This is a big change affecting lots of areas:

* Pipeline no longer deals with JS (though it still minifies CSS)
* A new script, tools/minify-js (called from update-prod-static),
  minifies JavaScripts
* A command-line argument --prev-deploy, if passed to minify-js or
  update-prod-static, is used to copy minified JS from a previous
  deploy (i.e., a previous git checkout), if the source files have
  not changed
* update-deployment passes --prev-deploy
* Scripts are now included with the minified_js template tag, rather
  than Pipeline's compressed_js

Also, as a side benefit of this commit, our Handlebars templates will
no longer be copied into prod-static/ and accessible in production.

Unminification is probably broken, but, per Zev and Trac ticket #1377,
it wasn't working perfectly before this change either.

(Based on code review, this commit has been revised to:
 * Warn if git returns an error in minify-js
 * Add missing output redirects in update-prod-static
 * Use DEPLOY_ROOT instead of manually constructing that directory
 * Use old style formatting)

(imported from commit e67722ea252756db8519d5c0bd6a421d59374185)
2013-07-12 11:59:04 -04:00

69 lines
1.9 KiB
HTML

{% extends "zephyr/base.html" %}
{% load compressed %}
{% load minified_js %}
{# User Activity. #}
{% block customhead %}
{{ block.super }}
{% minified_js 'activity' %}
{% compressed_css 'activity' %}
{% endblock %}
{% block content %}
<ul class="nav nav-tabs">
{% for name, activity in data.iteritems %}
<li {% if activity.default_tab %} class="active" {% endif %}>
<a href="#{{ name }}" data-toggle="tab">{{ name }}</a>
</li>
{% endfor %}
</ul>
<div class="tab-content">
{% for name, activity in data.iteritems %}
<div class="tab-pane {% if activity.default_tab %} active {% endif %}" id="{{ name }}">
<h2>{{ name }} usage</h2>
<table class="table sortable table-striped table-bordered">
<thead class="activity_head">
<tr>
<th>Name</th>
<th>Email</th>
<th>Realm</th>
<th>Last send_message</th>
<th>Messages sent</th>
{% if activity.has_pointer %}
<th>Last update_pointer</th>
<th>Pointer updates</th>
{% endif %}
<th>Last get_updates</th>
</tr>
</thead>
<tbody>
{% for email, row in activity.sorted_rows %}
<tr class="{{ row.class }}">
<td><strong>{{ row.full_name }}</strong></td>
<td><strong>{{ row.email }}</strong></td>
<td><strong>{{ row.realm }}</strong></td>
<td sorttable_customkey="{{ row.send_message_last|date:'YmdHi' }}">{{ row.send_message_last|date:"M d, H:i" }}</td>
<td class="number">{{ row.send_message_count }}</td>
{% if activity.has_pointer %}
<td sorttable_customkey="{{ row.update_pointer_last|date:'YmdHi' }}">{{ row.update_pointer_last|date:"M d, H:i" }}</td>
<td class="number">{{ row.update_pointer_count }}</td>
{% endif %}
<td sorttable_customkey="{{ row.get_updates_last|date:'YmdHi' }}">{{ row.get_updates_last|date:"M d, H:i" }}</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endfor %}
</div>
{% endblock %}