aboutsummaryrefslogtreecommitdiff
path: root/pyaggr3g470r/templates/history.html
diff options
context:
space:
mode:
authorCédric Bonhomme <cedric@cedricbonhomme.org>2015-03-15 23:59:14 +0100
committerCédric Bonhomme <cedric@cedricbonhomme.org>2015-03-15 23:59:14 +0100
commitfb5df6041fc7bf97429bfe689e26fdc08e7e307f (patch)
tree6a9f6f39a2b0c8c7e3ca353ae6b624cfab5b312b /pyaggr3g470r/templates/history.html
parentpylint check (diff)
downloadnewspipe-fb5df6041fc7bf97429bfe689e26fdc08e7e307f.tar.gz
newspipe-fb5df6041fc7bf97429bfe689e26fdc08e7e307f.tar.bz2
newspipe-fb5df6041fc7bf97429bfe689e26fdc08e7e307f.zip
A new test for the history page.
Diffstat (limited to 'pyaggr3g470r/templates/history.html')
-rw-r--r--pyaggr3g470r/templates/history.html89
1 files changed, 17 insertions, 72 deletions
diff --git a/pyaggr3g470r/templates/history.html b/pyaggr3g470r/templates/history.html
index 0194cb89..6216f616 100644
--- a/pyaggr3g470r/templates/history.html
+++ b/pyaggr3g470r/templates/history.html
@@ -1,74 +1,19 @@
- {% extends "layout.html" %}
- {% block head %}
-{{ super() }}
-<script type="text/javascript" src="http://d3js.org/d3.v3.min.js"></script>
-<style type="text/css">
-rect {
- fill: purple ;
- padding: 7px;
- margin: 2px;
- color: white;
- }
-rect:hover
- {
- opacity : 0.5;
- }
-</style>
-{% endblock %}
-
+{% extends "layout.html" %}
{% block content %}
<div class="container">
-<h1>History</h1>
-<div align="center" id="pie_chart">
- <div class="chart">
- </div>
-
-
-<script type="text/javascript">
-function createGraph(dataset, w, h) {
- var barPadding = 1;
-
- //Create SVG element
- var svg = d3.select("#pie_chart .chart")
- .append("svg")
- .attr("width", w)
- .attr("height", h);
-
- svg.selectAll("rect")
- .data(dataset)
- .enter()
- .append("rect")
- .on("click", clickEvent)
- .attr("x", function(d, i) {
- return i * (w / dataset.length);
- })
- .attr("y", function(d) {
- return h - (d * 4);
- })
- .attr("width", w / dataset.length - barPadding)
- .attr("height", function(d) {
- return d * 4;
- });
-}
-
-function clickEvent(d){
- //var op = prompt("Please enter the value", "");
- alert(d);
-
-};
-
-
-
-var w = 800;
-var h = 100;
-var dataset = [ 12, 10, 13, 19, 21, 25, 22, 18, 15, 13,
- 11, 12, 15, 20, 18, 17, 16, 18, 23, 25 ];
-
-createGraph(dataset, w, h);
-
-
-</script>
-
-
-</div>
-{% endblock %} \ No newline at end of file
+ <h1>{{ _('History') }}</h1>
+ <ul class="list-group">
+ {% for article in articles_counter %}
+ {% if year == None %}
+ <li class="list-group-item"><a href="/history/{{ article }}">{{ article }}</a> : {{ articles_counter[article] }} articles</li>
+ {% elif month == None %}
+ <li class="list-group-item"><a href="/history/{{ year }}/{{ article }}">{{ article }}</a> : {{ articles_counter[article] }} articles</li>
+ {% else %}
+ {% for article in articles %}
+ <li class="list-group-item"><a href="/article/{{ article.id }}">{{ article.title | safe }}</a></li>
+ {% endfor %}
+ {% endif %}
+ {% endfor %}
+ </ul>
+</div><!-- /.container -->
+{% endblock %}
bgstack15