From: gfawcett Date: Fri, 16 Jul 2010 15:39:49 +0000 (+0000) Subject: a few minor bug fixes. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=4bd84d88e0d6e51c0f48ef70cf7216987be9ccb3;p=Syrup.git a few minor bug fixes. git-svn-id: svn://svn.open-ils.org/ILS-Contrib/servres/trunk@925 6d9bc8c9-1ec2-4278-b937-99fde70a366f --- diff --git a/conifer/syrup/views/_common.py b/conifer/syrup/views/_common.py index 04c63d8..612393e 100644 --- a/conifer/syrup/views/_common.py +++ b/conifer/syrup/views/_common.py @@ -20,7 +20,7 @@ import sys import warnings import pdb -from conifer.integration.hooksystem import gethook, callhook, callhook_required +from conifer.plumbing.hooksystem import gethook, callhook, callhook_required from conifer.syrup import models from datetime import datetime from django.contrib.auth import authenticate, login, logout @@ -41,6 +41,7 @@ from _generics import * # TODO: should not import-star from conifer.libsystems.marcxml import (marcxml_to_dictionary, marcxml_dictionary_to_dc) +from django.utils.translation import ugettext as _ #----------------------------------------------------------------------------- # Authorization @@ -49,7 +50,9 @@ def _access_denied(request, message): if request.user.is_anonymous(): # then take them to login screen.... dest = (request.META['SCRIPT_NAME'] + \ - '/accounts/login/?next=' + request.META['PATH_INFO']) + '/accounts/login/?next=%s%s' % ( + request.META['SCRIPT_NAME'], + request.META['PATH_INFO'])) return HttpResponseRedirect(dest) else: return simple_message(_('Access denied.'), message, diff --git a/conifer/syrup/views/genshi_namespace.py b/conifer/syrup/views/genshi_namespace.py index 0e30570..5af6a7d 100644 --- a/conifer/syrup/views/genshi_namespace.py +++ b/conifer/syrup/views/genshi_namespace.py @@ -11,8 +11,8 @@ import django.forms import itertools import urllib -from conifer.integration.hooksystem import gethook, callhook -from conifer.syrup import models -from django.utils import translation +from conifer.plumbing.hooksystem import gethook, callhook +from conifer.syrup import models +from django.utils import translation _ = translation.ugettext diff --git a/conifer/templates/item/item_metadata.xhtml b/conifer/templates/item/item_metadata.xhtml index a90986e..d5b591f 100644 --- a/conifer/templates/item/item_metadata.xhtml +++ b/conifer/templates/item/item_metadata.xhtml @@ -35,7 +35,7 @@ is_editor = site.can_edit(request.user) Title${item.title} Author${item.author} Publisher${item.publisher} - Published${item.published and item.published.year} + Published${item.published} Type${item.get_item_type_display()}