{% extends 'wiki/master.html' %}
{% do g.register_forge_css('css/forge/hilite.css', compress=False) %}
{% block title %}{{c.project.name}} / {{c.app.config.options.mount_label}} / {{page.title}}{% endblock %}
{% block header %}{{page.title}}{% if page['deleted'] %}<span> (deleted)</span>{% endif %}{% endblock %}
{% block extra_css %}
<style>
.hidden { display: None }
a.notfound { color: #f00; }
</style>
{% endblock %}
{% block head %}
<link rel="alternate" type="application/rss+xml" title="Page RSS" href="feed.rss"/>
<link rel="alternate" type="application/atom+xml" title="Page Atom" href="feed.atom"/>
<link rel="alternate" type="application/rss+xml" title="Wiki RSS" href="../feed.rss"/>
<link rel="alternate" type="application/atom+xml" title="Wiki Atom" href="../feed.atom"/>
{% endblock %}
{% block body_attrs %} class="wiki-{{(page.title).replace(' ','_')}}"{% endblock %}
{% block actions %}
{% if not page['deleted'] %}
{% if c.user and c.user != c.user.anonymous() %}
<a href="edit" class="btn ico-l"><b class="ui-icon ui-icon-pencil"></b> <span>Edit</span></a>
{% endif %}
<a href="history" class="btn ico-l"><b class="ui-icon ui-icon-search"></b> <span>History</span></a>
{% elif has_artifact_access('delete', page)() %}
<a href="undelete" class="btn ico-l"><b class="ui-icon ui-icon-plusthick"></b> <span>Undelete</span></a>
{% endif %}
{% if c.user and c.user != c.user.anonymous() %}
{{c.subscribe_form.display(value=subscribed, action='subscribe', style='icon')}}
{% endif %}
<a href="feed" class="btn ico"><b class="ui-icon ui-icon-signal-diag"></b> <span>RSS</span></a>
{% endblock %}
{% block wiki_content %}
{{page.html_text}}
{% endblock %}
{% block right_content %}
{% if page.labels %}
<div>
Labels:
{% for label in page.labels %}
{% if label != '' %}
<span><a href="{{c.app.url}}search/?q=labels_t:{{label}}">{{label}} ({{page.artifacts_labeled_with(label).count()}})</a></span>
{% endif %}
{% endfor %}
<hr/>
</div>
{% endif %}
<div class="gravatar sm">
Authors:
{% for author in page.authors() %}
<a href="{{author.url()}}">
{{gravatar(author, size=16)}}
</a>
{% endfor %}
</div>
{% if page.attachments %}
<div>
<hr/>
<strong>Attachments</strong>
</div>
{% endif %}
{% for att in page.attachments %}
<hr/>
{% if att.is_image() and not att.is_embedded() %}
<div class="attachment_thumb">
<a href="{{att.url()}}">
<img src="{{att.url()}}/thumb"/>
</a><br/>
<a href="{{att.url()}}">{{att.metadata.filename}}</a>
({{att.length}} bytes)
</div>
{% else %}
<div>
<a href="{{att.url()}}">{{att.metadata.filename}}</a>
({{att.length}} bytes)
</div>
{% endif %}
{% endfor %}
{% endblock %}
{% block after_content %}
<div style="clear:both;"></div>
{% if page.discussion_thread and c.app.show_discussion %}
{% set thread = page.discussion_thread %}
<div>{{c.thread.display(value=thread)}}</div>
{% endif %}
{% endblock %}