Commit 3f28e3b8 authored by Julian Rother's avatar Julian Rother
Browse files

Put announcements into their own block to be overwritten on main page, closes #327

parent 56861916
......@@ -128,12 +128,14 @@
{% else %}
<div class="col-xs-12 col-md-offset-{{ page_border }} col-md-{{ 12-(2*page_border) }}">
{% endif %}
{% block announcements %}
{% for msg in get_announcements(min_announcement_level) if (not request.cookies['alert-info-'+msg.id|string]) %}
<div class="hidden-print alert alert-{{levels.get(msg.level, ('info', ''))[0]}}" role="alert">
<a href="#" class="close" data-dismiss="alert" aria-label="close" onclick="Cookies.set('alert-info-{{msg.id}}', '1');">&times;</a>
{{ msg.text|safe }}
</div>
{% endfor %}
{% endblock %}
{% block alerts %}
{% for msg in get_flashed_messages(category_filter=["message"]) %}
<div class="hidden-print alert alert-danger" role="alert">{{ msg|safe }}</div>
......
{% from 'macros.html' import preview, featured_content, livelabel %}
{% extends "base.html" %}
{% set page_border = 0 %}
{% if ismod() %}
{# Little hack to not show annoucements twice #}
{% set min_announcement_level = 999 %}
{% else %}
{% set min_announcement_level = 0 %}
{% endif %}
{% block content %}
{% set min_announcement_level = 0 %}
{% block announcements %}
{% if ismod() %}
<div class="row">
<div class="col-xs-12">
......@@ -50,6 +45,12 @@
{% endfor %}
</div>
</div>
{% else %}
{{ super() }}
{% endif %}
{% endblock %}
{% block content %}
{% if ismod() %}
<div class="row">
<div class="col-xs-12">
<ul class="list-inline pull-right">
......
Markdown is supported
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