{% extends "template/template.html" %}
{% block title%}Knowledge Base: KB{{e.id}}{% endblock %}
{% block extrahead %}
    <link type="text/css" rel="stylesheet" href="/static/css/rack.css">
{% endblock %}
{% block breadcrumbs %}<div class="breadcrumbs"><A HREF="/">Home</A> &rsaquo; <A HREF="/kb/">Knowledge Base</A> &rsaquo; KB{{e.id}}</div>{% endblock %}
{% block content %}
<ul class="object-tools">
    {% if has_bookmark %}
    <LI><A HREF="/kb/{{e.id}}/bookmark/unset/" class="addlink">Unset Bookmark</A></LI>
    {% else %}
    <LI><A HREF="/kb/{{e.id}}/bookmark/set/" class="addlink">Set Bookmark</A></LI>
    {% endif %}
    <LI><A HREF="/admin/kb/kbentry/add/" class="addlink">Add KB Entry</A></LI>
    <LI><A HREF="/admin/kb/kbentry/{{e.id}}/" class="addlink">Edit</A></LI>
</ul>
<h1>KB{{e.id}}: {{e.subject}}</h1>
{{e.html|safe}}

{% if e.has_visible_attachments %}
<H2>Attachments</H2>
<TABLE BORDER="0">
    <TR><TH>Name</TH><TH>Description</TH><TH>Size</TH><TH>Last Changed</TH></TR>
{% for a in e.visible_attachments %}
    <TR><TD><A HREF="{{a.url}}">{{a.name}}</A></TD><TD>{{a.description}}</TD><TD>{{a.size|filesizeformat}}</TD><TD>{{a.mtime|date}} {{a.mtime|time}}</TD></TR>
{% endfor %}
</TABLE>
{% endif %}
<hr/>
Posted at {{e.last_history.timestamp|date}} {{e.last_history.timestamp|time}} by {{e.last_history.user}}
{% endblock %}
