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

@@ -2,50 +2,75 @@
{% load i18n comments%}
{% block title %}
{% trans 'Event Archive' %} {% if month %}{{ month|date:'F Y' }} {% else %}{% if year %}{{year}}{% endif %}{% endif %}
{% trans 'Event Archive' %} {% if month %}{{ month|date:'F Y' }} {% else %}{% if year %}{{year}}{% endif %}{% endif %}
{% endblock %}
{% block content %}
<h2>{% trans 'Event Archive' %} {% if month %}{{ month|date:'F Y' }} {% else %}{% if year %}{{year}}{% endif %}{% endif %}</h2>
{% for event in event_list %}
{% ifchanged %}<h3 class="clearfix">{{ event.start|date:'F Y' }}</h3>{% endifchanged %}
<div class="clearfix">
{% get_comment_count for event as comment_count %}
<a href="{{ event.get_absolute_url }}"><img src="{{ event.get_thumbnail.url }}" alt=" {% trans 'Event Image' %}" class="thumbnail"/></a>
<h4><a href="{{ event.get_absolute_url }}">{{ event.name }}</a></h4>
{{event.description}}
<img src="{{ STATIC_URL }}/icons/date.png" alt="{% trans 'Start' %}:" title="{% trans 'Start' %}">
{{ event.start|date }}
{% if event.end %}
{% trans "from" %} {{ event.start|time:'H:i' }} {% trans "to" %} {{ event.end|time:'H:i' }}
{% else %}
{{ event.start|time:'H:i' }}
{% endif %}
<ul class="info">
<li class="location">{{ event.location }}</li>
<li class="comment"><a href="{{event.get_absolute_url}}#comments">{{ comment_count }} {% trans 'Comments' %}</a></li>
<li class="photo"><a href="{% url 'event-photo-list' event.pk %}">{{ event.photo_count }} {% trans 'Photos' %}</a></li>
<li class="hanchan"><a href="{% url 'event-hanchan-list' event.pk %}">{{ event.hanchan_set.count }} {% trans 'Hanchans' %}</a></li>
{% if perms.events.change_event %}<li><a href="{{ event.get_edit_url }}" class="button"><img src="{{ STATIC_URL }}icons/page_edit.png" alt="{%trans "Edit" %}"></a></li>{% endif %}
</ul>
</div>
{% endfor %}
{% block teaser %}
<h2>{% trans 'Event Archive' %} {% if month %}{{ month|date:'F Y' }}{% elif year %}{{year|date:'Y'}}{% endif %}</h2>
{% endblock %}
{% block sidebar %}
{% block redbox %}
<h2>Archive</h2>
<ul>
{% if year %}
{% for date in date_list %}
{% if year %}
{% for date in date_list %}
<li><a href="{% url 'event-archive' year|date:'Y' date|date:'m' %}">{{ date|date:'F' }}</a></li>
{% endfor %}
{% elif month %}
<li><a href="{% url 'event-archive' month|date:'Y' %}">{{ month|date:'Y' }}</a></li>
{% else %}
{% for date in date_list %}
{% endfor %}
{% elif month %}
<li><a href="{% url 'event-archive' month|date:'Y' %}">{{ month|date:'Y' }}</a></li>
{% else %}
{% for date in date_list %}
<li><a href="{% url 'event-archive' date|date:'Y' %}">{{ date|date:'Y' }}</a></li>
{% endfor %}
{% endif %}
{% endfor %}
{% endif %}
</ul>
{% endblock %}
{% block maincontent %}
{% regroup event_list by start|date:'F Y' as month_list %}
{% for month in month_list %}
<h3 class="grid_12">{{ month.grouper }}</h3>
{% for event in month.list %}
{% get_comment_count for event as comment_count %}
<a href="{{ event.get_absolute_url }}" class="grid_2"><img src="{{ event.get_thumbnail.url }}"
alt="{% trans 'Event Image' %}"
class="thumbnail"/></a>
<div class="grid_4">
<h4><a href="{{ event.get_absolute_url }}">{{ event.name }}</a></h4>
<p><img src="{{ STATIC_URL }}/icons/date.png" alt="{% trans 'Start' %}:" title="{% trans 'Start' %}">
{{ event.start|date }}
{% if event.end %}
{% trans "from" %} {{ event.start|time:'H:i' }} {% trans "to" %} {{ event.end|time:'H:i' }}
{% else %}
{{ event.start|time:'H:i' }}
{% endif %}
</p>
<p>{{event.description}}</p>
<ul class="info">
<li><img src="{{ STATIC_URL }}/icons/map.png" alt="{% trans 'Location' %}" title="{% trans 'Location' %}">
{{ event.location }}
</li>
<li><a href="{{event.get_absolute_url}}#comments"><img src="{{ STATIC_URL }}/icons/comments.png"
alt="{% trans 'Comments' %}"
title="{% trans 'Comments' %}"> {{ comment_count }}</a>
</li>
<li><a href="{% url 'event-photo-list' event.pk %}"><img src="{{ STATIC_URL }}/icons/camera.png"
alt="{% trans 'Photos' %}"
title="{% trans 'Photos' %}">
{{ event.photo_count }}</a></li>
<li><a href="{% url 'event-hanchan-list' event.pk %}"><img src="{{ STATIC_URL }}/icons/table.png"
alt="{% trans 'Hanchans' %}"
title="{% trans 'Hanchans' %}">
{{ event.hanchan_set.count }} {% trans 'Hanchans' %}</a></li>
</ul>
{% if perms.events.change_event %}
<p class="right"><a href="{{ event.get_edit_url }}" class="button"><img src="{{ STATIC_URL }}icons/page_edit.png"
alt="{%trans " Edit" %}"></a></p>
{% endif %}
</div>
{% if forloop.counter|divisibleby:2 %}<br class="clear"/>{% endif %}
{% endfor %}
{% endfor %}
{% endblock %}