From 264a41ce03c1aff684be6ef64726f82cd481716b Mon Sep 17 00:00:00 2001 From: Sanj Date: Sat, 9 Jul 2011 19:15:21 +0530 Subject: [PATCH] publish page functionality all in; added bottom bar to tool page; needs some CSS love --- edgware/editor/models.py | 4 ++-- edgware/editor/views.py | 2 +- edgware/templates/editor.html | 27 ++++++++++++++++---------- edgware/templates/main/publish.html | 30 +++++++++++++++++++++++++++-- edgware/templates/main_base.html | 16 +++++++-------- 5 files changed, 56 insertions(+), 23 deletions(-) diff --git a/edgware/editor/models.py b/edgware/editor/models.py index 63844f0..315a28b 100644 --- a/edgware/editor/models.py +++ b/edgware/editor/models.py @@ -9,7 +9,7 @@ from os.path import join from PIL import Image from django.template import Template, Context from django.template.loader import get_template -from settings import MEDIA_ROOT, PROJECT_PATH +from settings import MEDIA_ROOT, PROJECT_PATH, SITE_BASE from django.contrib.auth.models import User, Group from tagging.fields import TagField from tagging.models import Tag @@ -368,7 +368,7 @@ class Article(models.Model): 'edit_url': "/edit/article/%d/" % (self.id,), 'is_locked': self.locked, 'is_published': self.published, - 'web_url': "/edit/web_frontend/%d/" % (self.id,) + 'web_url': SITE_BASE + "/edit/article_web/%d/" % (self.id,) } diff --git a/edgware/editor/views.py b/edgware/editor/views.py index f99e40f..705794b 100644 --- a/edgware/editor/views.py +++ b/edgware/editor/views.py @@ -587,7 +587,7 @@ def create_article(request): new_article.owner = request.user new_article.save() new_id = new_article.id - return HttpResponseRedirect("/edit/article/%d/" % new_id) + return HttpResponse("/edit/article/%d/" % new_id) else: templates = [] diff --git a/edgware/templates/editor.html b/edgware/templates/editor.html index 8e08bf8..e503f32 100644 --- a/edgware/templates/editor.html +++ b/edgware/templates/editor.html @@ -1,6 +1,8 @@ - - - + + {% extends 'main_base.html' %} + + + {% block extra_head %} @@ -8,7 +10,7 @@ - + @@ -66,11 +68,17 @@ }); }); - + + {% endblock %} + {% block title %} Edgware Editor - Hi {{ user.username }} - - - + {% endblock %} + + {% block header %} + + {% endblock %} + + {% block content %} {% endblock %} {% block pageTitle %} @@ -36,8 +57,11 @@ Tool link Search for an existing article you were working on


@@ -47,6 +71,8 @@ Create a new one {% for p in pub_list %}
  • {{ p.title }} + web + copy
  • {% endfor %} diff --git a/edgware/templates/main_base.html b/edgware/templates/main_base.html index 2fd18dd..6d0d1ce 100644 --- a/edgware/templates/main_base.html +++ b/edgware/templates/main_base.html @@ -38,30 +38,30 @@