Code bereinigt und Seitenstruktur verfeinert.

Das Layout der einzelnen Seiten ist jetzt einheitlich:
- jumbotron
- Naviation der Unterseiten (wenn Vorhanden)
- Hauptinhalt
- Pager (bei mehrseiteigen Ergebnissen)
- Kommentare (wenn Kommentare möglich)
- Buttonleiste zum bearbeiten (wen erlaubt)

* Viele kleine HTML5 Fehler wurden bereinigt
* CSS Dateien wurden angepasst
* Nicht mehr benötigte Dateien in STATIC gelöscht
* externe Pakete aus utlis/ entfernt, als Vobreitung für virtenv Nutzung.
This commit is contained in:
Christian Berg
2014-11-30 16:49:23 +01:00
committed by Christian Berg
parent 86a0db050d
commit 34f5bdca58
1062 changed files with 1690 additions and 100089 deletions

View File

@@ -1,44 +1,51 @@
{% load comments i18n %}
<form action="{% comment_form_target %}" method="post" id='comment_form'>
{% csrf_token %}
<fieldset class="grid_12">
<legend>{% trans "New Comment" %}</legend>
{% if user.is_authenticated %}
<p style="display:none">
{{form.honeypot}} {{form.honeypot.label}}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
{% if next %}
<input type="hidden" name="next" value="{{ next }}" />
{% else %}
<input type="hidden" name="next" value="{{ request.path_info }}" />
</p>
{% endif %}
<label class="field_name" for="id_comment">
{{user}}<br/>
<time class="submit_date" datetime='{% now "c" %}'>{% now "d. M. Y. H:i" %}</time>
{% if user.get_profile.thumbnail %}<img src="{{user.get_profile.thumbnail.url}}" alt=""/>{% else %}<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>{% endif %}
</label>
{{form.comment}}
<p class="buttonbar">
<button type="submit" name="preview"><img src="{{ STATIC_URL }}icons/comment_edit.png" alt="{% trans 'Preview' %}" /> {% trans "Preview" %}</button>
<button type="submit" name="submit"><img src="{{ STATIC_URL }}icons/comment_add.png" alt="{% trans 'Post' %}" /> {% trans "Post" %}</button>
</p>
{% else %}
<label class="field_name" for="id_comment">
{% trans "not logged in" %}<br/>
<time class="submit_date" datetime='{% now "c" %}'>{% now "d. M. Y. H:i" %}</time>
<img src="{{STATIC_URL}}img/unknown_thumbnail.png" alt=""/>
</label>
<span>
{% url "membership-register" as register %}
{% url "login" as login %}
{% blocktrans with request.path_info as next %}<a href="{{ register }}">Register</a> now, or <a href="{{ login }}?next={{ next }}">Login</a> to leave a comment here.{% endblocktrans %}
</span>
<p class="buttonbar">
<a href="{{ register }}" class="button"><img src="{{STATIC_URL}}icons/user_add.png" />{% trans 'register' %}</a>
<a href="{{ login }}" class="button"><img src="{{STATIC_URL}}icons/lock_break.png" />{% trans 'login' %}</a>
</p>
{% endif %}
</fieldset>
<p>&nbsp;</p>
<form action="{% comment_form_target %}" method="post" id='comment_form' class="grid_12">
{% csrf_token %}
<fieldset class="comment">
<legend>{% trans "New Comment" %}</legend>
{% if user.is_authenticated %}
<p style="display:none">
{{form.honeypot}} {{form.honeypot.label}}
{% for field in form.hidden_fields %}{{ field }}{% endfor %}
<input type="hidden" name="next" value="{{ next|default:request.path_info }}"/>
</p>
<div class="comment">
<div class="comment_picture"><img class="avatar"
src="{% if user.get_profile.thumbnail %}{{user.get_profile.thumbnail.url}}{% else %}{{STATIC_URL}}img/unknown_thumbnail.png{% endif %}"
alt=""/></div>
<header class="comment_header">
<h3><a href="{{ user.get_profile.get_absolute_url }}" class="user">{{user}}</a></h3>
<p class="submit_date">{% trans 'now' %}</p>
</header>
<div class="comment_text">{{form.comment}}</div>
</div>
<p class="buttonbar">
<button type="submit" name="preview"><img src="{{ STATIC_URL }}icons/comment_edit.png"
alt="{% trans 'Preview' %}"/> {% trans "Preview" %}
</button>
<button type="submit" name="submit"><img src="{{ STATIC_URL }}icons/comment_add.png"
alt="{% trans 'Post' %}"/> {% trans "Post" %}
</button>
</p>
{% else %}
<div class="comment">
<div class="comment_picture"><img class="avatar"
src="{{STATIC_URL}}img/unknown_thumbnail.png"
alt=""/></div>
<header class="comment_header">
<h3>{% trans "not logged in" %}</h3>
</header>
<div class="comment_text">
<textarea disabled="disabled" cols="40" rows="10">
{% blocktrans %}Register now, or Login to leave a comment here.{% endblocktrans %}
</textarea>
</div>
</div>
<p class="buttonbar">
<a href="{% url 'membership-register' %}" class="button"><img src="{{STATIC_URL}}icons/user_add.png" alt=""/> {% trans 'register' %}</a>
<a href="{% url 'login' %}?next={{ request.path_info|urlencode }}" class="button"><img src="{{STATIC_URL}}icons/lock_break.png" alt=""/> {% trans 'login' %}</a>
</p>
{% endif %}
</fieldset>
</form>