Sith/com/templates/com/news_detail.jinja

51 lines
1.9 KiB
Django/Jinja
Raw Normal View History

{% extends "core/base.jinja" %}
2017-09-29 15:18:06 +00:00
{% from 'core/macros.jinja' import user_profile_link, facebook_share, tweet, link_news_logo, gen_news_metatags %}
{% block title %}
{% trans %}News{% endtrans %} -
{{ object.title }}
{% endblock %}
2017-09-29 15:18:06 +00:00
{% block head %}
{{ super() }}
{{ gen_news_metatags(news) }}
{% endblock %}
{% block content %}
2016-12-23 17:40:12 +00:00
<p><a href="{{ url('com:news_list') }}">{% trans %}Back to news{% endtrans %}</a></p>
2017-09-29 15:18:06 +00:00
<section id="news_details">
<div class="club_logo">
<img src="{{ link_news_logo(news)}}" alt="{{ news.club }}" />
<a href="{{ news.club.get_absolute_url() }}">{{ news.club }}</a>
</div>
2016-12-23 17:40:12 +00:00
<h4>{{ news.title }}</h4>
<p class="date">
<span>{{ news.dates.first().start_date|localtime|date(DATETIME_FORMAT) }}
{{ news.dates.first().start_date|localtime|time(DATETIME_FORMAT) }}</span> -
<span>{{ news.dates.first().end_date|localtime|date(DATETIME_FORMAT) }}
{{ news.dates.first().end_date|localtime|time(DATETIME_FORMAT) }}</span>
</p>
2017-09-29 15:18:06 +00:00
<div class="news_content">
<div><em>{{ news.summary|markdown }}</em></div>
<br/>
<div>{{ news.content|markdown }}</div>
2017-09-29 15:18:06 +00:00
{{ facebook_share(news) }}
{{ tweet(news) }}
<div class="news_meta">
2016-12-23 17:40:12 +00:00
<p>{% trans %}Author: {% endtrans %}{{ user_profile_link(news.author) }}</p>
{% if news.moderator %}
<p>{% trans %}Moderator: {% endtrans %}{{ user_profile_link(news.moderator) }}</p>
{% elif user.is_in_group(settings.SITH_GROUP_COM_ADMIN_ID) %}
<p> <a href="{{ url('com:news_moderate', news_id=news.id) }}">{% trans %}Moderate{% endtrans %}</a></p>
{% endif %}
{% if user.can_edit(news) %}
<p> <a href="{{ url('com:news_edit', news_id=news.id) }}">{% trans %}Edit (will be remoderated){% endtrans %}</a></p>
{% endif %}
2017-09-29 15:18:06 +00:00
</div>
</div>
2016-12-23 17:40:12 +00:00
</section>
{% endblock %}