Fehlerbereinigung.

Mahjong Ranking berechnet nun die richtigen Ränge zu den legendären Kyu/Dan Punkten.

Stablie Version bevor die Datenstruktur des Mahjongrankings vereinfacht wird.
This commit is contained in:
Christian Berg
2015-08-18 20:25:35 +02:00
committed by Christian Berg
parent bafbf38612
commit 79eaeb34ad
1172 changed files with 1713 additions and 10150 deletions

View File

@@ -48,7 +48,7 @@ class PageForm(forms.ModelForm):
cleaned_data = super(PageForm, self).clean()
content_type = cleaned_data.get("content_type")
pdf_de = cleaned_data.get("pdf_de")
if not pdf_de and content_type == "2":
if content_type == "2" and not cleaned_data.get("pdf_de"):
msg = _('Please upload a PDF-File to this PDF-Page.')
self._errors["content_type"] = self.error_class([msg])
self._errors["pdf_de"] = self.error_class([msg])

View File

@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: kasu.content\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-01-05 19:23+0100\n"
"PO-Revision-Date: 2014-12-08 16:15+0100\n"
"POT-Creation-Date: 2015-08-16 11:34+0200\n"
"PO-Revision-Date: 2015-08-15 17:30+0200\n"
"Last-Translator: Christian Berg <xeniac.at@gmail.com>\n"
"Language-Team: Kasu <verein@kasu.at>\n"
"Language: de\n"
@@ -17,7 +17,7 @@ msgstr ""
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
"X-Translated-Using: django-rosetta 0.7.2\n"
"X-Generator: Poedit 1.6.11\n"
"X-Generator: Poedit 1.8.3\n"
#: feeds.py:16
msgid "Current news from Kasu"
@@ -43,7 +43,7 @@ msgstr "Schlagzeile"
msgid "Content"
msgstr "Inhalt"
#: models.py:52 models.py:231 templates/content/article_detail.html:34
#: models.py:52 models.py:231 templates/content/article_detail.html:25
msgid "Category"
msgstr "Kategorie"
@@ -55,7 +55,7 @@ msgstr "Bild"
msgid "Slug"
msgstr "Slug"
#: models.py:57 templates/content/article_detail.html:32
#: models.py:57 templates/content/article_detail.html:23
msgid "Author"
msgstr "Autor"
@@ -131,66 +131,43 @@ msgstr "Beschreibung"
msgid "Categories"
msgstr "Kategorien"
#: views.py:42
msgid "This Category does not exist."
msgstr "Diese Kategorie existiert nicht."
#: views.py:93 templates/content/article_detail.html:52
#: templates/content/article_form.html:17
msgid "Edit Article"
msgstr "Artikel bearbeiten"
#: views.py:95 templates/content/article_form.html:17
msgid "Create Article"
msgstr "Artikel erstellen"
#: views.py:160
#, python-format
msgid "No Page found matching the Path %s"
msgstr "Keine Seite unter dem Pfad %s gefunden"
#: views.py:174
#, python-format
msgid "No PDF Document found matching the Path %s"
msgstr "Kein PDF Dokument unter dem Pfad %s gefunden."
#: templates/content/article_archive.html:5
#: templates/content/article_archive.html:11
#: templates/content/article_archive.html:17
#: templates/content/article_archive.html:19
msgid "Article Archive"
msgstr "Nachrichtenarchiv"
#: templates/content/article_archive.html:32
#: templates/content/article_archive.html:34
#: templates/content/article_archive_month.html:5
#: templates/content/article_archive_year.html:7
msgid "Archive"
msgstr "Archiv"
#: templates/content/article_archive.html:49
#: templates/content/article_archive.html:51
msgid "All Categories"
msgstr "Alle Kategorien"
#: templates/content/article_archive.html:64
#: templates/content/article_archive.html:66
msgid "created on"
msgstr "erstellt am"
#: templates/content/article_archive.html:65
#: templates/content/article_archive.html:67
msgid "by"
msgstr "von"
#: templates/content/article_archive.html:66
#: templates/content/article_archive.html:68
msgid "comments"
msgstr "Kommentare"
#: templates/content/article_archive.html:70
#: templates/content/article_archive.html:72
msgid "Read More"
msgstr "Mehr lesen"
#: templates/content/article_archive.html:73
#: templates/content/article_archive.html:75
msgid "We're sorry. Your search yielded no results."
msgstr "Es tut uns leid. Deine Suche ergab keine Treffer."
#: templates/content/article_archive.html:91
#: templates/content/article_archive.html:93
msgid "Add Article"
msgstr "neuer Artikel "
@@ -198,21 +175,22 @@ msgstr "neuer Artikel "
msgid "back"
msgstr "Zurück"
#: templates/content/article_detail.html:33
#: templates/content/article_detail.html:24
msgid "Created on"
msgstr "Erstellt am"
#: templates/content/article_detail.html:39
msgid "Share on Google+"
msgstr "Auf Google+ teilen"
#: templates/content/article_detail.html:36
msgid "share on"
msgstr "Teile auf"
#: templates/content/article_detail.html:40
msgid "Share on Twitter"
msgstr "Auf Twitter teilen"
#: templates/content/article_detail.html:51
#: templates/content/article_form.html:17 views.py:88
msgid "Edit Article"
msgstr "Artikel bearbeiten"
#: templates/content/article_detail.html:41
msgid "Share on Facebook"
msgstr "Auf Facebook teilen"
#: templates/content/article_form.html:17 views.py:90
msgid "Create Article"
msgstr "Artikel erstellen"
#: templates/content/article_form.html:22 templates/content/page_form.html:40
#: templates/content/page_form.html:46
@@ -245,5 +223,28 @@ msgstr "Seite hinzufügen"
msgid "HTML Specific"
msgstr "HTML spezifisch"
#: views.py:22
msgid "This Category does not exist."
msgstr "Diese Kategorie existiert nicht."
#: views.py:155
#, python-format
msgid "No Page found matching the Path %s"
msgstr "Keine Seite unter dem Pfad %s gefunden"
#: views.py:169
#, python-format
msgid "No PDF Document found matching the Path %s"
msgstr "Kein PDF Dokument unter dem Pfad %s gefunden."
#~ msgid "Share on Google+"
#~ msgstr "Auf Google+ teilen"
#~ msgid "Share on Twitter"
#~ msgstr "Auf Twitter teilen"
#~ msgid "Share on Facebook"
#~ msgstr "Auf Facebook teilen"
#~ msgid "Subpages"
#~ msgstr "Unterseiten"

