summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandre Leray <alexandre@alexandreleray.com>2010-11-03 15:30:06 (GMT)
committer Alexandre Leray <alexandre@alexandreleray.com>2010-11-03 15:30:06 (GMT)
commit28e0678d4f941197387a4844b6c741774bd2356a (patch)
treec88a08569d8dbce5c8ebe8d4659f8a99751c93fa
parent012146db3697bea799b41634d625813086040689 (diff)
put other copies on view text on right bar. removed ORIGIN text, replaced by *
-rw-r--r--brainch/templates/brainch/inc/clone_list.html9
-rwxr-xr-xbrainch/templates/brainch/view.html8
-rwxr-xr-xbrainch/templatetags/brainch_utils.py2
3 files changed, 8 insertions, 11 deletions
diff --git a/brainch/templates/brainch/inc/clone_list.html b/brainch/templates/brainch/inc/clone_list.html
index a589f8c..601e926 100644
--- a/brainch/templates/brainch/inc/clone_list.html
+++ b/brainch/templates/brainch/inc/clone_list.html
@@ -1,16 +1,15 @@
{% if clone_list %}
- <dt>Other copies</dt>
- <dd>
- <ul>
+ <h3>Other copies</h3>
+ <ul class='other-copies'>
{% for clone in clone_list %}
<li>
+ {% ifequal clone origin.origin %}*{% endifequal %}
{% with clone.user as user %}
<a href="/{{ user }}">{{ user }}</a>'s
{% endwith %}
<a href="{{ clone.get_absolute_url }}">{{ clone.name }}</a></li>
{% endfor %}
- <ul>
- </dd>
+ </ul>
{% endif %}
diff --git a/brainch/templates/brainch/view.html b/brainch/templates/brainch/view.html
index 9cdc46c..9592432 100755
--- a/brainch/templates/brainch/view.html
+++ b/brainch/templates/brainch/view.html
@@ -1,7 +1,7 @@
{% extends "brainch/base.html" %}
-{% load git_utils markup %}
+{% load git_utils markup brainch_utils %}
{% block sidebar %}
@@ -39,10 +39,8 @@
<div class="column20">
<div id="description">
<h2>About this text</h2>
- {% if repo.origin %}
- <p class="origin">Cloned from <br /><a href="/{{ repo.origin.user }}">{{ repo.origin.user }}'s</a> <a href="{{ repo.origin.get_absolute_url }}">"{{ repo.origin.name }}"</a></p>
- {% endif %}
- {{ repo.get_description }}
+ {{ repo.get_description|markdown }}
+ {% clone_list repo %}
<h2>License</h2>
{#{{ repo.licence }}#}
Free Art Licence 1.3
diff --git a/brainch/templatetags/brainch_utils.py b/brainch/templatetags/brainch_utils.py
index 39553e7..43ef8a5 100755
--- a/brainch/templatetags/brainch_utils.py
+++ b/brainch/templatetags/brainch_utils.py
@@ -27,7 +27,7 @@ def clone_list(origin):
"""
clone_list = Repository.objects.filter(slug=origin.slug)\
.exclude(id=origin.id)
- return {"clone_list": clone_list}
+ return {"clone_list": clone_list, "origin": origin}
register.inclusion_tag("brainch/inc/clone_list.html")(clone_list)