[snowy] Add notes/note_index.html, fix typo in views.py
- From: Brad Taylor <btaylor src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [snowy] Add notes/note_index.html, fix typo in views.py
- Date: Tue, 29 Sep 2009 15:40:35 +0000 (UTC)
commit dabc8fc2a4a8ec6abdbf0605e2affbdc4f33f0a6
Author: Jordan Keyes <jkeyes0 gmail com>
Date: Tue Sep 29 11:10:22 2009 -0400
Add notes/note_index.html, fix typo in views.py
Fixed a typo in views.py (was "note/note_index.html", changed to
"notes/note_index.html"). Created note_index.html based upon note_detail.html.
Signed-off-by: Brad Taylor <brad getcoded net>
notes/templates/notes/note_index.html | 54 +++++++++++++++++++++++++++++++++
notes/views.py | 2 +-
2 files changed, 55 insertions(+), 1 deletions(-)
---
diff --git a/notes/templates/notes/note_index.html b/notes/templates/notes/note_index.html
new file mode 100644
index 0000000..741121f
--- /dev/null
+++ b/notes/templates/notes/note_index.html
@@ -0,0 +1,54 @@
+{% extends 'notes/base.html' %}
+
+{% load i18n %}
+{% load notes %}
+
+{% block extra_head %}
+{% endblock %}
+
+{% block title %}{{ title|safe }} | Notes | {{ block.super }}{% endblock %}
+
+{% block sidebar %}
+{{ block.super }}
+{% user_notes_list request author as all_notes %}
+<div id="sidebar-note-list">
+ <ul>
+{% for n in all_notes %}
+ <li class="note-item{% if n.pinned %} pinned{% endif %}"><a href="{{ n.get_absolute_url }}">{{ n.title|safe }}</a></li>
+{% endfor %}
+ <li class="more-item"><a href="{% url note_list author.username %}">{% trans "More Notes..." %}</a></li>
+ </ul>
+ <hr />
+ <ul>
+{# Enable when we allow editing #}
+{% comment %}
+ <li id="new-note"><a href="#">New Note...</a></li>
+{% endcomment %}
+ </ul>
+</div>
+<div id="sidebar-notebook-list">
+ <h3>{% trans "Notebooks" %}</h3>
+ <ul>
+{% user_notebook_list request author as all_notebooks %}
+{% for n in all_notebooks %}
+ <li class="notebook-item"><a href="#">{{ n.get_name_for_display }}</a></li>
+{% endfor %}
+ <li class="more-item"><a href="#">{% trans "More Notebooks..." %}</a></li>
+ </ul>
+</div>
+{% endblock %}
+
+{% block content %}
+<table id="content-layout" cellspacing="0" cellpadding="0">
+ <tr>
+ <td id="note">
+ <h1>{% trans "Notice" %}</h1>
+ <div id="funcooker">
+ {% trans "You haven't synced any notes with Snowy yet." %}
+ </div>
+ </td>
+ <td>
+ </td>
+ </br>
+</table>
+{% endblock %}
diff --git a/notes/views.py b/notes/views.py
index ec0abba..f2f0697 100644
--- a/notes/views.py
+++ b/notes/views.py
@@ -30,7 +30,7 @@ from snowy.notes.models import *
from snowy import settings
def note_index(request, username,
- template_name='note/note_index.html'):
+ template_name='notes/note_index.html'):
author = get_object_or_404(User, username=username)
# TODO: retrieve the last open note from the user
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]