Ignore:
Timestamp:
8 Mar 2012, 19:00:51 (13 years ago)
Author:
uli
Message:

Rename all non-locales stuff from sirp to kofa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/viewlets.py

    r7736 r7811  
    2323from zope.location.interfaces import ISite
    2424from zope.traversing.browser import absoluteURL
    25 from waeup.sirp.browser.pages import (
     25from waeup.kofa.browser.pages import (
    2626    UniversityPage, FacultiesContainerPage, DatacenterPage, FacultyPage,
    2727    DepartmentPage, CoursePage, CertificatePage, CertificateCoursePage,
    2828    UsersContainerPage, UserManageFormPage)
    29 from waeup.sirp.browser.interfaces import (
     29from waeup.kofa.browser.interfaces import (
    3030    IFacultiesContainer, IFaculty, IDepartment, ICourse, ICertificate,
    3131    ICertificateCourse, IBreadcrumbContainer, IUniversity, IUsersContainer)
    32 from waeup.sirp.interfaces import (
    33     ISIRPUtils, ISIRPObject, ISIRPXMLExporter,
    34     ISIRPXMLImporter, IDataCenter, IUserAccount)
    35 from waeup.sirp.browser.layout import SIRPPage, default_primary_nav_template
    36 from waeup.sirp.utils.helpers import get_user_account
    37 
    38 from waeup.sirp.interfaces import MessageFactory as _
     32from waeup.kofa.interfaces import (
     33    IKOFAUtils, IKOFAObject, IKOFAXMLExporter,
     34    IKOFAXMLImporter, IDataCenter, IUserAccount)
     35from waeup.kofa.browser.layout import KOFAPage, default_primary_nav_template
     36from waeup.kofa.utils.helpers import get_user_account
     37
     38from waeup.kofa.interfaces import MessageFactory as _
    3939
    4040grok.templatedir('templates')
    41 grok.context(ISIRPObject) # Make ISIRPObject the default context
     41grok.context(IKOFAObject) # Make IKOFAObject the default context
    4242
    4343class LeftSidebar(grok.ViewletManager):
     
    8585    """
    8686    grok.baseclass()
    87     grok.context(ISIRPObject)
     87    grok.context(IKOFAObject)
    8888    grok.viewletmanager(ActionBar)
    8989    icon = 'actionicon_modify.png' # File must exist in static/
     
    126126            # local to the derived class' module. As we often like to
    127127            # get the icons from here
    128             # (i.e. waeup.sirp.browser/static), we set the directory
     128            # (i.e. waeup.kofa.browser/static), we set the directory
    129129            # resource appropiately.
    130130            #
     
    134134            # TODO: notes in here should go to general documentation.
    135135            static = queryAdapter(
    136                 self.request, Interface, name='waeup.sirp.browser')
     136                self.request, Interface, name='waeup.kofa.browser')
    137137        return static[self.icon]()
    138138
     
    196196
    197197class BreadCrumbs(grok.Viewlet):
    198     grok.context(ISIRPObject)
     198    grok.context(IKOFAObject)
    199199    grok.viewletmanager(BreadCrumbManager)
    200200    grok.order(1)
     
    216216    """
    217217    grok.viewletmanager(LanguageManager)
    218     grok.context(ISIRPObject)
     218    grok.context(IKOFAObject)
    219219    grok.require('waeup.Public')
    220220    title = u'Languages'
    221221
    222222    def render(self):
    223         preferred_languages = getUtility(ISIRPUtils).PREFERRED_LANGUAGES_DICT
     223        preferred_languages = getUtility(IKOFAUtils).PREFERRED_LANGUAGES_DICT
    224224        html = u''
    225225        for key, value in sorted(
     
    257257    grok.baseclass()
    258258    grok.viewletmanager(LeftSidebar)
    259     grok.context(ISIRPObject)
     259    grok.context(IKOFAObject)
    260260    grok.order(5)
    261261    grok.require('waeup.manageUniversity')
     
    278278                # local to the derived class' module. As we often like to
    279279                # get the icons from here
    280                 # (i.e. waeup.sirp.browser/static), we set the directory
     280                # (i.e. waeup.kofa.browser/static), we set the directory
    281281                # resource appropiately.
    282282                #
     
    286286                # TODO: notes in here should go to general documentation.
    287287                static = queryAdapter(
    288                     self.request, Interface, name='waeup.sirp.browser')
     288                    self.request, Interface, name='waeup.kofa.browser')
    289289            return static[self.icon]()
    290290        return
     
    310310
    311311#
    312 # waeup.sirp.app.University viewlets...
     312# waeup.kofa.app.University viewlets...
    313313#
    314314class Login(grok.Viewlet):
     
    316316    """
    317317    grok.viewletmanager(LeftSidebar)
    318     grok.context(ISIRPObject)
     318    grok.context(IKOFAObject)
    319319    grok.view(Interface)
    320320    grok.order(2)
     
    350350    """
    351351    grok.viewletmanager(LeftSidebar)
    352     grok.context(ISIRPObject)
     352    grok.context(IKOFAObject)
    353353    grok.view(Interface)
    354354    grok.order(5)
     
    520520class BrowseActionButton(ActionButton):
    521521    grok.baseclass()
    522     grok.context(ISIRPObject)
     522    grok.context(IKOFAObject)
    523523    grok.template('actionbutton')
    524524    grok.viewletmanager(ActionBar)
     
    686686    target_viewname = 'datacenter'
    687687
    688 # The SubobjectLister and its viewlets below are not used in SIRP.
     688# The SubobjectLister and its viewlets below are not used in KOFA.
    689689
    690690class SubobjectLister(grok.ViewletManager):
Note: See TracChangeset for help on using the changeset viewer.