view templates/bundle/explore.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
children
line wrap: on
line source

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


{% load i18n %}


{% block title %}
{% trans "Explore" %}
{% endblock %}


{% block content %}
<h1>{% trans "Recent bundles" %}</h1>

{% if recent_bundles %}
<table class="default">
    <thead>
        <tr>
            <th>{% trans "Bundle name" %}</th>
            <th>{% trans "Created on" %}</th>
            <th>{% trans "User" %}</th>
        </tr>
    </thead>
    <tbody>
        {% for bundle in recent_bundles %}
        <tr>
            <td><a href="{{ bundle.get_absolute_url }}">{{ bundle }}</a></td>
            <td>{{ bundle.pub_date }}</td>
            <td>
                <a href="{{ bundle.uploader.get_absolute_url }}">
                    {{ bundle.uploader }}
                </a>
            </td>
        </tr>
        {% endfor %}
    </tbody>
</table>
{% else %}
<p>{% trans "No bundles have been created yet!" %}</p>
{% endif %}
{% endblock %}