Skip to content

Commit

Permalink
Add link to article translations in index and article template
Browse files Browse the repository at this point in the history
  • Loading branch information
Lothiraldan committed Apr 8, 2011
1 parent d5a2b51 commit 3e04e09
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 10 deletions.
7 changes: 4 additions & 3 deletions notmyidea-cms/templates/article.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{% extends "base.html" %}
{% block title %}{{ article.title }}{% endblock %}
{% block content %}
<section id="content" class="body">
{% block content %}
<section id="content" class="body">
<article>
<header> <h1 class="entry-title"><a href="{{ article.url }}"
rel="bookmark" title="Permalink to {{ article.title }}">{{ article.title
Expand All @@ -16,8 +16,9 @@
By <a class="url fn" href="#">{{ article.author }}</a>
</address>
{% endif %}
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>.
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>.
{% include 'taglist.html' %}
{% include 'translations.html' %}
</footer><!-- /.post-info -->
{{ article.content }}
</div><!-- /.entry-content -->
Expand Down
15 changes: 8 additions & 7 deletions notmyidea-cms/templates/index.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{% extends "base.html" %}
{% block content_title %}{% endblock %}
{% block content %}
{% block content %}
{% if articles %}
{% for article in articles %}
{% for article in articles %}
{% if loop.index == 1 %}
<section id="content" class="body">
<aside id="featured"><article>
<h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url
}}">{{ article.title }}</a></h1>
}}">{{ article.title }}</a></h1>
<footer class="post-info">
<abbr class="published" title="{{ article.date.isoformat() }}">
{{ article.date.strftime('%a %d %B %Y') }}
Expand All @@ -20,6 +20,7 @@ <h1 class="entry-title"><a href="{{ SITEURL }}/{{ article.url
{% endif %}
<p>In <a href="{{ SITEURL }}/category/{{ article.category }}.html">{{ article.category }}</a>. {% if PDF_PROCESSOR %}<a href="{{ SITEURL }}/pdf/{{ article.slug }}.pdf">get the pdf</a>{% endif %}</p>
{% include 'taglist.html' %}
{% include 'translations.html' %}
</footer><!-- /.post-info -->
{{ article.content }}
</article></aside><!-- /#featured -->
Expand All @@ -28,12 +29,12 @@ <h1>Other articles</h1>
<hr />
<ol id="posts-list" class="hfeed">
{% endif %}
{% else %}
<li><article class="hentry">
{% else %}
<li><article class="hentry">
<header>
<h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to {{ article.title}}">{{ article.title }}</a></h1>
</header>

<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="{{ article.date.isoformat() }}">
Expand All @@ -56,7 +57,7 @@ <h1><a href="{{ SITEURL }}/{{ article.url }}" rel="bookmark" title="Permalink to
</ol><!-- /#posts-list -->
</section><!-- /#content -->
{% else %}
<section id="content" class="body">
<section id="content" class="body">
<h2>Pages</h2>
{% for page in PAGES %}
<li><a href="{{ SITEURL }}/pages/{{ page.url }}">{{ page.title }}</a></li>
Expand Down
6 changes: 6 additions & 0 deletions notmyidea-cms/templates/translations.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{% if article.translations %}
Translations:
{% for translation in article.translations %}
<a href="{{ SITEURL }}/{{ translation.url }}">{{ translation.lang }}</a>
{% endfor %}
{% endif %}

0 comments on commit 3e04e09

Please sign in to comment.