view templates/bundle/index.djhtml @ 177:86129d185ddb

Add versioning to bundles Some other bundle-related changes were made, including: * Editing the snippetform CSS and HTML to allow bundle/form.djhtml to be reused for editing * Changing {% block title %} to {% block section %} in the base template for bundles to allow for more flexibility when creating breadcrumbs * Saved common URL patterns in variables in bundle/urls.py * Renamed explore.html to explore.djhtml for consistency You should now be able to upload new versions as well as view the files (or a particular file) for a bundle at a specific version. Coming soon: the ability to add a timestamp and a comment for each new uploaded version (if this feature is desirable).
author dellsystem <ilostwaldo@gmail.com>
date Sat, 20 Oct 2012 23:28:50 -0400
parents c7be7def8b57
children
line wrap: on
line source

{% extends "bundle/base.djhtml" %}
{% load i18n %}

{% block title %}
New bundle
{% endblock title %}

{% block section %}
New bundle
{% endblock %}

{% block content %}
<div id="non-sidebar">
    <h1>{% trans "Upload a new bundle" %}</h1>

    <p class="hint">Upload either an archived file or a plain text file.
        Accepted formats for archive files: zip, tar, tar.gz, tar.bz2.
    </p>

    {% include "bundle/form.djhtml" %}
</div><div id="sidebar">
    <h2>Latest bundles</h2>

    {% if bundles|length > 0 %}

    {% for bundle in bundles %}
    <h3>
        <a href="{{ bundle.get_absolute_url }}">{{ bundle.name }}</a>
        by
        <a href="{{ bundle.uploader.get_absolute_url }}">
            {{ bundle.uploader }}
        </a>
    </h3>
    <p>
          Bundle published on {{ bundle.pub_date }}, under the license {{ bundle.free_license }}.
    </p>
    {% endfor %}

    {% else %}
        <p>No bundles registered yet!</p>
    {% endif %}
</div>
{% endblock %}