diff options
author | bnewbold <bnewbold@eta.mit.edu> | 2009-02-01 06:25:10 -0500 |
---|---|---|
committer | bnewbold <bnewbold@eta.mit.edu> | 2009-02-01 06:25:10 -0500 |
commit | c7b29da94d3b85ec91f0d5e2789db11a43473df5 (patch) | |
tree | a5502674da4a9ed8367f911112d34c094481e83c /bn_django/journal/templates | |
parent | 0988ee83c8a8b24801624beae78ceba1bfa82d07 (diff) | |
download | bnewnet-c7b29da94d3b85ec91f0d5e2789db11a43473df5.tar.gz bnewnet-c7b29da94d3b85ec91f0d5e2789db11a43473df5.zip |
lots went on:
* rss feeds
* some admin interface stuff
* blah
running issues:
* admin interface with model inheretence?
* rss feeds: unicode cool?
* proper year/month implementation (don't want day)
* right side bar info
* dating issue (datetime vs date)
Diffstat (limited to 'bn_django/journal/templates')
15 files changed, 194 insertions, 19 deletions
diff --git a/bn_django/journal/templates/feeds/latest_entries_description.html b/bn_django/journal/templates/feeds/latest_entries_description.html new file mode 100644 index 0000000..6f28865 --- /dev/null +++ b/bn_django/journal/templates/feeds/latest_entries_description.html @@ -0,0 +1 @@ +{{obj.html_content|safe|truncatewords_html:300}} diff --git a/bn_django/journal/templates/feeds/latest_entries_title.html b/bn_django/journal/templates/feeds/latest_entries_title.html new file mode 100644 index 0000000..e12d8e1 --- /dev/null +++ b/bn_django/journal/templates/feeds/latest_entries_title.html @@ -0,0 +1 @@ +{{obj.title|safe}} diff --git a/bn_django/journal/templates/feeds/latest_links_description.html b/bn_django/journal/templates/feeds/latest_links_description.html new file mode 100644 index 0000000..32c8857 --- /dev/null +++ b/bn_django/journal/templates/feeds/latest_links_description.html @@ -0,0 +1 @@ +{{ obj.html_caption|safe|truncatewords_html:200}} diff --git a/bn_django/journal/templates/feeds/latest_links_title.html b/bn_django/journal/templates/feeds/latest_links_title.html new file mode 100644 index 0000000..65599bb --- /dev/null +++ b/bn_django/journal/templates/feeds/latest_links_title.html @@ -0,0 +1 @@ +{{ obj.title }}: {{ obj.url }} diff --git a/bn_django/journal/templates/feeds/latest_microentries_description.html b/bn_django/journal/templates/feeds/latest_microentries_description.html new file mode 100644 index 0000000..427823d --- /dev/null +++ b/bn_django/journal/templates/feeds/latest_microentries_description.html @@ -0,0 +1 @@ +{{obj.html_content|safe|truncatewords_html:160}} diff --git a/bn_django/journal/templates/feeds/latest_microentries_title.html b/bn_django/journal/templates/feeds/latest_microentries_title.html new file mode 100644 index 0000000..d992ff6 --- /dev/null +++ b/bn_django/journal/templates/feeds/latest_microentries_title.html @@ -0,0 +1 @@ +{{obj.title}} diff --git a/bn_django/journal/templates/journal/entry_archive_month.html b/bn_django/journal/templates/journal/entry_archive_month.html new file mode 100644 index 0000000..a9e72da --- /dev/null +++ b/bn_django/journal/templates/journal/entry_archive_month.html @@ -0,0 +1,35 @@ +{% extends "journal/base.html" %} +{% load comments %} + +{% block title %}Journal Entries{% endblock %} + +{% block content %} +<br /> +<div class="notice"> +This page has an <a href="/journal/entries/rss.xml">RSS feed</a>. +<br /> +See also <a href="/artifacts/">artifacts</a>, <a href="microentries"> +microentries</a>. + +</div> +{% if object_list %} + {% for item in object_list %} + {% get_comment_count for item as comment_count %} + <h3><a href="{{ item.get_absolute_url }}"> + {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a></h3> + <i>{{item.date|date:"D, d/m/Y @H:i"}} by {{ item.author.username }}. + <a href="{{ item.get_absolute_url }}#commentary">{{ comment_count }} comments</a></i> + <p style="padding-left:30px"> + {{ item.html_content|truncatewords_html:256 }} + </p> + {% endfor %} +{% else %} +<p>No entries have been entered yet!</p> +{% endif %} + +{% if is_paginated %} {% if has_previous %} +<a href="./?page={{ previous }}">« previous</a> | +{% endif %} {% if has_next %} +<a href="./?page={{ next }}">next »</a> +{% endif %} {% endif %} +{% endblock %} diff --git a/bn_django/journal/templates/journal/entry_archive_year.html b/bn_django/journal/templates/journal/entry_archive_year.html new file mode 100644 index 0000000..a9e72da --- /dev/null +++ b/bn_django/journal/templates/journal/entry_archive_year.html @@ -0,0 +1,35 @@ +{% extends "journal/base.html" %} +{% load comments %} + +{% block title %}Journal Entries{% endblock %} + +{% block content %} +<br /> +<div class="notice"> +This page has an <a href="/journal/entries/rss.xml">RSS feed</a>. +<br /> +See also <a href="/artifacts/">artifacts</a>, <a href="microentries"> +microentries</a>. + +</div> +{% if object_list %} + {% for item in object_list %} + {% get_comment_count for item as comment_count %} + <h3><a href="{{ item.get_absolute_url }}"> + {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a></h3> + <i>{{item.date|date:"D, d/m/Y @H:i"}} by {{ item.author.username }}. + <a href="{{ item.get_absolute_url }}#commentary">{{ comment_count }} comments</a></i> + <p style="padding-left:30px"> + {{ item.html_content|truncatewords_html:256 }} + </p> + {% endfor %} +{% else %} +<p>No entries have been entered yet!</p> +{% endif %} + +{% if is_paginated %} {% if has_previous %} +<a href="./?page={{ previous }}">« previous</a> | +{% endif %} {% if has_next %} +<a href="./?page={{ next }}">next »</a> +{% endif %} {% endif %} +{% endblock %} diff --git a/bn_django/journal/templates/journal/entry_detail.html b/bn_django/journal/templates/journal/entry_detail.html index 9c74ed6..b68e4b6 100644 --- a/bn_django/journal/templates/journal/entry_detail.html +++ b/bn_django/journal/templates/journal/entry_detail.html @@ -1,8 +1,8 @@ {% extends "journal/base.html" %} -{# {% load markup %} #} {% load comments %} + {% block path %}{{ block.super }} - »<a href="../{{ object.slug }}"> {{ object.title }}</a> + »<a href="{{object.get_absolute_url}}"> {{ object.title }}</a> {% endblock %} {% block title %} diff --git a/bn_django/journal/templates/journal/entry_list.html b/bn_django/journal/templates/journal/entry_list.html index caa07af..8902552 100644 --- a/bn_django/journal/templates/journal/entry_list.html +++ b/bn_django/journal/templates/journal/entry_list.html @@ -1,18 +1,34 @@ {% extends "journal/base.html" %} -{# {% load markup %} #} +{% load comments %} {% block title %}Journal Entries{% endblock %} +{% block otherhead %}{{ block.super}} +<link rel="alternate" type="application/rss+xml" title="RSS" href="/journal/rss/latest_entries/"> +{% endblock %} + {% block content %} <br /> +<div class="notice"> +This page has an <a href="/journal/rss/latest_entries/">RSS feed</a>. +<br /> +See also <a href="/artifacts/">artifacts</a>, <a href="microentries"> +microentries</a>. + +</div> {% if object_list %} -<ul> {% for item in object_list %} - <li /><a href="/journal/entries/{{ item.slug }}/">{{item.title}} + {% get_comment_count for item as comment_count %} + <h3><a href="{{ item.get_absolute_url }}"> + {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a></h3> + <i>{{item.date|date:"D, d/m/Y @H:i"}} by {{ item.author.username }}. + <a href="{{ item.get_absolute_url }}#commentary">{{ comment_count }} comments</a></i> + <p style="padding-left:30px"> + {{ item.html_content|truncatewords_html:256 }} + </p> {% endfor %} -</ul> {% else %} -<p>No entries have been entered yet.</p> +<p>No entries have been entered yet!</p> {% endif %} {% if is_paginated %} {% if has_previous %} diff --git a/bn_django/journal/templates/journal/linkartifact_list.html b/bn_django/journal/templates/journal/linkartifact_list.html index 829e627..51e9ebe 100644 --- a/bn_django/journal/templates/journal/linkartifact_list.html +++ b/bn_django/journal/templates/journal/linkartifact_list.html @@ -1,5 +1,9 @@ {% extends "journal/base.html" %} +{% block otherhead %}{{ block.super}} +<link rel="alternate" type="application/rss+xml" title="RSS" href="/journal/rss/latest_links/"> +{% endblock %} + {% block path %}<a href="/artifacts/">artifacts</a> »<a href="/artifacts/links/"> links</a> {% endblock %} @@ -8,6 +12,12 @@ {% block content %} <br /> +<div class="notice"> +This page has an <a href="/journal/rss/latest_links/">RSS feed</a>. +<br /> +microentries</a>. +</div> + {% if object_list %} <ul> {% for item in object_list %} diff --git a/bn_django/journal/templates/journal/microentry_arhive_month.html b/bn_django/journal/templates/journal/microentry_arhive_month.html new file mode 100644 index 0000000..eca642d --- /dev/null +++ b/bn_django/journal/templates/journal/microentry_arhive_month.html @@ -0,0 +1,31 @@ +{% extends "journal/base.html" %} +{% load comments %} + +{% block path %}{{block.super}} + »<a href="/journal/microentries/"> microentries</a> + +{% block title %}Journal Microentries{% endblock %} + +{% block content %} +<br /> +{% if object_list %} + {% for item in object_list %} + <b>{{item.date|date:"D, d/m/Y @H:i"}}: + <a href="{{ item.get_absolute_url }}"> + {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a></b> + <p style="padding-left:30px"> + {{ item.html_content|truncatewords_html:256 }} + {% get_comment_count for item as comment_count %} + (<a href="{{ item.get_absolute_url }}#commentary">{{ comment_count }} comments</a>) + </p> + {% endfor %} +{% else %} +<p>No entries have been entered yet!</p> +{% endif %} + +{% if is_paginated %} {% if has_previous %} +<a href="./?page={{ previous }}">« previous</a> | +{% endif %} {% if has_next %} +<a href="./?page={{ next }}">next »</a> +{% endif %} {% endif %} +{% endblock %} diff --git a/bn_django/journal/templates/journal/microentry_arhive_year.html b/bn_django/journal/templates/journal/microentry_arhive_year.html new file mode 100644 index 0000000..eca642d --- /dev/null +++ b/bn_django/journal/templates/journal/microentry_arhive_year.html @@ -0,0 +1,31 @@ +{% extends "journal/base.html" %} +{% load comments %} + +{% block path %}{{block.super}} + »<a href="/journal/microentries/"> microentries</a> + +{% block title %}Journal Microentries{% endblock %} + +{% block content %} +<br /> +{% if object_list %} + {% for item in object_list %} + <b>{{item.date|date:"D, d/m/Y @H:i"}}: + <a href="{{ item.get_absolute_url }}"> + {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a></b> + <p style="padding-left:30px"> + {{ item.html_content|truncatewords_html:256 }} + {% get_comment_count for item as comment_count %} + (<a href="{{ item.get_absolute_url }}#commentary">{{ comment_count }} comments</a>) + </p> + {% endfor %} +{% else %} +<p>No entries have been entered yet!</p> +{% endif %} + +{% if is_paginated %} {% if has_previous %} +<a href="./?page={{ previous }}">« previous</a> | +{% endif %} {% if has_next %} +<a href="./?page={{ next }}">next »</a> +{% endif %} {% endif %} +{% endblock %} diff --git a/bn_django/journal/templates/journal/microentry_detail.html b/bn_django/journal/templates/journal/microentry_detail.html index bb94853..245fe32 100644 --- a/bn_django/journal/templates/journal/microentry_detail.html +++ b/bn_django/journal/templates/journal/microentry_detail.html @@ -3,7 +3,7 @@ {% load comments %} {% block path %}{{ block.super }} »<a href="/journal/microentries/"> microentries</a> - »<a href="/journal/microentries/{{ object.id }}"> {{ object.title }}</a> + »<a href="{{ item.get_absolute_url }}"> {{ object.title }}</a> {% endblock %} {% block title %} @@ -13,7 +13,7 @@ {% block content %}<br /> {% if object %}<div class="right_stuff"> <p class="date">dated {{ object.date }}, -{% if object.author %}<br />written by {{ object.author }},{% endif %} +{% if object.author %}<br />written by {{ object.author.username }},{% endif %} {% if object.last_edited %}<br />last edited {{ object.last_edited }}.{% endif %} </div> <p class="journal_entry">{{ object.html_content|safe }}</p> diff --git a/bn_django/journal/templates/journal/microentry_list.html b/bn_django/journal/templates/journal/microentry_list.html index aac07e7..54e63e5 100644 --- a/bn_django/journal/templates/journal/microentry_list.html +++ b/bn_django/journal/templates/journal/microentry_list.html @@ -1,23 +1,34 @@ {% extends "journal/base.html" %} +{% load comments %} -{% block path %}{{block.parent}} - »<a href="/journal/microentries/"> microentries</a> - »<a href="/journal/microentries/{{ object.id }}"> {{ object.title }}</a>{%endif%} +{% block otherhead %}{{ block.super}} +<link rel="alternate" type="application/rss+xml" title="RSS" href="/journal/rss/latest_microentries/"> +{% endblock %} + +{% block path %}{{block.super}} + »<a href="/journal/microentries/"> microentries</a>{% endblock %} -{% block title %}Journal Micro-entries{% endblock %} +{% block title %}Journal Microentries{% endblock %} {% block content %} <br /> +<div class="notice"> +This page has an <a href="/journal/rss/latest_microentries/">RSS feed</a>. +</div> + {% if object_list %} -<ul> {% for item in object_list %} - <li /><a href="/journal/microentries/{{ item.id }}/"> - {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a> - ({{item.date}}) + <b>{{item.date|date:"D, d/m/Y @H:i"}}: + <a href="{{ item.get_absolute_url }}"> + {% if item.title %}{{item.title}}{%else%}[Untitled]{%endif%}</a></b> + <p style="padding-left:30px"> + {{ item.html_content|truncatewords_html:256 }} + {% get_comment_count for item as comment_count %} + (<a href="{{ item.get_absolute_url }}#commentary">{{ comment_count }} comments</a>) + </p> {% endfor %} -</ul> {% else %} -<p>No entries have been entered yet.</p> +<p>No microentries have been entered yet!</p> {% endif %} {% if is_paginated %} {% if has_previous %} |