Ignore:
Timestamp:
19 May 2011, 15:53:26 (13 years ago)
Author:
Henrik Bettermann
Message:

Delete trash.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r6148 r6149  
    166166        return
    167167
    168 #class RemoveFormPage(WAeUPPage):
    169 #    grok.require('waeup.manageUniversity')
    170 #    grok.name('remove')
    171 #    grok.template('removesubobjectspage')
    172 #    pnav = 1
    173 #
    174 #    def update(self):
    175 #        warning.need()
    176 #        form = self.request.form
    177 #        if 'CANCEL' in form.keys():
    178 #            self.redirect(self.url(self.context))
    179 #        if not 'REMOVE' in form.keys():
    180 #            return
    181 #        child_id = form['val_id']
    182 #        if not isinstance(child_id, list):
    183 #            child_id = [child_id]
    184 #        deleted = []
    185 #        for id in child_id:
    186 #            try:
    187 #                del self.context[id]
    188 #                deleted.append(id)
    189 #            except:
    190 #                self.flash('Could not delete %s: %s: %s' % (
    191 #                        id, sys.exc_info()[0], sys.exc_info()[1]))
    192 #        if len(deleted):
    193 #            self.flash('Successfully removed: %s' % ', '.join(deleted))
    194 #        # We have to redirect to let flash messages appear immediately...
    195 #        self.redirect(self.url())
    196 #        return
    197 
    198168class AdministrationPage(WAeUPPage):
    199169    """ The administration overview page.
     
    860830    pnav = 1
    861831    grok.template('facultypage')
    862 
    863     #def update(self, code=None, edit=None, delete=None):
    864     #    warning.need()
    865     #    if delete is not None and code is not None:
    866     #        try:
    867     #            del self.context[code]
    868     #            self.flash('Faculty %s successfully removed.' % code)
    869     #        except:
    870     #            self.flash('Could not delete %s.' % code)
    871 
    872832
    873833class FacultyContainerManageFormPage(WAeUPEditFormPage):
     
    954914        self.redirect(self.url(self.context))
    955915
    956 #class RemoveFacultyFormPage(RemoveFormPage):
    957 #   """ Remove Faculty Page
    958 #    """
    959 #    grok.context(IFacultyContainer)
    960 #    title = "Remove faculty"
    961 #    pnav = 1
    962 
    963916#
    964917# Faculty pages
     
    979932    def label(self):
    980933        return 'Departments'
    981 
    982     #def update(self, code=None, edit=None, delete=None):
    983     #    warning.need()
    984     #    if delete is not None and code is not None:
    985     #        try:
    986     #            del self.context[code]
    987     #            self.flash('Department %s successfully removed.' % code)
    988     #        except:
    989     #            self.flash('Could not delete %s.' % code)
    990934
    991935class FacultyManageFormPage(WAeUPEditFormPage):
     
    11101054        self.redirect(self.url(self.context))
    11111055
    1112 
    1113 
    1114 #class RemoveDepartmentFormPage(RemoveFormPage):
    1115 #    """ Remove Department Page
    1116 #    """
    1117 #    grok.context(IFaculty)
    1118 #    title = "Remove department"
    1119 #    pnav = 1
    1120 
    1121 
    11221056#
    11231057# Department pages
Note: See TracChangeset for help on using the changeset viewer.