source: TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/controllers/home.py @ 5233

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI01-discovery/trunk/OAIInfoEditor/oai_info_editor/controllers/home.py@5233
Revision 5233, 998 bytes checked in by cbyrom, 11 years ago (diff)

Add delete functionality to front tier of oai editor. Include
message to confirm the data has been completed, as a pop up, when
the operation is done. Update tests and simplify model + dal layer.

  • Property svn:executable set to *
Line 
1'''
2 Class representing pylons controller to create the home page for the OAI Info Editor
3 
4 @author: C Byrom, Tessella Apr 2009
5'''
6import logging, urllib
7from oai_info_editor.lib.base import *
8from oai_info_editor.lib.constants import *
9from oai_info_editor.controllers.master import MasterController
10
11
12class HomeController(MasterController):
13
14    def index(self):
15        logging.debug("Rendering editor home page")
16        c.title = EDITOR_HOME_TITLE
17        self._setUpController()
18       
19        if session.get(POP_UP_MESSAGE_SESSION_KEY):
20            c.popupMessage = session.get(POP_UP_MESSAGE_SESSION_KEY)
21            del session[POP_UP_MESSAGE_SESSION_KEY]
22            session.save()
23       
24        return self._renderTemplate('genshi', 'home')
25
26   
27   
28    def showHelpPage(self):
29        '''
30        Show the help page
31        '''
32        logging.info("Rendering help page")
33        c.title = HELP_PAGE_TITLE
34        return self._renderTemplate('genshi', 'oai_info_editor_help')
Note: See TracBrowser for help on using the repository browser.