add protocoll link if available
This commit is contained in:
@@ -70,12 +70,14 @@ def show(request, id=None):
|
||||
if post_author:
|
||||
author_image = post_author.image['avatar'].url
|
||||
|
||||
ep_link = (get_pad_link(p.agenda_key), get_pad_link(p.protocol_key))
|
||||
|
||||
context = {
|
||||
"post": p,
|
||||
"author_image": author_image,
|
||||
"next": get_next_dict(p),
|
||||
"related_posts": p.tags.similar_objects(),
|
||||
"ep_link": get_pad_link(p.agenda_key),
|
||||
"ep_link": ep_link,
|
||||
}
|
||||
|
||||
response = render(request, 'posts/show.html', context)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
|
||||
{% extends "layout.html" %}
|
||||
{% load post_helpers %}
|
||||
{% load thumbnail %}{% load admin_urls %}
|
||||
{% load admin_urls %}
|
||||
{% block content %}
|
||||
|
||||
<div class="large-article-header" style="background-image:url('{{post.imageurl}}')">
|
||||
@@ -39,17 +39,21 @@
|
||||
<br>
|
||||
<a href="{% url 'posts.show' next %}">Nächster Artikel</a><br>
|
||||
{% include 'posts/partials/_date_box.html' %}
|
||||
{{post.event_start}}
|
||||
{{post.event_end}}
|
||||
Start: {{post.event_start}}<br>
|
||||
Ende: {{post.event_end}}<br>
|
||||
|
||||
{% if post.has_agenda %}
|
||||
<a href="{{ep_link}}">EP</a>
|
||||
<a href="{{ep_link.0}}">Agenda</a>
|
||||
{% endif %}
|
||||
|
||||
{% if post.has_protocol %}
|
||||
<a href="{{ep_link.1}}">Protokoll</a>
|
||||
{% endif %}
|
||||
|
||||
--
|
||||
{% if request.user.is_authenticated %}
|
||||
<br>------<br>
|
||||
<a href="{% url "admin:posts_news_change" post.id %}">Bearbeiten</a>
|
||||
|
||||
{% endif %}
|
||||
|
||||
<hr>
|
||||
{{post.body | safe | add_internal_links | tags_to_url}}
|
||||
|
||||
Reference in New Issue
Block a user