Permalink
Browse files

Add templates to package

  • Loading branch information...
paltman committed Jan 12, 2013
1 parent 7c18f13 commit d149beb5246efc09fa623dccad068d74f354f183
View
@@ -1,3 +1,5 @@
include AUTHORS
+include LICENSE
+include README.md
recursive-include docs *
-recursive-include announcements/templates/notification/announcement *
+recursive-include announcements/templates/ *
@@ -0,0 +1,25 @@
+{% extends "announcements/base.html" %}
+
+{% load i18n %}
+{% load bootstrap_tags %}
+
+{% block body_class %}announcements{% endblock %}
+
+{% block body %}
+ <h1>{% trans "Delete Announcement?" %}</h1>
+ {% url announcements_delete pk=announcement.pk as post_url %}
+ <p class="lead">
+ {% trans "Are you sure you want to delete this announcement?" %}
+ </p>
+ <p><b>{{ announcement.title }}</b></p>
+ <p><em>{{ announcement.content }}</em></p>
+
+ <form action="{{ post_url }}" method="POST" class="form form-horizontal">
+ {% csrf_token %}
+ {{ form|as_bootstrap }}
+ <div class="form-actions">
+ <a href="{% url announcements_list %}" class="btn">{% trans "Cancel" %}</a>
+ <button type="submit" class="btn btn-danger">{% trans "Delete" %}</button>
+ </div>
+ </form>
+{% endblock %}
@@ -0,0 +1,27 @@
+{% extends "announcements/base.html" %}
+
+{% load i18n %}
+{% load bootstrap_tags %}
+
+{% block body_class %}announcements{% endblock %}
+
+{% block body %}
+ <h1>{% if announcement %}{% trans "Edit Announcement" %}{% else %}{% trans "Create Announcement" %}{% endif %}</h1>
+ {% if announcement %}
+ {% url announcements_update pk=announcement.pk as post_url %}
+ {% else %}
+ {% url announcements_create as post_url %}
+ {% endif %}
+
+ <form action="{{ post_url }}" method="POST" class="form form-horizontal">
+ {% csrf_token %}
+ {{ form|as_bootstrap }}
+ <div class="form-actions">
+ <a href="{% url announcements_list %}" class="btn">{% trans "Cancel" %}</a>
+ {% if announcement %}
+ <a href="{% url announcements_delete pk=announcement.pk %}" class="btn btn-danger">{% trans "Delete" %}</a>
+ {% endif %}
+ <button type="submit" class="btn btn-primary">{% trans "Save" %}</button>
+ </div>
+ </form>
+{% endblock %}
@@ -0,0 +1,38 @@
+{% extends "announcements/base.html" %}
+
+{% load i18n %}
+
+{% block head_title %}{% trans "Announcements Admin" %}{% endblock %}
+
+{% block body_class %}announcements{% endblock %}
+{% block body %}
+ <h2>{% trans "Announcements" %}</h2>
+ <a href="{% url announcements_create %}" class="btn btn-success">
+ {% trans "Add New Announcement" %}
+ </a>
+
+ <table class="table">
+ {% for announcement in announcement_list %}
+ <tr>
+ <td>
+ <a href="{% url announcements_update pk=announcement.pk %}" class="btn btn-mini">
+ <i class="icon icon-pencil"></i>
+ {% trans "Edit" %}
+ </a>
+ </td>
+ <td>
+ {% if announcement.publish_start or announcement.publish_end %}
+ <small>Published from <em>{{ announcement.publish_start|date:"F j, Y" }}</em> to
+ <em>{{ announcement.publish_end|date:"F j, Y" }}</em></small>
+ {% endif %}
+ </td>
+ <td>
+ {{ announcement.title }}
+ </td>
+ <td>
+ {{ announcement.content }}
+ </td>
+ </tr>
+ {% endfor %}
+ </table>
+{% endblock %}
@@ -0,0 +1 @@
+{% extends "site_base.html" %}

0 comments on commit d149beb

Please sign in to comment.