View File

@@ -13,18 +13,20 @@
{% if month %}{{ month|date:'F Y' }}</h2>{% elif year %}{{year}}{% endif %}
{% endblock %}
{% block jumbotron_background %}{% if active_category %}{{ active_category.image.url }}{% else %}{{STATIC_URL}}img/teaser/{{current_top_page.slug}}.jpg{% endif %}{% endblock %}
{% block teaser %}<h2>
{% trans 'Article Archive' %}
{% if active_category %} - {{active_category.name}}{% endif %}
{% if month %}{{ month|date:'F Y' }}{% elif year %}{{year}}{% endif %}
</h2>
<div id="teaser_text">
{% if active_category %}
<div id="teaser_text">
{% if active_category %}
<p>{{ active_category.description }}</p>
{% else %}
{% else %}
{{current_page.content|safe}}
{% endif %}
</div>
{% endif %}
</div>
{% endblock %}
{% block redbox %}
@@ -62,7 +64,7 @@
<h3><a href="{{article.get_absolute_url}}">{{article.headline}}</a></h3>
<ul class="info">
<li><span class="fa fa-calendar-o" title="{% trans 'created on' %}"></span> <time datetime="{{article.date_created|date:'c'}}">{{ article.date_created|date }}</time></li>
<li><span class="fa fa-user" title="{% trans 'by' %}"/> {{ article.author }}</li>
<li><span class="fa fa-user" title="{% trans 'by' %}"></span> {{ article.author }}</li>
<li><span class="fa fa-comments" title="{% trans 'comments' %}"></span> <a href="{{article.get_absolute_url}}#comments" >{{comment_count}} {% trans "comments" %}</a></li>
</ul>
<a href="{{article.get_absolute_url}}"><img src="{{article.posting_image.url}}" alt="{{article.category}}:" class="posting_image" width="200" height="120"/></a>

View File

@@ -16,29 +16,28 @@
{% block itemscope %}itemscope itemtype="http://schema.org/Article"{% endblock %}
{% block teaser %}<h2 itemprop="name">{{article.headline}}</h2>{% endblock %}
{% block content %}
<p>&nbsp;</p>
<div itemprop="articleBody">{{ article.content }}</div>
{% block teaser %}
<h2 itemprop="name">{{article.headline}}</h2>
<div id="teaser_text">
<ul class="info">
<li><span class="fa fa-user"></span> <strong>{% trans 'Author' %}:</strong> <a href="{% url 'membership-details' article.author %}" itemprop="author">{{article.author}}</a></li>
<li><span class="fa fa-calendar-o"></span> <strong>{% trans 'Created on' %}: </strong><time datetime="{{article.date_created|date:'Y-m-d H:i'}}">{{ article.date_created|date }}</time></li>
<li><span class="fa fa-tag"></span> <strong>{% trans "Category"%}: </strong><a href="{{ article.category.get_absolute_url }}" itemprop="articleSection">{{article.category.name}}</a></li>
</ul>
</div>
{% endblock %}
{% block sidebar %}
<p>&nbsp;</p>
<img alt="{{article.category.name}}" src="{{article.posting_image.url}}" class="posting_image" itemprop="image"/>
<p>&nbsp;</p>
<ul class="fa-ul">
<li><span class="fa-li fa fa-user"></span> <strong>{% trans 'Author' %}:</strong> <a href="{% url 'membership-details' article.author %}" itemprop="author">{{article.author}}</a></li>
<li><span class="fa-li fa fa-calendar-o"></span> <strong>{% trans 'Created on' %}: </strong><time datetime="{{article.date_created|date:'Y-m-d H:i'}}">{{ article.date_created|date }}</time></li>
<li><span class="fa-li fa fa-tag"></span> <strong>{% trans "Category"%}: </strong><a href="{{ article.category.get_absolute_url }}" itemprop="articleSection">{{article.category.name}}</a></li>
</ul>
<p class="center">
<a href="https://plus.google.com/share?url=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}" onclick="javascript:window.open(this.href,
'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><img src="{{STATIC_URL}}img/google_plus.png" alt="Google+" title="{% trans 'Share on Google+'%}" width="39" height="39"/></a>
<a href="https://twitter.com/share?url=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}" target='_blank'><img src="{{STATIC_URL}}img/twitter.png" alt="Twitter" title="{% trans 'Share on Twitter' %}" width="39" height="39"/></a>
<a href="http://facebook.com/sharer.php?u=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}?t={{article.headline|urlencode}}" target="_blank"><img src="{{STATIC_URL}}img/facebook.png" alt="Facebook" title="{% trans 'Share on Facebook'%}" width="39" height="39"/></a>
{% block maincontent %}
<div itemprop="articleBody" class="grid_12">
<img alt="{{article.category.name}}" src="{{article.posting_image.url}}" class="posting_image" itemprop="image"/>
{{ article.content }}
</div>
<p class="right">
<strong>{% trans 'share on' %}:</strong>
<a class="button" href="https://plus.google.com/share?url=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}"
onclick="javascript:window.open(this.href,'', 'menubar=no,toolbar=no,resizable=yes,scrollbars=yes,height=600,width=600');return false;"><span class="fa fa-google-plus"></span> Google+</a>
<a class="button" href="https://twitter.com/share?url=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}" target='_blank'><span class="fa fa-twitter"></span> Twitter</a>
<a class="button" href="http://facebook.com/sharer.php?u=http%3A%2F%2Fwww.kasu.at{{article.get_absolute_url|urlencode}}?t={{article.headline|urlencode}}" target="_blank"><span class="fa fa-facebook"></span> Facebook</a>
</p>
{% endblock %}

View File

@@ -2,9 +2,11 @@
{% load i18n fieldset_extras %}
{% block extra_head %}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-1.6.2.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/language_tabs.js" ></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/ckeditor/ckeditor.js"></script>
{{ form.media }}
<!-- script type="text/javascript" src="{{ STATIC_URL }}js/ckeditor/ckeditor.js"></script -->
{% endblock %}
{% block maincontent %}
@@ -39,7 +41,7 @@
</form>
{% endblock %}
{% block javascript %}
{% block java_script %}
CKEDITOR.replace( 'id_content_de' );
CKEDITOR.replace( 'id_content_en' );
{% endblock %}

View File

