charts.html 2.5 KB
Newer Older
1
2
3
4
{% extends 'layouts/base.html' %}

{% block title %}
SRCT Bookshare • Charts
Daniel W Bond's avatar
Daniel W Bond committed
5
{% endblock title %}
6
7
8
9
10
11
12

{% block content %}

{% load humanize %}

{% load trades_extras %}

13
14
15
16
{% load cache %}

{% cache 600 ChartsNotToolbar %}

17
18
19
20
21
22
23
24
25
26
27
28
<div class="page-header" id="banner">
  <div class="row">
    <div class="col-lg-12 text-center">
      <h1><strong>SRCT</strong>BOOKSHARE</h1>
      <p class="lead"><strong>Listing Charts</strong></p>
    </div>
  </div>
</div>

<div class="row">
  <div class="col-md-12 text-center">
  <p><h2>Featuring <strong>{{ total_bids|intcomma }} bids</strong> on <strong>{{ total_listings|intcomma }} listings</strong> from <strong>{{ total_students|intcomma }} students</strong> (so far).</h2></p>
Daniel W Bond's avatar
Daniel W Bond committed
29
  <p><h2>Total Proceeds: <strong>${{ total_proceeds|default_if_none:"0"|intcomma }}</strong></h2></p>
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
  </div>
</div>

<legend></legend>

<div class="row">
  <div class="col-md-6">
    <div class="panel panel-primary">
      <div class="panel-heading text-center">
        <h3><strong>Most Popular</strong></h3>
      </div>
      <div class="panel-body">
        <table class="table table-hover text-center">
          <thead>
            <tr>
              <td class="col-md-8"><h4><strong>Title</strong></h4></td>
              <td class="col-md-4"><h4><strong>Listings</strong></h4></td>
            </tr>
          </thead>
          <tbody>
          {% for isbn, occurrence in most_popular %}
            <tr>
              <td><h5><a href="/search/?q={{ isbn }}">{{ isbn|isbn_name|title }}</a></h5></td>
              <td><h5>{{ occurrence }}</h5></td>
            </tr>
          {% endfor %}
          </tbody>
        </table>
      </div>
    </div>
  </div>

  <div class="col-md-6">
    <div class="panel panel-primary">
      <div class="panel-heading text-center">
        <h3><strong>Highest-Grossing</strong></h3>
      </div>
      <div class="panel-body">
        <table class="table table-hover text-center">
          <thead>
            <tr>
              <td class="col-md-8"><h4><strong>Title</strong></h4></td>
              <td class="col-md-4"><h4><strong>Proceeds</strong></h4></td>
            </tr>
          </thead>
          <tbody>
          {% for isbn, total_sum in highest_grossing %}
            <tr>
              <td><h5><a href="/search/?q={{ isbn }}">{{ isbn|isbn_name|title }}</a></h5></td>
              <td><h5>${{ total_sum }}</h5></td>
            </tr>
          {% endfor %}
          </tbody>
        </table>
      </div>
    </div>
  </div>
</div>

89
90
{% endcache %}

Daniel W Bond's avatar
Daniel W Bond committed
91
{% endblock content %}