{% extends "layout.html" %}
{% block sidebar %}{% include "cupboard/sidebar.html" %}{% endblock %}
{% from "run_util.html" import display_result_code, display_publish_result_code %}
{% block page_title %}Cupboard - Publish {{ publish.id }}{% endblock %}
{% block body %}
 <div class="section" id="publish">
<h1>Publish {{ publish.id }}</h1>

<ul>
	<li>Timestamp: {{ format_timestamp(publish.timestamp) }}</li>
	<li>Package: <a class="reference external" href="pkg/{{ publish.package }}">{{ publish.package }}</a></li>
{% if publish.branch_name %}
	<li>Branch Name: {{ publish.branch_name }}</li>
{% endif %}
	<li>Mode: {{ publish.mode }}</li>
	<li>{{ display_publish_result_code(publish.result_code) }}: {% if '\n' in publish.description %}<pre>{{ publish.description }}</pre>{% else %}{{ publish.description }}{% endif %}
{% if publish.mode == 'propose' %}{% if publish.merge_proposal_url %} - <a href="{{ publish.merge_proposal_url }}">Merge Proposal</a>{% endif %}{% endif %}
{% if publish.mode == 'push' and result_code == 'success' %}{% if publish.vcs_browse %} - <a href="{{ publish.vcs_browse }}">Branch</a>{% endif %}{% endif %}
</li>
</ul>

{% endblock %}