@@ -13,25 +13,10 @@
<meta property="og:description" content="{{ page.content|striptags|truncatewords:25 }}" />
{% endblock %}
{% block content %}
{% block maincontent %}
{{ page.content }}
{% endblock %}
{% block sidebar %}
{% if current_top_page.subpages %}
{% for subpage in current_top_page.subpages.all %}
{% if subpage.content_type > 0 %}
<h2><a href="{{ subpage.get_absolute_url }}">{{subpage.title}}</a></h2>
<ul class="list">
{% for subpage in subpage.subpages.all %}
<li class="{{subpage.css_class}}"><a href="{{ subpage.get_absolute_url }}">{{ subpage.menu_name }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endfor %}
{% endif %}
{% endblock %}
{% block comments %}{% if page.enable_comments %}
{% render_comment_list for page %}
{% render_comment_form for page %}

View File

@@ -2,13 +2,11 @@
{% load i18n fieldset_extras %}
{% block title %}
{% if object.pk %}{% trans "Edit Page" %}: {{ page.title }}
{% else %}{% trans "Add Page" %}
{% endif %}
{% if object.pk %}{% trans "Edit Page" %}: {{ page.title }}{% else %}{% trans "Add Page" %}{% endif %}
{% endblock %}
{% block extra_head %}
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery-2.1.3.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/jquery.min.js"></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/language_tabs.js" ></script>
<script type="text/javascript" src="{{ STATIC_URL }}js/ckeditor/ckeditor.js"></script>
{% endblock %}
@@ -23,49 +21,53 @@
{% block maincontent %}
{% get_fieldset "parent, slug, content_type, status" from form as fieldset_common %}
{% get_fieldset "menu_name_de, title_de, pdf_de, content_de" from form as fieldset_de %}
{% get_fieldset "menu_name_en, title_en, pdf_en, content_en" from form as fieldset_en %}
{% get_fieldset "menu_name_de, title_de, pdf_de" from form as fieldset_de %}
{% get_fieldset "menu_name_en, title_en, pdf_en" from form as fieldset_en %}
{% get_fieldset "template, enable_comments" from form as fieldset_html %}
<form method="post" enctype="multipart/form-data" class="grid_12">
{% csrf_token %}
<fieldset>
<legend>{% if object.pk %}{% trans "Edit Page" %}{% else %}{% trans "Add Page" %}{% endif %}</legend>
{% with fieldset_common as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<form method="post" enctype="multipart/form-data">
<fieldset>
{% csrf_token %}
<legend>{% if object.pk %}{% trans "Edit Page" %}{% else %}{% trans "Add Page" %}{% endif %}</legend>
{% with fieldset_common as form %}{% include "form.html" %}{% endwith %}
<legend>{% trans "HTML Specific" %}</legend>
{% with fieldset_html as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<ul class="tabs">
<li><a href="#de">{% trans "German" %}</a></li>
<li><a href="#en">{% trans "English" %}</a></li>
</ul>
<ul class="tabs grid_12">
<li><a href="#de">{% trans "German" %}</a></li>
<li><a href="#en">{% trans "English" %}</a></li>
</ul>
<div class="tab_container">
<fieldset id="de" class="tab_content">
<legend>{% trans "German" %}</legend>
{% with fieldset_de as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<fieldset id="en" class="tab_content">
<legend>{% trans "English" %}</legend>
{% with fieldset_en as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<div class="tab_container grid_12"">
<section id="de" class="tab_content">
<fieldset>
<legend>{% trans "German" %}</legend>
{% with fieldset_de as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<br>
{{form.content_de}}
</section>
<section id="en" class="tab_content">
<fieldset>
<legend>{% trans "English" %}</legend>
{% with fieldset_en as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<br>
{{form.content_en}}
</section>
</div>
<fieldset>
<legend>{% trans "HTML Specific" %}</legend>
{% with fieldset_html as form %}{% include "form.html" %}{% endwith %}
</fieldset>
<p class="buttonbar">
<p></p>
<p class="buttonbar grid_12">
<button type="reset"><span class="fa fa-undo"></span> {% trans 'reset' %}</button>
<button type="submit"><span class="fa fa-hdd-o"></span> {% trans 'save' %}</button>
</p>
</form>
{% endblock %}
{% block javascript %}
CKEDITOR.replace( 'id_content_de' );
CKEDITOR.replace( 'id_content_en' );
CKEDITOR.dtd.$removeEmpty['span'] = false;
CKEDITOR.replace( 'id_content_de' );
CKEDITOR.replace( 'id_content_en' );
{% endblock %}