From 4a5a507e18b1b0831f6fcffeb5de4f0568c4f698 Mon Sep 17 00:00:00 2001 From: Will Larson Date: Sun, 1 Jun 2008 13:25:07 +0900 Subject: [PATCH] Refactored a 'body_editor_widget' out of the project and article body editing pages. --- .../lifeflow/editor/body_editor_widget.html | 126 ++++++++++++++++++ templates/lifeflow/editor/edit_two.html | 111 +-------------- templates/lifeflow/editor/project_body.html | 112 +--------------- 3 files changed, 130 insertions(+), 219 deletions(-) create mode 100644 templates/lifeflow/editor/body_editor_widget.html diff --git a/templates/lifeflow/editor/body_editor_widget.html b/templates/lifeflow/editor/body_editor_widget.html new file mode 100644 index 0000000..fdce7bc --- /dev/null +++ b/templates/lifeflow/editor/body_editor_widget.html @@ -0,0 +1,126 @@ +{% comment %} +Requires that 'model' is a valid value. Meaning either 'project', +'draft', or 'entry'. + +Also requires 'object' being an instance of 'project','draft', +or 'entry'. + +In order to display the resource manager portion, requires that +the 'resources' variable exists. + +{% endcomment %} + + + + +
+
+ + +
+
+ +
+
+ + {% if resources %} + Add File + {% endif %} + Render + +
+ + + +{% if resources %} + + +
+
+ + Delete Resource +
+
+ +
+{% endif %} +
\ No newline at end of file diff --git a/templates/lifeflow/editor/edit_two.html b/templates/lifeflow/editor/edit_two.html index d4964ec..ecb59ac 100644 --- a/templates/lifeflow/editor/edit_two.html +++ b/templates/lifeflow/editor/edit_two.html @@ -2,20 +2,6 @@ {% block body %} - - - -
-
- - -
-
- -
-
- - Add File - Render - -
- - - - - -
-
- - Delete Resource -
-
- -
- -
+{% include "lifeflow/editor/body_editor_widget.html" %} {% endblock %} \ No newline at end of file diff --git a/templates/lifeflow/editor/project_body.html b/templates/lifeflow/editor/project_body.html index 4b5390d..b9e55b0 100644 --- a/templates/lifeflow/editor/project_body.html +++ b/templates/lifeflow/editor/project_body.html @@ -1,119 +1,13 @@ {% extends "lifeflow/editor/base.html" %} {% block body %} - - -
-
- - -
-
- -
-
- - Add File - Render - -
- - - - - -
-
- - Delete Resource -
-
- -
- -
+{% with "project" as model %} +{% include "lifeflow/editor/body_editor_widget.html" %} +{% endwith %} {% endblock %} \ No newline at end of file