Commits

Frederic De Groef committed bb1143b

show the content provider name on every view. Show the link to graphs page on the main content provider page

  • Participants
  • Parent commits c0d8669
  • Tags v0.4.2

Comments (0)

Files changed (5)

provider/templates/source_all_days.html

 
 {% block content %}
 
-    <h3>These are all the dates for which we stored articles.</h3>
-    <br/>
+    <h1><strong>{{ source_name }}</strong></h1>
+
+    <h3>Here are a bunch of <a href='/source/{{ source_name }}/graphs'>scientific graphs</a> about this content provider.</h3>
+
+    <h3>And below are all the dates for which we stored articles.</h3>
     <div class="box">
         <ul>
         {% for day in all_days %}

provider/templates/source_batch.html

 {% endblock %}
 
 
-
 {% block content %}
-
+    <h1><strong>{{ source_name }}</strong></h1>
     <h3>This is the detailed view of everything we stored for every article we encounter.</h3>
 
     {% for article  in articles %}

provider/templates/source_day.html

 
 
 {% block content %}
+    <h1><strong>{{ source_name }}</strong></h1>
     <h3> These are the stories fetched on {{ current_date|date:'F d, Y' }}.</h3>
 
     <div id="span-15">

provider/templates/source_graphs.html

 
 
 {% block content %}
-    <h3>These are some graphs.
+    <h1><strong>{{ source_name }}</strong></h1>
+    <h3>See? Graphs.
     One day they might even provide useful insight.</h3>
 
     <div class='graph'>

provider/views.py

             if batch_string in available_batches:
                 values = base_template.load_all_common_values(STATIC_DATA_PATH)
                 articles = jsondb.get_articles_from_batch(STATIC_DATA_PATH, source_name, date_string, batch_string)
-                values.update({'articles':articles})
+                values.update({'articles':articles, 'source_name':source_name})
                 t = loader.get_template('source_batch.html')
                 c = Context(values)
                 return HttpResponse(t.render(c))