add posts and member change, article date is event start or public date

This commit is contained in:
2021-02-01 15:14:34 +00:00
parent 5532e9ccfd
commit 7514bbd610
2 changed files with 38 additions and 14 deletions

View File

@@ -6,6 +6,10 @@
<img src= "{{member.image.portrait.url}}" style="width:150px;">
</div>
<div class="media-object-section main-section padding-bottom-1"">
{% if request.user.is_authenticated %}
<a href="{% url 'admin:members_member_change' member.id %}">Profil bearbeiten</a>
<hr>
{% endif %}
<h1>{{ member.firstname }} {{ member.surname }}</h1>
<p>Spitzname: {{ member.nickname }} </br>
Mailaccount: {{ member.mailaccount }} </br>

View File

@@ -2,21 +2,23 @@
{% load post_helpers %}
{% load admin_urls %}
{% block extraheader %}
<meta content="{{ post.imageurl }}" property="og:image">
<meta content="{{ post.title }}" property="og:title">
<meta content="article" property="og:type">
<meta content="" property="og:url">
{% endblock %}
{% block content %}
{% block content %}
<div class="large-article-header" style="background-image:url('{{ post.imageurl }}')">
<div class="large-article-header-content">
<div class="center-container">
<div class="article-date">
<p>{{ post.public_date }}</p>
{% if post.post_type != 'N' %}
<p>{{ post.event_start|date:"d. F Y" }}</p>
{% else %}
<p>{{ post.public_date|date:"d. F Y" }}</p>
{% endif %}
</div>
<div class="article-title">
@@ -36,13 +38,13 @@
{% elif post.author %}
<div class="article-author">
<a href="">
<img src="" alt="" /> {{ post.author }}
<img src="" alt="" /> {{ post.author }}
</a>
</div>
{% else %}
<div class="article-author">
<a href="">
<img src="" alt="" />
<img src="" alt="" />
</a>
</div>
{% endif %}
@@ -57,17 +59,24 @@
{% for tag in post.get_tagnames %}
{{ tag|tags_to_url }}
{% endfor %}
<hr>
{% if post.has_agenda %}
<h2>Agenda</h2>
{{ post.agenda_html|safe }}
<h2>Agenda</h2>
{{ post.agenda_html|safe }}
<hr>
{% endif %}
{% if post.body %}
{{ post.body|safe|add_internal_links|tags_to_url }}
<hr>
{% endif %}
{{ post.body|safe|add_internal_links|tags_to_url }}
<hr>
</div>
<div class="cell medium-4">
<a href="{% url 'posts.show' next %}">Nächster Artikel <span class="nav fa fa-chevron-right fa-1x"></span></a><br>
<hr>
{% if request.user.is_authenticated %}
{% if post.has_agenda %}
@@ -76,18 +85,29 @@
{% if post.has_protocol %}
<a href="{{ ep_protocol_link }}">Protokoll</a><br>
<hr>
{% endif %}
{% if post.post_type == 'N' %}
<a href="{% url 'admin:posts_news_change' post.id %}">Bearbeiten</a>
{% elif post.post_type == 'E' %}
<a href="{% url 'admin:posts_event_change' post.id %}">Bearbeiten</a>
{% elif post.post_type == 'F' %}
<a href="{% url 'admin:posts_fetmeeting_change' post.id %}">Bearbeiten</a>
{% else %}
{% endif %}
<hr>
{% endif %}
{% if post.event_start %}
Start: {{ post.event_start }}<br>
Start: {{ post.event_start|date:"d. F Y" }} {{ post.event_start|time:"H:i" }}<br>
{% endif %}
{% if post.event_end %}
Ende: {{ post.event_end }}<br>
Ende: {{ post.event_end|date:"d. F Y" }} {{ post.event_end|time:"H:i" }}<br>
{% endif %}
<a href="{% url 'posts.show' next %}">Nächster Artikel <span class="nav fa fa-chevron-right fa-1x"></span></a><br>
{% if post.event_start %}
{% include 'posts/partials/_date_box.html' %}
{% endif %}