Merge pull request 'Export do abstraktů (soustředění)' (!61) from sbornicek into master
Reviewed-on: #61
This commit is contained in:
commit
c45bf88d40
6 changed files with 55 additions and 0 deletions
|
@ -1079,5 +1079,29 @@
|
||||||
},
|
},
|
||||||
"model": "sitetree.treeitem",
|
"model": "sitetree.treeitem",
|
||||||
"pk": 53
|
"pk": 53
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"fields": {
|
||||||
|
"access_guest": false,
|
||||||
|
"access_loggedin": false,
|
||||||
|
"access_perm_type": 1,
|
||||||
|
"access_permissions": [],
|
||||||
|
"access_restricted": true,
|
||||||
|
"alias": null,
|
||||||
|
"description": "",
|
||||||
|
"hidden": false,
|
||||||
|
"hint": "",
|
||||||
|
"inbreadcrumbs": true,
|
||||||
|
"inmenu": true,
|
||||||
|
"insitetree": true,
|
||||||
|
"parent": 20,
|
||||||
|
"sort_order": 54,
|
||||||
|
"title": "Export do abstraktů sousu {{ soustredeni.id }}",
|
||||||
|
"tree": 1,
|
||||||
|
"url": "seminar_soustredeni_abstrakty soustredeni.id",
|
||||||
|
"urlaspattern": true
|
||||||
|
},
|
||||||
|
"model": "sitetree.treeitem",
|
||||||
|
"pk": 54
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -77,6 +77,10 @@ class Soustredeni(SeminarModelBase):
|
||||||
#return reverse('seminar_soustredeni', kwargs={'pk': self.id})
|
#return reverse('seminar_soustredeni', kwargs={'pk': self.id})
|
||||||
return reverse('seminar_seznam_soustredeni')
|
return reverse('seminar_seznam_soustredeni')
|
||||||
|
|
||||||
|
def admin_url(self):
|
||||||
|
model_name = self.__class__.__name__.lower()
|
||||||
|
return reverse('admin:soustredeni_{}_change'.format(model_name), args=(self.id, ))
|
||||||
|
|
||||||
|
|
||||||
@reversion.register(ignore_duplicates=True)
|
@reversion.register(ignore_duplicates=True)
|
||||||
class Soustredeni_Ucastnici(SeminarModelBase):
|
class Soustredeni_Ucastnici(SeminarModelBase):
|
||||||
|
|
17
soustredeni/templates/soustredeni/export_do_abstraktu.html
Normal file
17
soustredeni/templates/soustredeni/export_do_abstraktu.html
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
{% extends "base.html" %}
|
||||||
|
{% load tex %}
|
||||||
|
|
||||||
|
{% block nadpis1a %}
|
||||||
|
Soustředění – export do abstraktů
|
||||||
|
{% endblock %}
|
||||||
|
|
||||||
|
{% block content %}
|
||||||
|
<h1>Export do abstraktů Soustředění {{ soustredeni }}</h1>
|
||||||
|
|
||||||
|
{# Zde zcela záměrně chybí nějaké whitespacy, např. odřádkování a odsazení #}
|
||||||
|
<pre><code>{% for ucastnik in soustredeni.ucastnici.all %}\ucastnik{{ ucastnik|sloz }}{{ ucastnik.osoba.email|sloz }}{{ ucastnik.skola|sloz }}
|
||||||
|
{% endfor %}
|
||||||
|
{% for vedouci in soustredeni.organizatori.all %}\vedouci{{ vedouci|sloz }}{{ vedouci.osoba.email|sloz }}{TODO}
|
||||||
|
{% endfor %}</code></pre>
|
||||||
|
|
||||||
|
{% endblock %}
|
|
@ -40,6 +40,7 @@
|
||||||
<div class="mam-org-only">
|
<div class="mam-org-only">
|
||||||
<a href="../{{soustredeni.pk}}/fotogalerie/0/new/">Vytvořit novou fotogalerii</a><br>
|
<a href="../{{soustredeni.pk}}/fotogalerie/0/new/">Vytvořit novou fotogalerii</a><br>
|
||||||
<a href="../{{soustredeni.pk}}/obalky.pdf">Vygenerovat obálky pro účastníky</a><br>
|
<a href="../{{soustredeni.pk}}/obalky.pdf">Vygenerovat obálky pro účastníky</a><br>
|
||||||
|
<a href={% url 'seminar_soustredeni_abstrakty' soustredeni.pk %}>Vygenerovat účastníky a vedoucí do abstraktů</a><br>
|
||||||
Seznam účastníků -
|
Seznam účastníků -
|
||||||
<a href="../{{soustredeni.pk}}/seznam_ucastniku">HTML tabulka pro tisk</a>,
|
<a href="../{{soustredeni.pk}}/seznam_ucastniku">HTML tabulka pro tisk</a>,
|
||||||
<a href="../{{soustredeni.pk}}/export_ucastniku">CSV</a>,
|
<a href="../{{soustredeni.pk}}/export_ucastniku">CSV</a>,
|
||||||
|
|
|
@ -33,6 +33,11 @@ urlpatterns = [
|
||||||
org_required(views.soustredeniObalkyView),
|
org_required(views.soustredeniObalkyView),
|
||||||
name='seminar_soustredeni_obalky'
|
name='seminar_soustredeni_obalky'
|
||||||
),
|
),
|
||||||
|
path(
|
||||||
|
'soustredeni/<int:pk>/abstrakty',
|
||||||
|
org_required(views.SoustredeniAbstraktyView.as_view()),
|
||||||
|
name='seminar_soustredeni_abstrakty'
|
||||||
|
),
|
||||||
path(
|
path(
|
||||||
'soustredeni/<int:soustredeni>/fotogalerie/',
|
'soustredeni/<int:soustredeni>/fotogalerie/',
|
||||||
include('galerie.urls')
|
include('galerie.urls')
|
||||||
|
|
|
@ -99,3 +99,7 @@ def soustredeniStvrzenkyView(request, soustredeni):
|
||||||
with open(tempdir / "stvrzenky.pdf", "rb") as pdffile:
|
with open(tempdir / "stvrzenky.pdf", "rb") as pdffile:
|
||||||
response = HttpResponse(pdffile.read(), content_type='application/pdf')
|
response = HttpResponse(pdffile.read(), content_type='application/pdf')
|
||||||
return response
|
return response
|
||||||
|
|
||||||
|
class SoustredeniAbstraktyView(generic.DetailView):
|
||||||
|
model = Soustredeni
|
||||||
|
template_name = 'soustredeni/export_do_abstraktu.html'
|
||||||
|
|
Loading…
Reference in a new issue