annotate 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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
177
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
1 {% extends "bundle/base.djhtml" %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
2
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
3
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
4 {% load i18n %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
5
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
6
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
7 {% block title %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
8 {% trans "Explore" %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
9 {% endblock %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
10
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
11
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
12 {% block content %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
13 <h1>{% trans "Recent bundles" %}</h1>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
14
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
15 {% if recent_bundles %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
16 <table class="default">
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
17 <thead>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
18 <tr>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
19 <th>{% trans "Bundle name" %}</th>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
20 <th>{% trans "Created on" %}</th>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
21 <th>{% trans "User" %}</th>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
22 </tr>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
23 </thead>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
24 <tbody>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
25 {% for bundle in recent_bundles %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
26 <tr>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
27 <td><a href="{{ bundle.get_absolute_url }}">{{ bundle }}</a></td>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
28 <td>{{ bundle.pub_date }}</td>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
29 <td>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
30 <a href="{{ bundle.uploader.get_absolute_url }}">
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
31 {{ bundle.uploader }}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
32 </a>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
33 </td>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
34 </tr>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
35 {% endfor %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
36 </tbody>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
37 </table>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
38 {% else %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
39 <p>{% trans "No bundles have been created yet!" %}</p>
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
40 {% endif %}
86129d185ddb Add versioning to bundles
dellsystem <ilostwaldo@gmail.com>
parents:
diff changeset
41 {% endblock %}