Skip to content
Snippets Groups Projects
Commit e45df0d8 authored by Benjamin Hättasch's avatar Benjamin Hättasch
Browse files

Create submission overview page and improve ak model access

Create html template
Add translation
Add property for easy access to list of AK owners to AK model
parent ea778fee
No related branches found
No related tags found
No related merge requests found
...@@ -153,6 +153,10 @@ class AK(models.Model): ...@@ -153,6 +153,10 @@ class AK(models.Model):
return self.short_name return self.short_name
return self.name return self.name
@property
def owners_list(self):
return ", ".join(str(owner) for owner in self.owners.all())
class Room(models.Model): class Room(models.Model):
""" A room describes where an AK can be held. """ A room describes where an AK can be held.
......
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2019-10-17 14:14+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
#: templates/AKSubmission/submission_overview.html:9
#: templates/AKSubmission/submission_overview.html:13
msgid "AK Submission"
msgstr "AK-Eintragung"
#: templates/AKSubmission/submission_overview.html:18
msgid "Submit"
msgstr "Eintragen"
#: templates/AKSubmission/submission_overview.html:24
msgid "Current AKs"
msgstr "Aktuelle AKs"
#: templates/AKSubmission/submission_overview.html:27
msgid "Name"
msgstr "Name"
#: templates/AKSubmission/submission_overview.html:27
msgid "Who?"
msgstr "Wer?"
#: templates/AKSubmission/submission_overview.html:27
msgid "Tags"
msgstr "Tags"
{% extends 'base.html' %}
{% load i18n %}
{% load fontawesome %}
{% block breadcrumbs %}
<li class="breadcrumb-item"><a href="#">AKPlanning</a></li>
<li class="breadcrumb-item"><a href="#">{{ event.slug }}</a></li>
<li class="breadcrumb-item active">{% trans "AK Submission" %}</li>
{% endblock %}
{% block content %}
<h1>{{ event.name }}: {% trans "AK Submission" %}</h1>
Lorem ipsum...
<div class="jumbotron" style="margin-top:20px;">
<h2>{% trans "Submit" %}</h2>
<a href="#" class="btn btn-primary">Neuer AK</a>
<a href="#" class="btn btn-info">Neuer AK-Wunsch</a>
</div>
<h2>{% trans "Current AKs" %}</h2>
<table class="table table-striped">
<tr><th>{% trans "Name" %}</th><th>{% trans "Who?" %}</th><th>{% trans "Tags" %}</th><th></th></tr>
{% for ak in AKs %}
<tr>
<td>{{ ak.name }}</td>
<td>{{ ak.owners_list }}</td>
<td>
{% for tag in ak.tags.all %}
<span class="badge badge-info">{{ tag }}</span>
{% endfor %}
</td>
<td>
<a href="#" class="btn btn-primary">{% fontawesome_icon 'info' %}</a>
<a href="#" class="btn btn-success">{% fontawesome_icon 'edit' %}</a>
</td>
</tr>
{% endfor %}
</table>
{% endblock %}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment