Browse Source

seminar/static

pull/60/head
Jonas Havelka 3 months ago
parent
commit
18364eb531
  1. 0
      personalni/static/personalni/lisak.pdf
  2. 0
      personalni/static/personalni/no-photo.png
  3. 2
      personalni/templates/personalni/organizatori.html
  4. 2
      personalni/views.py
  5. 0
      soustredeni/static/soustredeni/logomm.pdf
  6. 2
      soustredeni/views.py
  7. 0
      tvorba/static/tvorba/no-picture.png
  8. 0
      tvorba/static/tvorba/tema-bez-obrazku.png
  9. 4
      tvorba/templates/tvorba/archiv/rocnik.html
  10. 2
      tvorba/templates/tvorba/tematka/rozcestnik.html
  11. 2
      tvorba/views/views_all.py

0
seminar/static/seminar/lisak.pdf → personalni/static/personalni/lisak.pdf

0
seminar/static/images/no-photo.png → personalni/static/personalni/no-photo.png

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 2.9 KiB

2
personalni/templates/personalni/organizatori.html

@ -46,7 +46,7 @@
{% if org.osoba.foto %}
<a href="{{org.osoba.foto.url}}" class="ref-org-foto"><img src="{{org.osoba.foto_male.url}}" height="{{org.osoba.foto_male.height}}" alt="{{org.osoba.jmeno}} {{org.osoba.prijmeni}}"></a>
{% else %} {# pokud osoba nemá fotku, zobrazuje se defaultní obrázek #}
{% load static %} <img src="{% static 'images/no-photo.png' %}" height=200px alt="{{org.osoba.jmeno}} {{org.osoba.prijmeni}}">
{% load static %} <img src="{% static 'personalni/no-photo.png' %}" height=200px alt="{{org.osoba.jmeno}} {{org.osoba.prijmeni}}">
{% endif %}
</div>

2
personalni/views.py

@ -76,7 +76,7 @@ def obalkyView(request, resitele):
with tempfile.TemporaryDirectory() as tempdir:
with open(tempdir+"/obalky.tex", "w") as texfile:
texfile.write(tex.decode())
shutil.copy(find('seminar/lisak.pdf'), tempdir)
shutil.copy(find('personalni/lisak.pdf'), tempdir)
subprocess.call(["pdflatex", "obalky.tex"], cwd=tempdir)
with open(tempdir+"/obalky.pdf", "rb") as pdffile:

0
seminar/static/images/logomm.pdf → soustredeni/static/soustredeni/logomm.pdf

2
soustredeni/views.py

@ -93,7 +93,7 @@ def soustredeniStvrzenkyView(request, soustredeni):
with open(tempdir / "stvrzenky.tex", "w") as texfile:
texfile.write(tex.decode())
shutil.copy(find('images/logomm.pdf'), tempdir)
shutil.copy(find('soustredeni/logomm.pdf'), tempdir)
subprocess.call(["pdflatex", "stvrzenky.tex"], cwd = tempdir, stdout=subprocess.DEVNULL)
with open(tempdir / "stvrzenky.pdf", "rb") as pdffile:

0
seminar/static/images/no-picture.png → tvorba/static/tvorba/no-picture.png

Before

Width:  |  Height:  |  Size: 86 KiB

After

Width:  |  Height:  |  Size: 86 KiB

0
seminar/static/images/tema-bez-obrazku.png → tvorba/static/tvorba/tema-bez-obrazku.png

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 300 KiB

4
tvorba/templates/tvorba/archiv/rocnik.html

@ -34,7 +34,7 @@
{% if c.titulka_nahled %}
<img src="{{ c.titulka_nahled.url }}" alt="{{ c.kod }}" height=180px>
{% else %}
{% load static %} <img src="{% static 'images/no-picture.png' %}" height=180px alt="no-picture">
{% load static %} <img src="{% static 'tvorba/no-picture.png' %}" height=180px alt="no-picture">
{% endif %}
</div>
@ -80,7 +80,7 @@
{% if c.titulka_nahled %}
<img src="{{ c.titulka_nahled.url }}" alt="{{ c.kod }}" height=180px>
{% else %}
{% load static %} <img src="{% static 'images/no-picture.png' %}" height=180px alt="no-picture">
{% load static %} <img src="{% static 'tvorba/no-picture.png' %}" height=180px alt="no-picture">
{% endif %}
</div>

2
tvorba/templates/tvorba/tematka/rozcestnik.html

@ -35,7 +35,7 @@
{% if tematko.obrazek %}
<img src="{{ tematko.obrazek.url }}" alt="{{ tematko.nazev }}">
{% else %} {# pokud témátko nemá fotku, zobrazuje se defaultní obrázek #}
{% load static %} <img src="{% static 'images/tema-bez-obrazku.png' %}" alt="{{ tematko.nazev }}">
{% load static %} <img src="{% static 'tvorba/tema-bez-obrazku.png' %}" alt="{{ tematko.nazev }}">
{% endif %}
</div>
</div>

2
tvorba/views/views_all.py

@ -237,7 +237,7 @@ class ArchivView(generic.ListView):
for i, c in enumerate(cisla):
# Výchozí nastavení
if c.rocnik not in urls:
urls[c.rocnik] = op.join(settings.STATIC_URL, "images", "no-picture.png")
urls[c.rocnik] = op.join(settings.STATIC_URL, "tvorba", "no-picture.png")
# NOTE: tohle možná nastavuje poslední titulku
if c.titulka_nahled:
urls[c.rocnik] = c.titulka_nahled.url

Loading…
Cancel
Save