Commit 4094946e authored by Julian Rother's avatar Julian Rother
Browse files

Fixed preview macro when hrefs are used in author field (#147)

parent c76b6faa
{% macro preview(lecture) %}
<li class="list-group-item">
<a class="hidden-xs" href="{{url_for('lecture', id=lecture['id'])}}" title="{{ lecture.course.title }}" style="color: #000">
<div class="row">
<img class="col-xs-4" style="max-height: 100px; width: auto;" src="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; ">
<div class="col-xs-4">
<span><strong>{{ lecture.course.short }}</strong>{% if ismod() %} <i>({{lecture.course_id}})</i>{% endif %}</span><br>
<span>{% if ismod() %}ID: {{lecture.id}}{% endif %}</span><br>
<span>{{ lecture['time'] }}</span>
<a href="{{url_for('lecture', id=lecture['id'])}}" title="{{ lecture.course.title }}" style="color: #000">
<div class="hidden-xs">
<div class="row">
<img class="col-xs-4" style="max-height: 100px; width: auto;" src="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; ">
<div class="col-xs-4">
<span><strong>{{ lecture.course.short }}</strong>{% if ismod() %} <i>({{lecture.course_id}})</i>{% endif %}</span><br>
<span>{% if ismod() %}ID: {{lecture.id}}{% endif %}</span><br>
<span>{{ lecture['time'] }}</span>
{% if lecture['speaker'] %}
<div class="small">Gehalten von {{ lecture['speaker']|safe }} </div>
{% endif %}
</div>
<div class="col-xs-4">
<div>{{ lecture['title']|fixnl|safe }}</div>
<p style="font-style: italic; color: #777;">{{ lecture['comment']|fixnl|safe }}</p>
</div>
</div>
</div>
<div class="visible-xs">
<ul class="list-unstyled">
<li>
<img style="width: 100%;" src="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; ">
</li>
<li>
<strong>{{ lecture.course.short }}</strong> {{ lecture['time'] }}
</li>
{% if lecture['speaker'] %}
<div class="small">Gehalten von {{ lecture['speaker']|safe }} </div>
<li>
<span class="small">Gehalten von {{ lecture['speaker']|safe }} </span>
</li>
{% endif %}
</div>
<div class="col-xs-4">
<div>{{ lecture['title']|fixnl|safe }}</div>
<p style="font-style: italic; color: #777;">{{ lecture['comment']|fixnl|safe }}</p>
</div>
<li>
{{ lecture['title']|fixnl|safe }}
</li>
<li>
<p style="font-style: italic; color: #777;">{{ lecture['comment']|fixnl|safe }}</p>
</li>
</ul>
</div>
</a>
<a class="visible-xs" href="{{url_for('lecture', id=lecture['id'])}}" title="{{ lecture.course.title }}" style="color: #000">
<ul class="list-unstyled">
<li>
<img style="width: 100%;" src="{{ config.VIDEOPREFIX }}/{{ lecture['titlefile'] }}" alt="Vorschaubild" onerror="this.src='{{url_for('static',filename='no-thumbnail.png')}}'; this.onerror=''; ">
</li>
<li>
<strong>{{ lecture.course.short }}</strong> {{ lecture['time'] }}
</li>
{% if lecture['speaker'] %}
<li>
<span class="small">Gehalten von {{ lecture['speaker']|safe }} </span>
</li>
{% endif %}
<li>
{{ lecture['title']|fixnl|safe }}
</li>
<li>
<p style="font-style: italic; color: #777;">{{ lecture['comment']|fixnl|safe }}</p>
</li>
</ul>
</a>
</li>
{% endmacro %}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment