From fe0ad73a0e3ede301465ef4db8c2555388531051 Mon Sep 17 00:00:00 2001 From: Will Larson Date: Mon, 2 Jun 2008 15:11:05 +0900 Subject: [PATCH] Partial implementation of an author editing view for LFE. --- editor/urls.py | 1 + editor/views.py | 7 +++++++ media/lifeflow/editor/editor.css | 7 +++++-- templates/lifeflow/editor/author.html | 22 ++++++++++++++++++++++ templates/lifeflow/editor/authors.html | 22 ++++++++++++++++++++++ templates/lifeflow/editor/base.html | 1 + 6 files changed, 58 insertions(+), 2 deletions(-) create mode 100644 templates/lifeflow/editor/author.html create mode 100644 templates/lifeflow/editor/authors.html diff --git a/editor/urls.py b/editor/urls.py index 96f562c..81816ee 100644 --- a/editor/urls.py +++ b/editor/urls.py @@ -6,6 +6,7 @@ (r'^comments/$', 'comments'), (r'^blogroll/$', 'blogroll'), (r'^files/$', 'files'), + (r'^authors/$', 'authors'), (r'^projects/$', 'projects'), (r'^projects/create/$', 'create_project'), diff --git a/editor/views.py b/editor/views.py index badd985..cecccfa 100644 --- a/editor/views.py +++ b/editor/views.py @@ -114,6 +114,13 @@ def project_body(request, id): {'object':project, 'resources':resources}, RequestContext(request,{})) + +@login_required +def authors(request): + authors = Author.objects.all() + return render_to_response('lifeflow/editor/authors.html', + {'authors':authors}, + RequestContext(request,{})) diff --git a/media/lifeflow/editor/editor.css b/media/lifeflow/editor/editor.css index 3a71e02..5dd3390 100644 --- a/media/lifeflow/editor/editor.css +++ b/media/lifeflow/editor/editor.css @@ -377,19 +377,22 @@ div.blogs div.controls { } +div.authors { + width: 100%; +} div.files { width: 100%; } -div.files div.selections { +div.selections { width: 210px; float: left; height: 100%; } -div.files div.selections select { +div.selections select { width: 100%; } diff --git a/templates/lifeflow/editor/author.html b/templates/lifeflow/editor/author.html new file mode 100644 index 0000000..eb584ac --- /dev/null +++ b/templates/lifeflow/editor/author.html @@ -0,0 +1,22 @@ +
+ +
+
+ +
\ No newline at end of file diff --git a/templates/lifeflow/editor/authors.html b/templates/lifeflow/editor/authors.html new file mode 100644 index 0000000..9a1532d --- /dev/null +++ b/templates/lifeflow/editor/authors.html @@ -0,0 +1,22 @@ +{% extends "lifeflow/editor/base.html" %} + + +{% block body %} + +
+
+ Create + Delete + +
+
+ {% with authors.0 as author %} + {% include "lifeflow/editor/author.html" %} + {% endwith %} +
+
+{% endblock %} \ No newline at end of file diff --git a/templates/lifeflow/editor/base.html b/templates/lifeflow/editor/base.html index b78cc52..757330a 100644 --- a/templates/lifeflow/editor/base.html +++ b/templates/lifeflow/editor/base.html @@ -24,6 +24,7 @@ comments projects files + authors blogroll {% endif %}