Ignore:
Timestamp:
20/11/08 15:36:20 (12 years ago)
Author:
cbyrom
Message:

Strip out code not relevant to MILK - mainly WCS and WMS stuff - also including the CSML server code + trackback code
Also tidy up structure of 'public' dir - setting up new 'style' dir and
centralising icons in icons dir + remove all unused icons, javascript and stylesheets.
Also strip out testcase code and populate new test directory structure.

Location:
MILK/trunk/milk_server/milk_server/controllers/atom_editor
Files:
1 added
1 moved

Legend:

Unmodified
Added
Removed
  • MILK/trunk/milk_server/milk_server/controllers/atom_editor/editatom.py

    r4448 r4468  
    55 @author: C Byrom, Tessella Sep 2008 
    66''' 
    7 from ows_server.lib.base import * 
    8 from ows_server.models.form import * 
    9 from ows_server.models import Utilities 
     7from milk_server.lib.base import * 
     8from milk_server.models.form import * 
    109from ndgUtils import ndgObject 
    1110from paste.request import parse_querystring 
    12 from ows_server.lib import mailer 
    13 from ows_server.lib.ndgInterface import interface  
     11from milk_server.lib import mailer 
     12from milk_server.lib.ndgInterface import interface  
    1413from xml.parsers.expat import ExpatError 
    1514import logging, traceback, sys 
     
    2221from ndgUtils.models.utilities import escapeSpecialCharacters 
    2322from ndgUtils.vocabtermdata import VocabTermData as VTD 
    24 import ows_server.templates.htmlUtilities as utils 
     23import milk_server.lib.htmlUtilities as utils 
    2524from granulatorTool.granulite import granulite as granulite 
    2625 
     
    108107                self.__processCSMLFile(file) 
    109108        except Exception, e: 
    110             return self.__handleError(e, template='atom_granulator') 
     109            return self.__handleError(e, template='atom_editor/atom_granulator') 
    111110 
    112111        # save new data 
     
    116115        # reloaded and displayed 
    117116        logging.info("File data loaded and extracted to atom") 
    118         h.redirect_to(controller = 'editatom', action='edit', \ 
     117        h.redirect_to(controller = 'atom_editor/editatom', action='edit', \ 
    119118                        uri = c.atom.ndgURI) 
    120119 
     
    208207        # now do redirection - NB, this ensures that current atom contents are 
    209208        # reloaded and displayed 
    210         h.redirect_to(controller = 'editatom', action='edit', \ 
     209        h.redirect_to(controller = 'atom_editor/editatom', action='edit', \ 
    211210                        uri = c.atom.ndgURI) 
    212211 
     
    267266        c.uri = c.atom.ndgURI 
    268267         
    269         c.saveLink = h.url_for(controller='editatom',action='saveAtom', \ 
     268        c.saveLink = h.url_for(controller='atom_editor/editatom',action='saveAtom', \ 
    270269                               saveLevel='1',  uri = c.atom.ndgURI) 
    271         c.saveLink2 = h.url_for(controller='editatom',action='saveAtom', saveLevel='2') 
    272         c.saveAssoc = h.url_for(controller='editatom',action='saveAtom', \ 
     270        c.saveLink2 = h.url_for(controller='atom_editor/editatom',action='saveAtom', saveLevel='2') 
     271        c.saveAssoc = h.url_for(controller='atom_editor/editatom',action='saveAtom', \ 
    273272                                 saveLevel = self.REMOVE_ASSOCIATIONS) 
    274273         
     
    279278            atomType = g.vtd.DEPLOYMENT_TERM 
    280279         
    281         c.addEntityLink = h.url_for(controller='listatom',action='list', searchData = '0', \ 
     280        c.addEntityLink = h.url_for(controller='atom_editor/listatom',action='list', searchData = '0', \ 
    282281                               associatedAtomID = c.atom.ndgURI, \ 
    283282                               associatedAtomType = atomType,  
    284283                               associationType = utils.ENTITY_ASSOCIATION) 
    285284             
    286         c.addGranuleLink = h.url_for(controller='listatom',action='list', searchData = '0', \ 
     285        c.addGranuleLink = h.url_for(controller='atom_editor/listatom',action='list', searchData = '0', \ 
    287286                               associatedAtomID = c.atom.ndgURI, \ 
    288287                               associatedAtomType = atomType,  
    289288                               associationType = utils.GRANULE_ASSOCIATION) 
    290289             
    291         c.addDeploymentLink = h.url_for(controller='listatom',action='list', searchData = '0', \ 
     290        c.addDeploymentLink = h.url_for(controller='atom_editor/listatom',action='list', searchData = '0', \ 
    292291                               associatedAtomID = c.atom.ndgURI, \ 
    293292                               associatedAtomType = atomType,  
     
    315314 
    316315        try: 
    317             return render("genshi", 'atom_editor') 
     316            return render("genshi", 'atom_editor/atom_editor') 
    318317         
    319318        except ExpatError, e: 
     
    570569                atom = self.saveAtomToExist(Atom(**dict(inputs))) 
    571570                 
    572                 h.redirect_to(controller = 'editatom', action='edit', 
     571                h.redirect_to(controller = 'atom_editor/editatom', action='edit', 
    573572                               uri = atom.ndgURI) 
    574573            except Invalid, e: 
     
    590589 
    591590        try: 
    592             return render("genshi", 'atom_creator') 
     591            return render("genshi", 'atom_editor/atom_creator') 
    593592 
    594593        except Exception, e: 
     
    604603         
    605604        try: 
    606             return render("genshi", 'atom_granulator') 
     605            return render("genshi", 'atom_editor/atom_granulator') 
    607606 
    608607        except Exception, e: 
Note: See TracChangeset for help on using the changeset viewer.