Compare commits
No commits in common. "e29bce66a48019b5ca12efee8b01648eb8a9bb81" and "71a85571c13d63490d42e8bee0ed5ca49d67d8c6" have entirely different histories.
e29bce66a4
...
71a85571c1
2 changed files with 3 additions and 10 deletions
|
|
@ -1,7 +1,6 @@
|
||||||
{% extends "base.html" %}
|
{% extends "base.html" %}
|
||||||
{% load static %}
|
{% load static %}
|
||||||
{% load deadliny %}
|
{% load deadliny %}
|
||||||
{% load mail %}
|
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
|
|
@ -15,10 +14,7 @@
|
||||||
|
|
||||||
{% if edit %}
|
{% if edit %}
|
||||||
<p>Řešitelé:
|
<p>Řešitelé:
|
||||||
{% for r in object.resitele.all %}
|
{% for r in object.resitele.all %}{{ r }} (<a href="mailto:{{ r.osoba.email }}?subject={{ "Oprava řešení M&M " | urlencode }}{{ object.problem.all.0.hlavni_problem | urlencode }}">{{ r.osoba.email }}</a>){% if forloop.revcounter0 != 0 %}, {% endif %}{% endfor %}
|
||||||
{{ r }}
|
|
||||||
({% maillink r.osoba.email to=r.osoba.email subject=mailsubject %}){% if forloop.revcounter0 != 0 %}, {% endif %}
|
|
||||||
{% endfor %}
|
|
||||||
</p>
|
</p>
|
||||||
{% else %}
|
{% else %}
|
||||||
<p>Řešitelé: {{ object.resitele.all | join:", " }}</p>
|
<p>Řešitelé: {{ object.resitele.all | join:", " }}</p>
|
||||||
|
|
|
||||||
|
|
@ -235,11 +235,8 @@ class DetailReseniView(DetailView):
|
||||||
def get_context_data(self, **kw):
|
def get_context_data(self, **kw):
|
||||||
self.check_access()
|
self.check_access()
|
||||||
ctx = super().get_context_data(**kw)
|
ctx = super().get_context_data(**kw)
|
||||||
detaily_hodnoceni = self.aktualni_hodnoceni()
|
hodnoceni = self.aktualni_hodnoceni()
|
||||||
ctx["hodnoceni"] = detaily_hodnoceni
|
ctx["hodnoceni"] = hodnoceni
|
||||||
|
|
||||||
# Subject případného mailu (template neumí použitelně spojovat řetězce: https://stackoverflow.com/q/4386168)
|
|
||||||
ctx["mailsubject"] = "Oprava řešení M&M "+self.reseni.problem.first().hlavni_problem.nazev
|
|
||||||
return ctx
|
return ctx
|
||||||
|
|
||||||
def get(self, request, *args, **kwargs):
|
def get(self, request, *args, **kwargs):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue