Events und Gallery in einzelne Apps aufgetielt.

Lokalisierung auf einzelne Apps aufgeteilt
Mai-Star Ranking in die Navigation integriert
This commit is contained in:
Christian Berg
2014-12-09 23:19:04 +01:00
parent 34f5bdca58
commit 2011d3ce25
1084 changed files with 4905 additions and 7628 deletions

View File

@@ -0,0 +1,25 @@
{% extends "base.html" %}
{% load i18n comments %}
{% block maincontent %}
<form action="" method="post" class="grid_12">
{% csrf_token %}
<header>
<h1 class="grid_12">Dieses Photo wirklich löschen?</h1>
</header>
<p>Sind Sie sicher, dass Sie das Bild &ldquo;{{photo.name}}&rdquo; löschen wollen?</p>
<img src="{{photo.display.url}}" alt="{{photo.name}}" title="{{photo.name}}" class="grid_10 push_1"/>
<br class="clear"/>
<p>&nbsp;</p>
<p class="buttonbar">
<a href="{% url 'event-photo-list' photo.event.id %}" class="button" style="float: left;"><img
src="{{STATIC_URL}}icons/cancel.png" alt="{% trans 'Cancel' %}"/> {% trans 'Cancel' %}</a>
<button type="submit"><img src="{{STATIC_URL}}icons/delete.png" alt="{% trans 'Delete' %}"/>
{% trans 'Delete' %}
</button>
</p>
</form>
{% endblock %}
{% block buttonbar %}{% endblock %}

View File

@@ -0,0 +1,56 @@
{% extends "events/photo_list.html" %}
{% load i18n comments %}
{% block title %} {{ photo.name }} - {{ photo.event.name }} {% endblock %}
{% block opengraph %}
<meta property="og:type" content="photo" />
<meta property="og:title" content="{{photo.name}} - Foto" />
<meta property="og:url" content="http://www.kasu.at{{photo.get_absolute_url}}" />
<meta property="og:image" content="http://www.kasu.at{{photo.thumbnail.url}}" />
{% if photo.description %}<meta property="og:description" content="{{photo.description}}" />{% endif %}
{% endblock %}
{% block maincontent %}
<h2 class="grid_12"><a href="{% url 'event-photo-list' photo.event.id %}">{{photo.event.name}}</a> &raquo; {{ photo.name }}</h2>
<div id="display" class="grid_12 clearfix">
<img src="{{photo.display.url}}" alt="{{photo.name}}" title="{{photo.name}}"/>
{% if photo.previous_photo %}
<a href="{{ photo.previous_photo.get_absolute_url }}" class="previous">{% trans 'previous' %}</a>
{% endif %}
{% if photo.next_photo %}
<a href="{{ photo.next_photo.get_absolute_url }}" class="next">Next</a>
{% endif %}
</div>
{% if perms.events.change_photo %}
<form method="post" enctype="multipart/form-data" class="grid_12">
{% csrf_token %}
<fieldset>
{% include "form.html" %}
<p class="buttonbar">
<a href="{{ photo.image.url }}" class="button" type="application/octet-stream"><img src="{{ STATIC_URL}}icons/drive_go.png" alt="{% trans 'download' %}" title="{% trans 'download' %}" /></a>
<button type="submit" name="rotate" value="counter-clockwise"><img src="{{STATIC_URL}}icons/shape_rotate_anticlockwise.png" title="Gegen den Uhrzeiger drehen"></button>
<button type="submit" name="rotate" value="clockwise"><img src="{{STATIC_URL}}icons/shape_rotate_clockwise.png" title="Im Uhrzeiger drehen"></button>
<button type="submit"><img src="{{STATIC_URL}}icons/disk.png" alt=""> {% trans "save" %}</button>
</p>
</fieldset>
</form>
{% else %}
<p class="grid_10 push_1">{{ photo.description }}</p>
<ul class="info grid_11 push_1">
<li class="user"><strong>{% trans 'Photographer' %}: </strong>{{ photo.photographer }}</li>
<li class="date"><strong>{% trans 'on' %}</strong> {{ photo.created_date }}</li>
</ul>
{% endif %}
<div class="grid_12 more_link">
<a href="https://m.google.com/app/plus/x/?v=compose&amp;content={{photo.headline|urlencode}}+-+http%3A%2F%2Fwww.kasu.at/{{photo.get_absolute_url|urlencode}}" target="_blank"><img src="{{STATIC_URL}}img/google_plus.png" alt="Google+" title="{% trans 'Share on Google+'%}" /></a>
<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.kasu.at/{{photo.get_absolute_url|urlencode}}" target='_blank'><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter" title="{% trans 'Share on Twitter' %}" /></a>
<a href="http://facebook.com/sharer.php?u=http%3A%2F%2Fwww.kasu.at{{photo.get_absolute_url|urlencode}}" target="_blank"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook" title="{% trans 'Share on Facebook'%}" /></a>
</div>
{% render_comment_list for photo %}
{% render_comment_form for photo %}
{% endblock %}

View File

@@ -0,0 +1,37 @@
{% extends "base.html" %}
{% load i18n %}
{% block teaser %}<h2>{{page.title}}{% trans 'Photos' %}</h2>{% endblock %}
{% block navigation %}
<ul id="navigation">
{% if event %}
<li><a href="{{ current_top_page.get_absolute_url }}">{{current_top_page.menu_name}}</a></li>
<li><a class="active">{{event.name}}</a></li>
{% elif photo %}
<li><a href="{{ current_top_page.get_absolute_url }}">{{current_top_page.menu_name}}</a></li>
<li><a href="{% url 'event-photo-list' photo.event.id %}">{{photo.event.name}}</a></li>
<li><a class="active">{{photo.name}}</a></li>
{% else %}
<li><a href="{{ current_top_page.get_absolute_url }}" {% ifequal current_page current_top_page %}class="active"{% endifequal %}>{{current_top_page.menu_name}}</a></li>
{% if perms.event.add_photo %}
<li><a href="/gallery/upload/" class="{% ifequal current_path 'gallery/upload' %}active{% endifequal %}">{% trans 'Upload' %}</a></li>
{% endif %}
{% endif %}
</ul>
{% endblock %}
{% block maincontent %}
{% for event in event_list %}
<div class="gallery grid_4">
<h3><a href="{% url 'event-photo-list' event.id %}">{{event.name}}</a></h3>
<a href="{% url 'event-photo-list' event.id %}"><img src="{{event.get_thumbnail.url}}" class="thumbnail" alt="{{ event.name }}"/></a>
</div>
{% empty %}
<p>Sorry da kommt erst was hin!</p>
{% endfor %}
{% endblock %}
{% block buttonbar %}{% endblock %}

View File

@@ -0,0 +1,47 @@
{% extends "events/event_detail.html" %}
{% load i18n %}
{% block title %}{{event.name}}{% endblock %}
{% block opengraph %}
<meta property="og:type" content="album" />
<meta property="og:title" content="{{event.name}}" />
<meta property="og:url" content="http://www.kasu.at{% url 'event-photo-list' event.pk %}" />
<meta property="og:image" content="http://www.kasu.at{{ event.get_thumbnail.url }}" />
{% if event.description %}<meta property="og:description" content="{{event.description}}" />{% endif %}
{% endblock %}
{% block maincontent %}
{% if perms.events.delete_photo %}
{% for photo in photo_list %}
<div class="thumbnail">
<a href="{{photo.get_absolute_url}}"><img src="{{photo.thumbnail.url}}" alt=""/></a>
<a href="{% url 'delete-event-photo' photo.pk %}" class="delete_image"><img src="{{STATIC_URL}}icons/delete.png" title="{% trans 'delete' %}"/></a>
</div>
{% endfor %}
{% else %}
{% for photo in photo_list %}
<a href="{{photo.get_absolute_url}}" class="thumbnail"><img src="{{photo.thumbnail.url}}" alt=""/></a>
{% endfor %}
{% endif %}
{% if perms.events.add_photo %}
<br class="clear" />
<form action="{% url 'event-photo-upload' event.id %}" method="post" enctype="multipart/form-data" class="grid_12">
{% csrf_token %}
<fieldset>
<legend>Photos hochladen</legend>
{% include "form.html"%}
<p class="buttonbar">
<button type="reset"><img src="{{STATIC_URL}}icons/arrow_undo.png" alt="{% trans 'reset' %}" /> {% trans 'reset' %}</button>
<button type="submit"><img src="{{STATIC_URL}}icons/image_add.png" alt="{% trans 'upload' %}" /> {% trans 'upload' %}</button>
</p>
</fieldset>
</form>
{% endif %}
{% endblock %}
{% block buttonbar %}{% endblock %}

View File

@@ -0,0 +1,54 @@
{% extends "events/photo_gallery.html" %}
{% load i18n comments %}
{% block maincontent %}
<h2 class="grid_12">Photos</a> &raquo; {% trans "upload"%}</h2>
{% for event in event_list %}
{% get_comment_count for event as comment_count %}
{% ifchanged %}<h3 class="grid_12">{{ event.start|date:'F Y' }}</h3>{% endifchanged %}
<div style="float:left">
<a href="{% url 'event-photo-list' event.pk %}"><img src="{{ event.get_thumbnail.url }}" alt="" class="thumbnail"/></a>
<div class="grid_4" />
<h4><a href="{% url 'event-photo-list' event.pk %}">{{ event.name }}</a></h4>
<div class="info">
<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 %}
</div>
{% if event.description %}<p>{{event.description}}</p>{% endif %}
<div class="info">
<img src="{{ STATIC_URL }}/icons/map.png" alt="{% trans 'Location' %}" title="{% trans 'Location' %}">
{{ event.location }}
<img src="{{ STATIC_URL }}/icons/comments.png" alt="{% trans 'Comments' %}" title="{% trans 'Comments' %}">
<a href="{{event.get_absolute_url}}#comments">{{ comment_count }} {% trans 'Comments' %}</a>
<img src="{{ STATIC_URL }}/icons/images.png" alt="{% trans 'Photos' %}" title="{% trans 'Photos' %}">
<a href="{% url 'event-photo-list' event.pk %}">{{ event.photo_count }} {% trans 'Photos' %}</a>
</div>
<p style="text-align:right">
{% if perms.events.add_photo %}
<a href="{% url 'event-photo-list' event.pk %}" class="button"><img src="{{ STATIC_URL }}icons/image_add.png" alt="{%trans "Upload" %}"></a>
{% endif %}
</p>
</div></div>
{% endfor %}
<form method="post" enctype="multipart/form-data">
{% csrf_token %}
<fieldset class="grid_8 push_2">
<legend>Photos hochladen</legend>
{% include "form.html" %}
<p class="buttonbar">
<button type="submit">
<img src="{{ STATIC_URL }}icons/drive_go.png" alt="" />
{% trans "upload" %}
</button>
</p>
</fieldset>
</form>
{% endblock %}