Small template improvements

This commit is contained in:
Skia 2016-11-20 14:08:10 +01:00
parent f900db0dd2
commit 7dff98d853
2 changed files with 4 additions and 4 deletions

View File

@ -5,7 +5,7 @@
{% endblock %} {% endblock %}
{% macro print_path(file) %} {% macro print_path(file) %}
{% if file %} {% if file and file.parent %}
{{ print_path(file.parent) }} {{ print_path(file.parent) }}
<a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> > <a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> >
{% endif %} {% endif %}
@ -13,7 +13,7 @@
{% block content %} {% block content %}
{{ print_path(album.parent) }} {{ album.get_display_name() }} <a href="{{ url('sas:main') }}">SAS</a> > {{ print_path(album.parent) }} {{ album.get_display_name() }}
<h3>{{ album.get_display_name() }}</h3> <h3>{{ album.get_display_name() }}</h3>
<div> <div>
{% for a in album.children.filter(is_folder=True, is_moderated=True).all() %} {% for a in album.children.filter(is_folder=True, is_moderated=True).all() %}

View File

@ -25,14 +25,14 @@
{% endblock %} {% endblock %}
{% macro print_path(file) %} {% macro print_path(file) %}
{% if file %} {% if file and file.parent %}
{{ print_path(file.parent) }} {{ print_path(file.parent) }}
<a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> > <a href="{{ url('sas:album', album_id=file.id) }}">{{ file.get_display_name() }}</a> >
{% endif %} {% endif %}
{% endmacro %} {% endmacro %}
{% block content %} {% block content %}
{{ print_path(picture.parent) }} {{ picture.get_display_name() }} <a href="{{ url('sas:main') }}">SAS</a> > {{ print_path(picture.parent) }} {{ picture.get_display_name() }}
<h3>{{ picture.get_display_name() }}</h3> <h3>{{ picture.get_display_name() }}</h3>
<div style="display: inline-block; width: 89%; background: #333; border: solid #333 2px;" id="pict"> <div style="display: inline-block; width: 89%; background: #333; border: solid #333 2px;" id="pict">
{% if is_vertical %} {% if is_vertical %}