Blob Blame Raw
{% extends "repo_master.html" %}

{% block title %}Releases - {{ repo.name }}{% endblock %}
{% set tag = "home" %}

{% block repo %}

<h2>
  Releases
{% if config.get('UPLOAD_FOLDER_PATH') and config.get('UPLOAD_FOLDER') %}
  {% if repo_admin %}
    <a class="pull-xs-right" href="{{ url_for('.new_release', username=username, repo=repo.name) }}"
        method="get" class="icon">
    <button class="btn btn-primary" type="submit" title="Upload a tarball">
      <span class="icon icon-plus blue"></span>
      Upload a new release
    </button>
    </a>
  {% endif %}
{% endif %}
</h2>

{% if config.get('UPLOAD_FOLDER_PATH') and config.get('UPLOAD_FOLDER') %}
<p>
  If the developers have upload one or more tarball(s), you will be able to
  find them in the <a href="{{ config['APP_URL'] + config['UPLOAD_FOLDER'] + repo.fullname }}">
    release folder.
  </a>
</p>
{% endif %}

<section class="tag_list">
  {% if tags %}
  <div class="list-group">
    {% for tag in tags %}
      <a class="list-group-item" href="{{ url_for('.view_tree',
                    username=username, repo=repo.name,
                    identifier=tag['object'].oid) }}">
        <div class="pull-xs-right">{{tag['date'] | humanize}}
          <span id="tagid" class="label label-default">
            {{ tag['object'].oid | short }}
          </span>
        </div>
        {% if tag['objecttype'] == "tag" %}
          {% if tag['object'].message %}
            <strong>{{tag['tagname']}}</strong>
            {% set msg_head_tail, _, detailtext = tag[
                    'object'].message.partition('\n') %}
            {{ msg_head_tail }}
            {% if msg_head_tail and detailtext.endswith(
                '\n-----END PGP SIGNATURE-----') %}
              {% set detailtext = detailtext.rsplit(
                '\n-----BEGIN PGP SIGNATURE-----', 1)[0] %}
              {% if detailtext %}
              <div style="white-space:pre-wrap">
                {{ detailtext }}
              </div>
              {% endif %}
            {% endif %}
          {% endif %}
        {% else %}
            <strong>{{tag['tagname']}}</strong>
        {% endif %}
      </a>
    {% endfor %}
  </div>
  {% else %}
  <p>
    This project has not been tagged.
  </p>
  {% endif %}
</section>

{% endblock %}