Files
myriad/myriad/templates/blog/blog.html

33 lines
1.4 KiB
HTML

{% extends 'base.html' %}
{% block header %}
<div class="title">{% block title %}System Blog{% endblock %}</div>
{% endblock %}
{% block content %}
{% for post in blog %}
{% set op = member_ids[post[1]] %}
{% if not g.user and op[23]==0 %}
{% elif not g.user and post[5]==0 %}
{% else %}
<div class="post">
{% if member_icons[op[0]][0] %}
<img src="{{ url_for('static', filename='icons/'+member_icons[op[0]][0]) }}" class="icon">
{% else %}
<img src="{{ url_for('static', filename='any.jpg') }}" class="icon">
{% endif %}
<div class="title">{{post[3]|safe}}</div>
<div class="timestamp">{{post[2]}} - <a href="{{ url_for('home.page', mid=post[1]) }}">{{op[3]}}</a> {% if g.user %}{% if op[23]==0 %}(Private){% else %}(Public)</b>{% endif %}{% endif %}</div>
<div class="content">
{{post[4]|safe}}
</div>
<br class="clear" />
{% if g.user %}
{% if post[5]==0 %}<b style="color:red;">Private</b>{% else %}<b style="color:green;">Public</b>{% endif %} | <a href="{{url_for('blog.toggle',pid=post[0], location='blog')}}">Toggle privacy</a> | <a href="{{url_for('blog.edit',pid=post[0],location='blog')}}">Edit Post</a> | <a href="{{url_for('blog.delete', pid=post[0], location='blog')}}" class="danger">Delete post</a>
{% endif %}
</div>
{% endif %}
{% endfor %}
{% endblock %}