From 99740df66c6fe4cd8056d01afe48c2d56c222b19 Mon Sep 17 00:00:00 2001 From: tshedor Date: Sat, 18 Feb 2012 17:26:58 -0600 Subject: [PATCH] Added special report to headline...unless that's depreciated? Deleted newsitem detail info because HTML tables are whack and moving it to a line underneath the title is more familiar to user. Much mobile compatibility added. Switched layout columns. Added info about implementing Disqus comments. --- ebpub/ebpub/templates/db/newsitem_detail.html | 173 +++++++++++------- 1 file changed, 103 insertions(+), 70 deletions(-) diff --git a/ebpub/ebpub/templates/db/newsitem_detail.html b/ebpub/ebpub/templates/db/newsitem_detail.html index a03452d3..936302dc 100644 --- a/ebpub/ebpub/templates/db/newsitem_detail.html +++ b/ebpub/ebpub/templates/db/newsitem_detail.html @@ -7,25 +7,11 @@ {% block content %}
-

{{ newsitem.title }}{% block extra_title %}{% endblock %}

+
+
+

{% if newsitem.schema.is_special_report %}Special report: {% endif %}{{ newsitem.title }}{% block extra_title %}{% endblock %}

{% block newsitem_detail_summary %}{% endblock %} -
- - {% include "richmaps/richmap.html" %} -
- {% block flagging %} {% if allow_flagging %} @@ -53,49 +39,40 @@

{{ newsitem.title }}{% block extra_title %}{% endblock %}

{% endif %} {% endblock flagging %} - - - - - - {% block newsitem_detail_date %} - - - - - {% endblock newsitem_detail_date %} - {% block newsitem_detail_description %} - - - - - {% endblock newsitem_detail_description %} - {% block newsitem_detail_image_list %} - {% for image in images %} - - - - - {% endfor %} - {% endblock %} - {% block newsitem_detail_attribute_list %} +
+
+
+ {% block newsitem_detail_date %} + + {{ newsitem.item_date|date:"F j, Y" }} + {% endblock %} +  |  + + {% if location_url %} + + {% endif %} + + {{newsitem.location_name|default:"unknown"}} + + {% if location_url %} + + + {% endif %} + + {% if not newsitem.location %} + This location couldn't be mapped. + {% endif %} +  |  + + {% if newsitem.url %} + Discover more + {% endif %} +
+
+
+ {% block newsitem_detail_attribute_list %} {% for attribute in attribute_list %} -
- - - {% endfor %} - {% endblock newsitem_detail_attribute_list %} -
Location - {% if location_url %}{% endif %} - {{newsitem.location_name|default:"unknown"}} - {% if location_url %}{% endif %} - {% if not newsitem.location %}

This location couldn't be mapped.

{% endif %} -
{{ newsitem.schema.date_name|capfirst }}{{ newsitem.item_date|date:"F j, Y" }}
Description{{ newsitem.description|truncatewords_html:20}} - {% if newsitem.url %} -
Read more at {{newsitem.url}} - {% endif %} -
Image {{ forloop.counter }} - -
- {{ attribute.sf.smart_pretty_name|capfirst }} - + {{ attribute.sf.smart_pretty_name|capfirst }}: {% if attribute.value_list %} {% for value in attribute.value_list %} {% if value.url %} @@ -103,18 +80,41 @@

{{ newsitem.title }}{% block extra_title %}{% endblock %}

{% else %} {{ value.value }} {% endif %} - {% if value.description %}

{{ value.description|safe }}

{% endif %} - {% if not forloop.last %}{% if not value.description %}
{% endif %}{% endif %} + {% if value.description %}{{ value.description|safe }}{% endif %} |  + {% if not forloop.last %}{% if not value.description %}{% endif %}{% endif %} {% endfor %} {% else %} None {% endif %} -
+ {% endblock newsitem_detail_attribute_list %} +
+
+ {% block newsitem_detail_description %} + {% if newsitem.schema.slug == "photos" %} + {% for attribute in attribute_list %} + {% if attribute.sf.smart_pretty_name|capfirst == "Thumbnail URL" %} + {% for value in attribute.value_list %} + + + + {% endfor %} + {% else %} + {% endif %} + {% endfor %} + {{ newsitem.description }} + {% else %} + + {{ newsitem.description }} + {% endif %} + {% endblock %} +
+ + + +
+ {% block extracontent %} {% endblock %} @@ -137,7 +137,24 @@

{{comment_count}} Comments

{% endfor %}
- + {% comment %} + +
+ + + {% endcomment %} + + {% block item_comments %} {% if request.user.is_authenticated %}

Add a Comment

{% get_comment_form for newsitem as form %} @@ -166,13 +183,29 @@

Add a Comment

{% endif %} {% endif %} {% endblock %} - + +
+
+ + {% include "richmaps/richmap.html" %} +
{% block similaritems %} {% if not newsitem.schema.is_special_report %} {% if locations_within %} -

Other {{ newsitem.schema.plural_name }} nearby

-
    +

    Related

    +
      {% for location in locations_within %}
    • {{ location.name }}
    • {% endfor %} @@ -200,6 +233,6 @@

      About {{ schema.plural_name }}...

      {% endwith %} {% endif %}
    - +
{% endblock %}