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

Rename all non-locales stuff from sirp to kofa.

Location:
main/waeup.kofa/trunk/src/waeup/kofa/browser
Files:
45 edited

Legend:

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

    r7321 r7811  
    11import os
    22
    3 from waeup.sirp.browser.layout import (
    4     SIRPPage, SIRPForm, SIRPLayout, SIRPDisplayFormPage, SIRPEditFormPage,
    5     SIRPAddFormPage, NullValidator)
    6 from waeup.sirp.browser.pages import ContactAdminForm
     3from waeup.kofa.browser.layout import (
     4    KOFAPage, KOFAForm, KOFALayout, KOFADisplayFormPage, KOFAEditFormPage,
     5    KOFAAddFormPage, NullValidator)
     6from waeup.kofa.browser.pages import ContactAdminForm
    77
    88IMAGE_PATH = os.path.join(
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/batchprocessing.txt

    r7749 r7811  
    2121Create a site:
    2222
    23     >>> from waeup.sirp.app import University
     23    >>> from waeup.kofa.app import University
    2424    >>> getRootFolder()['app'] = University()
    2525
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.py

    r7700 r7811  
    2323from zope.publisher.browser import TestRequest
    2424
    25 from waeup.sirp.interfaces import (
     25from waeup.kofa.interfaces import (
    2626    IConfigurationContainer, ISessionConfiguration)
    27 from waeup.sirp.interfaces import MessageFactory as _
    28 from waeup.sirp.browser import interfaces
    29 from waeup.sirp.browser.interfaces import (IBreadcrumb,
     27from waeup.kofa.interfaces import MessageFactory as _
     28from waeup.kofa.browser import interfaces
     29from waeup.kofa.browser.interfaces import (IBreadcrumb,
    3030    IBreadcrumbIgnorable, IBreadcrumbContainer)
    31        
     31
    3232class Breadcrumb(grok.Adapter):
    3333    """A most general breadcrumb generator.
    3434    """
    3535    grok.provides(IBreadcrumb)
    36     grok.context(interfaces.ISIRPObject)
     36    grok.context(interfaces.IKOFAObject)
    3737    grok.name('index')
    3838
     
    4242    parent_viewname = 'index'
    4343    viewname = 'index'
    44    
     44
    4545    def __init__(self, context):
    4646        """Turn a context into a breadcrumb.
     
    5757            return self.context.title
    5858        if hasattr(self.context, 'name'):
    59             return self.context.name           
     59            return self.context.name
    6060        return None
    6161
     
    151151class DataCenterBreadcrumb(Breadcrumb):
    152152    """A breadcrumb for data centers.
    153     """ 
     153    """
    154154    grok.context(interfaces.IDataCenter)
    155155    title = _(u'Data Center')
     
    160160    """
    161161    grok.context(interfaces.IFaculty)
    162    
     162
    163163    @property
    164164    def title(self):
     
    169169    """
    170170    grok.context(interfaces.IDepartment)
    171    
     171
    172172class CourseBreadcrumb(FacultyBreadcrumb):
    173173    """A breadcrumb for courses.
    174174    """
    175     grok.context(interfaces.ICourse)   
    176    
     175    grok.context(interfaces.ICourse)
     176
    177177class CertificateBreadcrumb(FacultyBreadcrumb):
    178178    """A breadcrumb for certificates.
    179179    """
    180     grok.context(interfaces.ICertificate)       
     180    grok.context(interfaces.ICertificate)
    181181
    182182class CoursesContainerBreadcrumb(Breadcrumb):
     
    245245
    246246    _breadcrumbs = None
    247    
     247
    248248    def __init__(self, context):
    249249        self.context = context
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/breadcrumbs.txt

    r7172 r7811  
    1111We create a university to check the breadcrumb functionality.
    1212
    13     >>> from waeup.sirp.app import University
     13    >>> from waeup.kofa.app import University
    1414    >>> root = getRootFolder()
    1515    >>> root['app'] = University()
     
    2222viewname:
    2323
    24     >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbList
     24    >>> from waeup.kofa.browser.breadcrumbs import getBreadcrumbList
    2525    >>> blist1 = getBreadcrumbList(app, 'index')
    2626    >>> blist1
    27     [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
     27    [<waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>]
    2828
    2929A slightly more extensive list for the datacenter:
     
    3232    >>> from pprint import pprint
    3333    >>> pprint(blist2)
    34     [<waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,
    35      <waeup.sirp.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,
    36      <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]
     34    [<waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>,
     35     <waeup.kofa.browser.breadcrumbs.AdministrationBreadcrumb object at 0x...>,
     36     <waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>]
    3737
    3838We get a breadcrumb for university, administration area and data
     
    4747
    4848     >>> pprint([(x.context, x.viewname) for x in blist2])
    49      [(<waeup.sirp.app.University object at 0x...>, 'index'),
    50       (<waeup.sirp.app.University object at 0x...>, 'administration'),
    51       (<waeup.sirp.datacenter.DataCenter object at 0x...>, 'index')]
     49     [(<waeup.kofa.app.University object at 0x...>, 'index'),
     50      (<waeup.kofa.app.University object at 0x...>, 'administration'),
     51      (<waeup.kofa.datacenter.DataCenter object at 0x...>, 'index')]
    5252
    5353The administration area breadcrumb might be a surprise, as there is no
     
    8989Now we can get the breadcrumbs for this view:
    9090
    91     >>> from waeup.sirp.browser.breadcrumbs import getBreadcrumbListForView
     91    >>> from waeup.kofa.browser.breadcrumbs import getBreadcrumbListForView
    9292    >>> blist3 = getBreadcrumbListForView(page)
    9393    >>> [x.title for x in blist3]
     
    109109The returned breadcrumb container supports iteration:
    110110
    111     >>> from waeup.sirp.browser.interfaces import IBreadcrumbContainer
     111    >>> from waeup.kofa.browser.interfaces import IBreadcrumbContainer
    112112    >>> mybccontainer = IBreadcrumbContainer(page)
    113113    >>> [x.title for x in mybccontainer]
     
    131131
    132132    >>> from zope.component import getAdapter
    133     >>> from waeup.sirp.browser.interfaces import IBreadcrumb
     133    >>> from waeup.kofa.browser.interfaces import IBreadcrumb
    134134    >>> b1 = getAdapter(app, IBreadcrumb, 'index')
    135135    >>> b1
    136     <waeup.sirp.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
     136    <waeup.kofa.browser.breadcrumbs.UniversityBreadcrumb object at 0x...>
    137137
    138138Breadcrumb objects provide a title:
     
    156156    >>> b2 = getAdapter(app['datacenter'], IBreadcrumb, 'index')
    157157    >>> b2
    158     <waeup.sirp.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
     158    <waeup.kofa.browser.breadcrumbs.DataCenterBreadcrumb object at 0x...>
    159159
    160160    >>> b2.title
     
    168168
    169169    >>> b2.parent
    170     (<waeup.sirp.app.University object at 0x...>, 'administration')
     170    (<waeup.kofa.app.University object at 0x...>, 'administration')
    171171
    172172This result denotes a new context object (the University instance we
     
    184184    >>> b3 = getAdapter(context, IBreadcrumb, viewname)
    185185    >>> b3
    186     <waeup.sirp...breadcrumbs.AdministrationBreadcrumb object at 0x...>
     186    <waeup.kofa...breadcrumbs.AdministrationBreadcrumb object at 0x...>
    187187
    188188As you can see, we get an AdministrationBreadcrumb, although the
     
    197197    >>> context, viewname = b3.parent
    198198    >>> context, viewname
    199     (<waeup.sirp.app.University object at 0x...>, 'index')
     199    (<waeup.kofa.app.University object at 0x...>, 'index')
    200200
    201201We create last breadcrumb:
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/browser.txt

    r7707 r7811  
    1 Browsing SIRP
     1Browsing KOFA
    22*************
    33
    4 Here we visit all parts of a SIRP portal using a browser.
     4Here we visit all parts of a KOFA portal using a browser.
    55
    66University
     
    1515  []
    1616
    17   >>> from waeup.sirp.app import University
     17  >>> from waeup.kofa.app import University
    1818  >>> u = University()
    1919  >>> root['myuniversity'] = u
     
    3535  >>> print browser.contents
    3636  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"...
    37   ...Welcome to WAeUP.SIRP...
     37  ...Welcome to WAeUP.KOFA...
    3838  ...
    3939
     
    566566Courses are stored in :class:`ICoursesContainer` instances with their
    567567code as key. CoursesContainers are normally availabe as `course`
    568 attribute of :class:`waeup.sirp.university.department.Department`
     568attribute of :class:`waeup.kofa.university.department.Department`
    569569instances.
    570570
     
    769769with their code as key. CertificatesContainers are normally availabe as
    770770`certificates` attribute of
    771 :class:`waeup.sirp.university.department.Department` instances.
     771:class:`waeup.kofa.university.department.Department` instances.
    772772
    773773To ease the life of users we do not require to browse the
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/captcha.py

    r7320 r7811  
    2828from zope.interface import Interface
    2929from zope.publisher.interfaces.http import IHTTPRequest
    30 from waeup.sirp.browser import SIRPPage
    31 from waeup.sirp.browser.interfaces import (
     30from waeup.kofa.browser import KOFAPage
     31from waeup.kofa.browser.interfaces import (
    3232    ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig,
    3333    ICaptchaManager)
    34 from waeup.sirp.interfaces import IUniversity
     34from waeup.kofa.interfaces import IUniversity
    3535
    3636#
     
    171171    """ReCaptcha - strong captchas with images, sound, etc.
    172172
    173     This is the SIRP implementation to support captchas as provided by
     173    This is the KOFA implementation to support captchas as provided by
    174174    http://www.google.com/recaptcha.
    175175
     
    266266            headers = {
    267267                "Content-type": "application/x-www-form-urlencoded",
    268                 "User-agent": "reCAPTCHA Python SIRP",
     268                "User-agent": "reCAPTCHA Python KOFA",
    269269                }
    270270            )
     
    319319
    320320
    321 class CaptchaTestPage(SIRPPage):
     321class CaptchaTestPage(KOFAPage):
    322322    # A test page to see a captcha in action
    323323    grok.name('captcha')
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/exceptions.py

    r7321 r7811  
    2222from zope.publisher.interfaces import INotFound
    2323from zope.security.interfaces import IUnauthorized
    24 from waeup.sirp.browser.layout import SIRPPage
     24from waeup.kofa.browser.layout import KOFAPage
    2525
    2626grok.templatedir('templates')
     
    6161
    6262
    63 class NotFoundPage(SIRPPage):
     63class NotFoundPage(KOFAPage):
    6464    """A page rendered when an object cannot be found.
    6565
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/interfaces.py

    r7333 r7811  
    2020from zope import schema
    2121from zope.interface import Interface, Attribute
    22 from waeup.sirp.interfaces import (
    23     ISIRPObject, IUniversity, IUsersContainer, IDataCenter)
    24 from waeup.sirp.university.interfaces import (
     22from waeup.kofa.interfaces import (
     23    IKOFAObject, IUniversity, IUsersContainer, IDataCenter)
     24from waeup.kofa.university.interfaces import (
    2525    IFacultiesContainer, IFaculty, IFacultyAdd, IDepartment, IDepartmentAdd,
    2626    ICoursesContainer, ICourse, ICourseAdd, ICertificatesContainer,
     
    6363    Themes are basically collections of CSS- and/or JavaScript files
    6464    stored somewhere. In Grok-contexts these files can be registered
    65     as 'resources' (see :mod:`waeup.sirp.browser.resources`).
     65    as 'resources' (see :mod:`waeup.kofa.browser.resources`).
    6666
    6767    Furthermore, to make themes selectable and distinctable from each
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/layout.py

    r7700 r7811  
    3333from zope.interface import Interface
    3434from zope.site.hooks import getSite
    35 from waeup.sirp.interfaces import ISIRPObject, IUserAccount
    36 from waeup.sirp.browser.interfaces import ITheme
    37 from waeup.sirp.browser.theming import get_all_themes, SIRPThemeBase
    38 from waeup.sirp.students.interfaces import IStudentNavigation
    39 from waeup.sirp.applicants.interfaces import IApplicant
    40 from waeup.sirp.authentication import get_principal_role_manager
     35from waeup.kofa.interfaces import IKOFAObject, IUserAccount
     36from waeup.kofa.browser.interfaces import ITheme
     37from waeup.kofa.browser.theming import get_all_themes, KOFAThemeBase
     38from waeup.kofa.students.interfaces import IStudentNavigation
     39from waeup.kofa.applicants.interfaces import IApplicant
     40from waeup.kofa.authentication import get_principal_role_manager
    4141
    4242grok.templatedir('templates')
     
    5656
    5757    def __call__(self, success):
    58         action = SIRPAction(self.label, success=success, **self.options)
     58        action = KOFAAction(self.label, success=success, **self.options)
    5959        self.actions.append(action)
    6060        return action
    6161
    62 class SIRPAction(Action):
     62class KOFAAction(Action):
    6363
    6464    def __init__(self, label, style='', **options):
    65         super(SIRPAction, self).__init__(label, **options)
     65        super(KOFAAction, self).__init__(label, **options)
    6666        self.style = style
    6767
     
    150150        return True
    151151
    152 class SIRPLayout(UtilityView,Layout):
     152class KOFALayout(UtilityView,Layout):
    153153    """A megrok.layout.Layout with additional methods.
    154154    """
    155155    grok.baseclass()
    156156
    157 class SIRPForm(UtilityView,Form):
     157class KOFAForm(UtilityView,Form):
    158158    """A megrok.layout.Form with additional methods.
    159159    """
     
    161161
    162162    def setUpWidgets(self,ignore_request=False):
    163         super(SIRPForm,self).setUpWidgets(ignore_request)
     163        super(KOFAForm,self).setUpWidgets(ignore_request)
    164164        # Width parameters will be overridden by Bootstrap
    165165        # so we have to set the css class
     
    171171            self.widgets['body'].cssClass = 'span9'
    172172
    173 class SIRPPage(UtilityView,Page):
     173class KOFAPage(UtilityView,Page):
    174174    """A megrok.layout page with additional methods.
    175175    """
    176176    grok.baseclass()
    177177
    178 class SIRPDisplayFormPage(UtilityView,DisplayForm):
     178class KOFADisplayFormPage(UtilityView,DisplayForm):
    179179    """A megrok.layout.DisplayForm with additional methods.
    180180    """
     
    182182    template = default_waeup_display_template
    183183
    184 class SIRPEditFormPage(UtilityView,EditForm):
     184class KOFAEditFormPage(UtilityView,EditForm):
    185185    """A megrok.layout.EditForm with additional methods.
    186186    """
     
    189189
    190190    def setUpWidgets(self,ignore_request=False):
    191         super(SIRPEditFormPage,self).setUpWidgets(ignore_request)
     191        super(KOFAEditFormPage,self).setUpWidgets(ignore_request)
    192192        for widget in self.widgets:
    193193            if widget.__class__.__name__ == 'TextWidget':
     
    207207            self.widgets['perm_address'].height = 10
    208208
    209 class SIRPAddFormPage(UtilityView,AddForm):
     209class KOFAAddFormPage(UtilityView,AddForm):
    210210    """A megrok.layout.AddForm with additional methods.
    211211    """
     
    213213    template = default_waeup_edit_template
    214214
    215 class SiteLayout(SIRPLayout):
     215class SiteLayout(KOFALayout):
    216216    """ The general site layout.
    217217    """
    218     grok.context(ISIRPObject)
     218    grok.context(IKOFAObject)
    219219
    220220    #: An instance of the default theme to use for the site layout
    221     default_theme = SIRPThemeBase()
     221    default_theme = KOFAThemeBase()
    222222    stafftemp = grok.PageTemplateFile('templates/staffsitelayout.pt')
    223223    studenttemp = grok.PageTemplateFile('templates/studentsitelayout.pt')
     
    297297        hold the internal name of a theme.
    298298
    299         A theme in the waeup.sirp sense consists of a list of
     299        A theme in the waeup.kofa sense consists of a list of
    300300        CSS/JavaScript resources defined in the
    301         :mod:`waeup.sirp.browser.resources` module.
     301        :mod:`waeup.kofa.browser.resources` module.
    302302
    303303        If the context University object has no such attribute or the
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/pages.py

    r7750 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """ Viewing components for SIRP objects.
     18""" Viewing components for KOFA objects.
    1919"""
    2020import copy
     
    3737from zope.event import notify
    3838from zope.session.interfaces import ISession
    39 from waeup.sirp.browser import (
    40     SIRPPage, SIRPForm, SIRPEditFormPage, SIRPAddFormPage,
    41     SIRPDisplayFormPage, NullValidator)
    42 from waeup.sirp.browser.interfaces import (
     39from waeup.kofa.browser import (
     40    KOFAPage, KOFAForm, KOFAEditFormPage, KOFAAddFormPage,
     41    KOFADisplayFormPage, NullValidator)
     42from waeup.kofa.browser.interfaces import (
    4343    IUniversity, IFacultiesContainer, IFaculty, IFacultyAdd,
    4444    IDepartment, IDepartmentAdd, ICourse, ICourseAdd, ICertificate,
    4545    ICertificateAdd, ICertificateCourse, ICertificateCourseAdd)
    46 from waeup.sirp.interfaces import MessageFactory as _
    47 from waeup.sirp.browser.resources import warning, datepicker, tabs, datatable
    48 from waeup.sirp.interfaces import(
    49     ISIRPObject, IUsersContainer, IUserAccount, IDataCenter,
    50     ISIRPXMLImporter, ISIRPXMLExporter, IBatchProcessor,
     46from waeup.kofa.interfaces import MessageFactory as _
     47from waeup.kofa.browser.resources import warning, datepicker, tabs, datatable
     48from waeup.kofa.interfaces import(
     49    IKOFAObject, IUsersContainer, IUserAccount, IDataCenter,
     50    IKOFAXMLImporter, IKOFAXMLExporter, IBatchProcessor,
    5151    ILocalRolesAssignable, DuplicationError, IConfigurationContainer,
    5252    ISessionConfiguration, ISessionConfigurationAdd,
    53     IPasswordValidator, IContactForm, ISIRPUtils)
    54 from waeup.sirp.permissions import get_users_with_local_roles, get_all_roles
    55 from waeup.sirp.students.catalog import search as searchstudents
    56 from waeup.sirp.university.catalog import search
    57 from waeup.sirp.university.vocabularies import course_levels
    58 from waeup.sirp.authentication import LocalRoleSetEvent
    59 from waeup.sirp.widgets.restwidget import ReSTDisplayWidget
    60 from waeup.sirp.authentication import get_principal_role_manager
    61 from waeup.sirp.utils.helpers import get_user_account
    62 from waeup.sirp.browser.layout import jsaction, action, UtilityView
    63 
    64 grok.context(ISIRPObject)
     53    IPasswordValidator, IContactForm, IKOFAUtils)
     54from waeup.kofa.permissions import get_users_with_local_roles, get_all_roles
     55from waeup.kofa.students.catalog import search as searchstudents
     56from waeup.kofa.university.catalog import search
     57from waeup.kofa.university.vocabularies import course_levels
     58from waeup.kofa.authentication import LocalRoleSetEvent
     59from waeup.kofa.widgets.restwidget import ReSTDisplayWidget
     60from waeup.kofa.authentication import get_principal_role_manager
     61from waeup.kofa.utils.helpers import get_user_account
     62from waeup.kofa.browser.layout import jsaction, action, UtilityView
     63
     64grok.context(IKOFAObject)
    6565grok.templatedir('templates')
    6666
     
    144144#
    145145
    146 class LoginPage(SIRPPage):
     146class LoginPage(KOFAPage):
    147147    """A login page, available for all objects.
    148148    """
    149149    grok.name('login')
    150     grok.context(ISIRPObject)
     150    grok.context(IKOFAObject)
    151151    grok.require('waeup.Public')
    152152    label = _(u'Login')
     
    179179
    180180
    181 class LogoutPage(SIRPPage):
     181class LogoutPage(KOFAPage):
    182182    """A logout page. Calling this page will log the current user out.
    183183    """
    184     grok.context(ISIRPObject)
     184    grok.context(IKOFAObject)
    185185    grok.require('waeup.Public')
    186186    grok.name('logout')
     
    190190            auth = getUtility(IAuthentication)
    191191            ILogout(auth).logout(self.request)
    192             self.flash(_("You have been logged out. Thanks for using WAeUP SIRP!"))
     192            self.flash(_("You have been logged out. Thanks for using WAeUP KOFA!"))
    193193        self.redirect(self.application_url())
    194194
    195195
    196 class LanguageChangePage(SIRPPage):
     196class LanguageChangePage(KOFAPage):
    197197    """ Language switch
    198198    """
    199     grok.context(ISIRPObject)
     199    grok.context(IKOFAObject)
    200200    grok.name('change_language')
    201201    grok.require('waeup.Public')
    202202
    203203    def update(self, lang='en', view_name='@@index'):
    204         self.response.setCookie('sirp.language', lang, path='/')
     204        self.response.setCookie('kofa.language', lang, path='/')
    205205        self.redirect(self.url(self.context, view_name))
    206206        return
     
    213213#
    214214
    215 class ContactAdminForm(SIRPForm):
     215class ContactAdminForm(KOFAForm):
    216216    grok.name('contactadmin')
    217217    #grok.context(IUniversity)
     
    242242        usertype = getattr(self.request.principal,
    243243                           'user_type', 'system').title()
    244         sirp_utils = getUtility(ISIRPUtils)
    245         success = sirp_utils.sendContactForm(
     244        kofa_utils = getUtility(IKOFAUtils)
     245        success = kofa_utils.sendContactForm(
    246246                fullname,email,
    247247                self.config.name_admin,self.config.email_admin,
     
    263263    @action(_('Send now'), style='primary')
    264264    def send(self, *args, **data):
    265         sirp_utils = getUtility(ISIRPUtils)
    266         success = sirp_utils.sendContactForm(
     265        kofa_utils = getUtility(IKOFAUtils)
     266        success = kofa_utils.sendContactForm(
    267267                data['fullname'],data['email_from'],
    268268                self.config.name_admin,self.config.email_admin,
     
    279279#
    280280
    281 class UniversityPage(SIRPDisplayFormPage):
     281class UniversityPage(KOFADisplayFormPage):
    282282    """ The main university page.
    283283    """
     
    290290    @property
    291291    def frontpage(self):
    292         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
    293         lang = self.request.cookies.get('sirp.language', portal_language)
     292        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
     293        lang = self.request.cookies.get('kofa.language', portal_language)
    294294        html = self.context['configuration'].frontpage_dict.get(lang,'')
    295295        if html =='':
     
    297297                'configuration'].frontpage_dict.get(portal_language,'')
    298298        if html =='':
    299             return _(u'<h1>Welcome to WAeUP.SIRP</h1>')
     299            return _(u'<h1>Welcome to WAeUP.KOFA</h1>')
    300300        else:
    301301            return html
    302302
    303 class AdministrationPage(SIRPPage):
     303class AdministrationPage(KOFAPage):
    304304    """ The administration overview page.
    305305    """
     
    319319
    320320    name = 'General news feed'
    321     description = 'waeup.sirp now supports RSS 2.0 feeds :-)'
     321    description = 'waeup.kofa now supports RSS 2.0 feeds :-)'
    322322    language = None
    323323    date = None
     
    378378#
    379379
    380 class UsersContainerPage(SIRPPage):
     380class UsersContainerPage(KOFAPage):
    381381    """Overview page for all local users.
    382382    """
     
    418418        return site_roles_string
    419419
    420 class AddUserFormPage(SIRPAddFormPage):
     420class AddUserFormPage(KOFAAddFormPage):
    421421    grok.require('waeup.manageUsers')
    422422    grok.context(IUsersContainer)
     
    456456        self.redirect(self.url(self.context))
    457457
    458 class UserManageFormPage(SIRPEditFormPage):
     458class UserManageFormPage(KOFAEditFormPage):
    459459    """Manage a user account.
    460460    """
     
    525525        usertype = getattr(self.request.principal,
    526526                           'user_type', 'system').title()
    527         sirp_utils = getUtility(ISIRPUtils)
    528         success = sirp_utils.sendContactForm(
     527        kofa_utils = getUtility(IKOFAUtils)
     528        success = kofa_utils.sendContactForm(
    529529                self.request.principal.title,email,
    530530                self.context.title,self.context.email,
     
    550550        self.widgets['title'].displayWidth = 30
    551551
    552 class MyRolesPage(SIRPPage):
     552class MyRolesPage(KOFAPage):
    553553    """Display site roles and local roles assigned to officers.
    554554    """
     
    581581#
    582582
    583 class SearchPage(SIRPPage):
     583class SearchPage(KOFAPage):
    584584    """General search page for the academics section.
    585585    """
     
    608608#
    609609
    610 class ConfigurationContainerDisplayFormPage(SIRPDisplayFormPage):
     610class ConfigurationContainerDisplayFormPage(KOFADisplayFormPage):
    611611    """View page of the configuration container.
    612612    """
     
    619619    form_fields['frontpage'].custom_widget = ReSTDisplayWidget
    620620
    621 class ConfigurationContainerManageFormPage(SIRPEditFormPage):
     621class ConfigurationContainerManageFormPage(KOFAEditFormPage):
    622622    """Manage page of the configuration container. We always use the
    623623    manage page in the UI not the view page, thus we use the index name here.
     
    684684        return
    685685
    686 class SessionConfigurationAddFormPage(SIRPAddFormPage):
     686class SessionConfigurationAddFormPage(KOFAAddFormPage):
    687687    """Add a session configuration object to configuration container.
    688688    """
     
    711711        return
    712712
    713 class SessionConfigurationManageFormPage(SIRPEditFormPage):
     713class SessionConfigurationManageFormPage(KOFAEditFormPage):
    714714    """Manage session configuration object.
    715715    """
     
    742742#
    743743
    744 class DatacenterPage(SIRPPage):
     744class DatacenterPage(KOFAPage):
    745745    grok.context(IDataCenter)
    746746    grok.name('index')
     
    749749    pnav = 0
    750750
    751 class DatacenterUploadPage(SIRPPage):
     751class DatacenterUploadPage(KOFAPage):
    752752    grok.context(IDataCenter)
    753753    grok.name('upload')
     
    794794        return '%s_%s%s' % (base, filtered_username, ext.lower())
    795795
    796 class DatacenterImportStep1(SIRPPage):
     796class DatacenterImportStep1(KOFAPage):
    797797    """Manual import step 1: choose file
    798798    """
     
    820820        if select is not None:
    821821            # A filename was selected
    822             session = ISession(self.request)['waeup.sirp']
     822            session = ISession(self.request)['waeup.kofa']
    823823            session['import_filename'] = select
    824824            self.redirect(self.url(self.context, '@@import2'))
    825825
    826 class DatacenterImportStep2(SIRPPage):
     826class DatacenterImportStep2(KOFAPage):
    827827    """Manual import step 2: choose importer
    828828    """
     
    909909    def update(self, mode=None, importer=None,
    910910               back1=None, cancel=None, proceed=None):
    911         session = ISession(self.request)['waeup.sirp']
     911        session = ISession(self.request)['waeup.kofa']
    912912        self.filename = session.get('import_filename', None)
    913913
     
    944944            self.flash(warnings)
    945945
    946 class DatacenterImportStep3(SIRPPage):
     946class DatacenterImportStep3(KOFAPage):
    947947    """Manual import step 3: modify header
    948948    """
     
    10231023
    10241024    def update(self, headerfield=None, back2=None, cancel=None, proceed=None):
    1025         session = ISession(self.request)['waeup.sirp']
     1025        session = ISession(self.request)['waeup.kofa']
    10261026        self.filename = session.get('import_filename', None)
    10271027        self.mode = session.get('import_mode', None)
     
    10521052            self.flash(warnings)
    10531053
    1054 class DatacenterImportStep4(SIRPPage):
     1054class DatacenterImportStep4(KOFAPage):
    10551055    """Manual import step 4: do actual import
    10561056    """
     
    10741074            self.redirect(self.url(self.context))
    10751075            return
    1076         session = ISession(self.request)['waeup.sirp']
     1076        session = ISession(self.request)['waeup.kofa']
    10771077        self.filename = session.get('import_filename', None)
    10781078        self.mode = session.get('import_mode', None)
     
    11111111            mapping = {'a':linenum - self.warn_num}))
    11121112
    1113 class DatacenterLogsOverview(SIRPPage):
     1113class DatacenterLogsOverview(KOFAPage):
    11141114    grok.context(IDataCenter)
    11151115    grok.name('logs')
     
    11221122
    11231123    def update(self, show=None, logname=None, back=None):
    1124         session = ISession(self.request)['waeup.sirp']
     1124        session = ISession(self.request)['waeup.kofa']
    11251125        if back is not None:
    11261126            self.redirect(self.url(self.context))
     
    11331133        self.files = self.context.getLogFiles()
    11341134
    1135 class DatacenterLogsFileview(SIRPPage):
     1135class DatacenterLogsFileview(KOFAPage):
    11361136    grok.context(IDataCenter)
    11371137    grok.name('show')
     
    11531153            self.redirect(self.url(self.context, '@@logs'))
    11541154            return
    1155         session = ISession(self.request)['waeup.sirp']
     1155        session = ISession(self.request)['waeup.kofa']
    11561156        logname = session.get('logname', None)
    11571157        if back is not None or logname is None:
     
    11721172        popen.close()
    11731173
    1174 class DatacenterSettings(SIRPPage):
     1174class DatacenterSettings(KOFAPage):
    11751175    grok.context(IDataCenter)
    11761176    grok.name('manage')
     
    12151215
    12161216    def render(self):
    1217         exporter = ISIRPXMLExporter(self.context)
     1217        exporter = IKOFAXMLExporter(self.context)
    12181218        xml = exporter.export().read()
    12191219        self.response.setHeader(
     
    12211221        return xml
    12221222
    1223 class ImportXMLPage(SIRPPage):
     1223class ImportXMLPage(KOFAPage):
    12241224    """Replace the context object by an object created from an XML
    12251225       representation.
     
    12371237        if not xmlfile:
    12381238            return
    1239         importer = ISIRPXMLImporter(self.context)
     1239        importer = IKOFAXMLImporter(self.context)
    12401240        obj = importer.doImport(xmlfile)
    12411241        if type(obj) != type(self.context):
     
    12571257#
    12581258
    1259 class FacultiesContainerPage(SIRPPage):
     1259class FacultiesContainerPage(KOFAPage):
    12601260    """ Index page for faculty containers.
    12611261    """
     
    12671267    grok.template('facultypage')
    12681268
    1269 class FacultiesContainerManageFormPage(SIRPEditFormPage):
     1269class FacultiesContainerManageFormPage(KOFAEditFormPage):
    12701270    """Manage the basic properties of a `Faculty` instance.
    12711271    """
     
    13021302
    13031303
    1304 class FacultyAddFormPage(SIRPAddFormPage):
     1304class FacultyAddFormPage(KOFAAddFormPage):
    13051305    """ Page form to add a new faculty to a faculty container.
    13061306    """
     
    13301330# Faculty pages
    13311331#
    1332 class FacultyPage(SIRPPage):
     1332class FacultyPage(KOFAPage):
    13331333    """Index page of faculties.
    13341334    """
     
    13421342        return _('Departments')
    13431343
    1344 class FacultyManageFormPage(SIRPEditFormPage):
     1344class FacultyManageFormPage(KOFAEditFormPage):
    13451345    """Manage the basic properties of a `Faculty` instance.
    13461346    """
     
    14161416        return del_local_roles(self,3,**data)
    14171417
    1418 class DepartmentAddFormPage(SIRPAddFormPage):
     1418class DepartmentAddFormPage(KOFAAddFormPage):
    14191419    """Add a department to a faculty.
    14201420    """
     
    14461446# Department pages
    14471447#
    1448 class DepartmentPage(SIRPPage):
     1448class DepartmentPage(KOFAPage):
    14491449    """Department index page.
    14501450    """
     
    14751475            yield(dict(url=url, name=key, container=val))
    14761476
    1477 class ShowStudentsInDepartmentPage(SIRPPage):
     1477class ShowStudentsInDepartmentPage(KOFAPage):
    14781478    """Page that lists all students in the department.
    14791479    """
     
    15101510        return hitlist
    15111511
    1512 class DepartmentManageFormPage(SIRPEditFormPage):
     1512class DepartmentManageFormPage(KOFAEditFormPage):
    15131513    """Manage the basic properties of a `Department` instance.
    15141514    """
     
    16121612        return del_local_roles(self,4,**data)
    16131613
    1614 class CourseAddFormPage(SIRPAddFormPage):
     1614class CourseAddFormPage(KOFAAddFormPage):
    16151615    """Add-form to add course to a department.
    16161616    """
     
    16491649        return
    16501650
    1651 class CertificateAddFormPage(SIRPAddFormPage):
     1651class CertificateAddFormPage(KOFAAddFormPage):
    16521652    """Add-form to add certificate to a department.
    16531653    """
     
    16901690# Courses pages
    16911691#
    1692 class CoursePage(SIRPDisplayFormPage):
     1692class CoursePage(KOFADisplayFormPage):
    16931693    """Course index page.
    16941694    """
     
    17031703        return '%s (%s)' % (self.context.title, self.context.code)
    17041704
    1705 class CourseManageFormPage(SIRPEditFormPage):
     1705class CourseManageFormPage(KOFAEditFormPage):
    17061706    """Edit form page for courses.
    17071707    """
     
    17341734# Certificate pages
    17351735#
    1736 class CertificatePage(SIRPDisplayFormPage):
     1736class CertificatePage(KOFADisplayFormPage):
    17371737    """Index page for certificates.
    17381738    """
     
    17521752        return super(CertificatePage, self).update()
    17531753
    1754 class CertificateManageFormPage(SIRPEditFormPage):
     1754class CertificateManageFormPage(KOFAEditFormPage):
    17551755    """Manage the properties of a `Certificate` instance.
    17561756    """
     
    18301830
    18311831
    1832 class CertificateCourseAddFormPage(SIRPAddFormPage):
     1832class CertificateCourseAddFormPage(KOFAAddFormPage):
    18331833    """Add-page to add a course ref to a certificate
    18341834    """
     
    18621862# Certificate course pages...
    18631863#
    1864 class CertificateCoursePage(SIRPPage):
     1864class CertificateCoursePage(KOFAPage):
    18651865    """CertificateCourse index page.
    18661866    """
     
    18791879        return course_levels.getTerm(self.context.level).title
    18801880
    1881 class CertificateCourseManageFormPage(SIRPEditFormPage):
     1881class CertificateCourseManageFormPage(KOFAEditFormPage):
    18821882    """Manage the basic properties of a `CertificateCourse` instance.
    18831883    """
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/resources.py

    r7592 r7811  
    1616## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    1717##
    18 """Special JavaScript and CSS resources provided by waeup.sirp.
     18"""Special JavaScript and CSS resources provided by waeup.kofa.
    1919"""
    2020#from hurry import yui
     
    2424
    2525
    26 #: All local resources are registered under the name ``waeup_sirp``.
    27 waeup_sirp = Library('waeup_sirp', 'static')
     26#: All local resources are registered under the name ``waeup_kofa``.
     27waeup_kofa = Library('waeup_kofa', 'static')
    2828
    2929#: A resource that binds a jQueryUI datepicker widget to each
     
    3636#:   require the JavaScript code to be rendered into the page::
    3737#:
    38 #:     from waeup.sirp.browser.resources import datepicker
     38#:     from waeup.kofa.browser.resources import datepicker
    3939#:     # ...
    4040#:     class MyPage(...):
     
    8989#: ``"datepicker-us-year"``
    9090#:    same but also adds a select field for year
    91 datepicker = ResourceInclusion(waeup_sirp, 'datepicker.js',
     91datepicker = ResourceInclusion(waeup_kofa, 'datepicker.js',
    9292                               depends=[jqueryui])
    9393
     
    9999#:   require the JavaScript code to be rendered into the page::
    100100#:
    101 #:     from waeup.sirp.browser.resources import warning
     101#:     from waeup.kofa.browser.resources import warning
    102102#:     # ...
    103103#:     class MyPage(...):
     
    115115#:        <input type="submit" name="xyz" value="abc">
    116116#:               onclick="return confirmPost('Are you sure?')"/>
    117 warning = ResourceInclusion(waeup_sirp, 'warning.js')
     117warning = ResourceInclusion(waeup_kofa, 'warning.js')
    118118
    119119#: If you have many select boxes in a from which have to be selected at the same
     
    123123#:   require the JavaScript code to be rendered into the page::
    124124#:
    125 #:     from waeup.sirp.browser.resources import toggleall
     125#:     from waeup.kofa.browser.resources import toggleall
    126126#:     # ...
    127127#:     class MyPage(...):
     
    138138#:
    139139#:    <input type="checkbox" onClick="toggle(this, 'entries')" />
    140 toggleall = ResourceInclusion(waeup_sirp, 'toggleall.js')
     140toggleall = ResourceInclusion(waeup_kofa, 'toggleall.js')
    141141
    142142#: A resource that binds Bootstrap tabs to <div> tags with class
     
    150150#:   tab for redirection::
    151151#:
    152 #:     from waeup.sirp.browser.resources import tabs
     152#:     from waeup.kofa.browser.resources import tabs
    153153#:
    154154#:     class MyPage(...):
     
    188188#: for details.
    189189#:
    190 tabs = ResourceInclusion(waeup_sirp, 'bootstrap-tabs-1.4.0.js',
     190tabs = ResourceInclusion(waeup_kofa, 'bootstrap-tabs-1.4.0.js',
    191191                          depends=[jquery])
    192192
     
    197197#: use of datatables you might want to add some specialized CSS like
    198198#: `datatable_css` below.
    199 datatables = ResourceInclusion(waeup_sirp, 'jquery.dataTables.js',
     199datatables = ResourceInclusion(waeup_kofa, 'jquery.dataTables.js',
    200200                               minified='jquery.dataTables.min.js',
    201201                               depends=[jquery])
    202202
    203203#: A stylesheet for datatables
    204 datatables_css = ResourceInclusion(waeup_sirp, 'datatables.css')
     204datatables_css = ResourceInclusion(waeup_kofa, 'datatables.css')
    205205
    206206#: A resource that turns HTML tables into sortable, searchable and :
     
    214214#:   require the JavaScript code to be rendered into the page::
    215215#:
    216 #:     from waeup.sirp.browser.resources import datatable
     216#:     from waeup.kofa.browser.resources import datatable
    217217#:     # ...
    218218#:     class MyPage(...):
     
    251251#: for details.
    252252#:
    253 datatable = ResourceInclusion(waeup_sirp, 'datatable.js',
     253datatable = ResourceInclusion(waeup_kofa, 'datatable.js',
    254254                              depends=[datatables, datatables_css])
    255255
    256256#: Register Twitter's Bootsrap css including dropdown js as a resource.
    257257bootstrap_min = ResourceInclusion(
    258     waeup_sirp, 'bootstrap-1.4.0.css')
     258    waeup_kofa, 'bootstrap-1.4.0.css')
    259259
    260260dropdown = ResourceInclusion(
    261     waeup_sirp, 'bootstrap-dropdown-1.4.0.js',
     261    waeup_kofa, 'bootstrap-dropdown-1.4.0.js',
    262262    depends=[jquery])
    263263
    264 #: Register basic SIRP CSS (which is based on ``bootstrap.min-1.4.0.css``
     264#: Register basic KOFA CSS (which is based on ``bootstrap.min-1.4.0.css``
    265265#: and ``base`` as a resource.
    266266waeup_base_css = ResourceInclusion(
    267     waeup_sirp, 'waeup-base.css',
     267    waeup_kofa, 'waeup-base.css',
    268268    depends=[dropdown,bootstrap_min, base])
    269269
    270270#: A basic theme based on jQuery only (crappy yet).
    271271waeuptheme_empty = ResourceInclusion(
    272     waeup_sirp, 'empty.css',
     272    waeup_kofa, 'empty.css',
    273273    depends=[humanity])
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datatable.js

    r6023 r7811  
    44                "aaSorting": [[ 1, "asc" ]],
    55                "aoColumnDefs":[{ "bSortable": false, "aTargets": [ 0 ] }]
    6         } );   
     6        } );
    77});
    88
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/datepicker.js

    r6060 r7811  
    11$(function() {
    2   $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd', 
     2  $( ".datepicker" ).datepicker({ dateFormat: 'yy-mm-dd',
    33                                  duration: 'fast'
    44  });
     
    2424
    2525$(function() {
    26   $( ".datepicker-year" ).datepicker({ dateFormat: 'yy-mm-dd', 
     26  $( ".datepicker-year" ).datepicker({ dateFormat: 'yy-mm-dd',
    2727        duration: 'fast',
    2828        changeYear: true,
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/static/waeup-base.css

    r7746 r7811  
    1 /* This is the base stylesheet for SIRP. It defines base styles
     1/* This is the base stylesheet for KOFA. It defines base styles
    22additionally or modifying Bootstrap styles. For themes, please create
    33a stylesheet overriding values set here in a file named
     
    132132}
    133133
    134  /* SIRP stuff */
     134 /* KOFA stuff */
    135135
    136136div.actionbar {
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatecoursepage.pt

    r7705 r7811  
    1 <table i18n:domain="waeup.sirp" class="form-table">
     1<table i18n:domain="waeup.kofa" class="form-table">
    22  <thead>
    33  </thead>
     
    66      <td i18n:translate="">Code:</td>
    77      <td tal:content="context/__name__">CODE</td>
    8     </tr> 
     8    </tr>
    99    <tr>
    1010      <td i18n:translate="">Course Code:</td>
    1111      <td tal:content="context/getCourseCode">THE COURSE</td>
    12     </tr>   
     12    </tr>
    1313    <tr>
    1414      <td i18n:translate="">Course Title:</td>
     
    1717    <tr>
    1818      <td i18n:translate="">Provided by:</td>
    19       <td> 
     19      <td>
    2020      <span tal:content="python: context.course.__parent__.__parent__.longtitle()">DEPARTMENT</span>
    2121      <br />
    2222      <span tal:content="python: context.course.__parent__.__parent__.__parent__.longtitle()">FACULTY</span>
    2323      </td>
    24     </tr>   
     24    </tr>
    2525    <tr>
    2626      <td i18n:translate="">Level:</td>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatemanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2       enctype="multipart/form-data" i18n:domain="waeup.sirp">
     2      enctype="multipart/form-data" i18n:domain="waeup.kofa">
    33
    44  <ul class="tabs" data-tabs="tabs">
     
    77    <li tal:attributes="class view/tab3"><a href="#tab-3" i18n:translate="">Local Roles</a></li>
    88  </ul>
    9    
     9
    1010  <div class="tab-content">
    1111    <div id="tab-1" tal:attributes="class view/tab1">
     
    136136    </div>
    137137  </div>
    138 </form> 
     138</form>
    139139
    140140
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/certificatepage.pt

    r7705 r7811  
    11<table class="form-table">
    22<thead>
    3 </thead> 
     3</thead>
    44<tbody>
    55  <tal:block repeat="widget view/widgets">
     
    2020<h3>
    2121  <span tal:content="context/__name__">Code</span>
    22   <span i18n:domain="waeup.sirp" i18n:translate="">Course Referrers</span>
     22  <span i18n:domain="waeup.kofa" i18n:translate="">Course Referrers</span>
    2323</h3>
    2424<br />
    25 <table i18n:domain="waeup.sirp" class="display dataTable">
     25<table i18n:domain="waeup.kofa" class="display dataTable">
    2626<thead>
    2727  <tr>
     
    4949             tal:content="cc/course/code">
    5050        COURSE CODE
    51       </a>     
     51      </a>
    5252    <td>
    5353      <span tal:content="cc/course/title">
     
    5959           MANDATORY
    6060      </span>
    61     </td>               
     61    </td>
    6262  </tr>
    6363</tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/configurationmanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   enctype="multipart/form-data" i18n:domain="waeup.sirp">
     2  enctype="multipart/form-data" i18n:domain="waeup.kofa">
    33    <ul class="tabs" data-tabs="tabs">
    44      <li tal:attributes="class view/tab1">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/contactform.pt

    r7464 r7811  
    33
    44  <tal:block repeat="widget view/widgets">
    5    
     5
    66    <div tal:condition="python: widget.name != 'form.body'"
    77         tal:content="widget/label">Label
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport1page.pt

    r7705 r7811  
    1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 1</h3>
    2 <p i18n:domain="waeup.sirp" i18n:translate="">
     1<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 1</h3>
     2<p i18n:domain="waeup.kofa" i18n:translate="">
    33  Using batch processing you can mass-create, mass-update, or
    44  mass-remove datasets from the database using CSV files.
    55</p>
    6 <p i18n:domain="waeup.sirp" i18n:translate="">
     6<p i18n:domain="waeup.kofa" i18n:translate="">
    77  Please select a file for processing from the list below.
    88</p>
    9 <form i18n:domain="waeup.sirp" method="POST">
     9<form i18n:domain="waeup.kofa" method="POST">
    1010  <table>
    1111    <thead>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport2page.pt

    r7705 r7811  
    1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 2</h3>
    2 <form i18n:domain="waeup.sirp" method="POST">
     1<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 2</h3>
     2<form i18n:domain="waeup.kofa" method="POST">
    33  <p>
    44    <b i18n:translate="">File:</b>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport3page.pt

    r7705 r7811  
    1 <div i18n:domain="waeup.sirp" i18n:translate=""
     1<div i18n:domain="waeup.kofa" i18n:translate=""
    22  class="alert-message success" tal:condition="not: view/getWarnings">
    33  Header fields OK
    44</div>
    55
    6 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 3</h3>
    7 <form i18n:domain="waeup.sirp">
     6<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 3</h3>
     7<form i18n:domain="waeup.kofa">
    88  <p i18n:translate="">
    99    Eventually modify headerfields of import file below.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterimport4page.pt

    r7705 r7811  
    1 <h3 i18n:domain="waeup.sirp" i18n:translate="">Step 4</h3>
    2 <p i18n:domain="waeup.sirp" i18n:translate="">
     1<h3 i18n:domain="waeup.kofa" i18n:translate="">Step 4</h3>
     2<p i18n:domain="waeup.kofa" i18n:translate="">
    33  Batch processing finished.
    44</p>
    5 <p i18n:domain="waeup.sirp">
     5<p i18n:domain="waeup.kofa">
    66  <b i18n:translate="">File:</b> <span tal:content="view/filename">Filename.csv</span>
    77</p>
    8 <p i18n:domain="waeup.sirp">
     8<p i18n:domain="waeup.kofa">
    99  <b i18n:translate="">Processor:</b>
    1010  <span tal:content="view/importer/name">Importer Name</span>
    1111</p>
    12 <p i18n:domain="waeup.sirp">
     12<p i18n:domain="waeup.kofa">
    1313  <b i18n:translate="">Processing mode: </b>
    1414  <span tal:content="view/mode">mode</span>
    1515</p>
    16 <form method="POST" i18n:domain="waeup.sirp">
     16<form method="POST" i18n:domain="waeup.kofa">
    1717  <input class="btn primary" type="submit" name="finish"
    1818    tal:attributes="value view/back_button" />
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterlogspage.pt

    r7705 r7811  
    1 <div i18n:domain="waeup.sirp" tal:define="files view/files">
     1<div i18n:domain="waeup.kofa" tal:define="files view/files">
    22  <p i18n:translate="" tal:condition="not: files">
    33  Currently no log files are available.
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacentermanagepage.pt

    r7705 r7811  
    1 <form  i18n:domain="waeup.sirp" method="POST">
     1<form  i18n:domain="waeup.kofa" method="POST">
    22  <div>
    33    <span  i18n:translate="">Storage path:</span>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/datacenterpage.pt

    r7745 r7811  
    1 <p  i18n:domain="waeup.sirp" i18n:translate="">
     1<p  i18n:domain="waeup.kofa" i18n:translate="">
    22The data center helps you to manage portal data. You can upload CSV
    33files here, which will be available for import afterwards.
    44</p>
    55
    6 <p i18n:domain="waeup.sirp">
     6<p i18n:domain="waeup.kofa">
    77  <b i18n:translate="">Storage path:</b>
    88  <span tal:content="context/storage">/foo/bar</span>
    99</p>
    1010
    11 <table i18n:domain="waeup.sirp">
     11<table i18n:domain="waeup.kofa">
    1212  <thead>
    1313    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentmanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="POST"
    2   i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33  <ul class="tabs" data-tabs="tabs">
    44    <li tal:attributes="class view/tab1">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/departmentpage.pt

    r7707 r7811  
    1 <ul i18n:domain="waeup.sirp" class="tabs" data-tabs="tabs">
     1<ul i18n:domain="waeup.kofa" class="tabs" data-tabs="tabs">
    22  <li class="active"><a href="#tab-1">
    33   <span i18n:translate="">Courses</span></a>
     
    77  </li>
    88</ul>
    9 <div  i18n:domain="waeup.sirp" class="tab-content">
     9<div  i18n:domain="waeup.kofa" class="tab-content">
    1010    <div id="tab-1" class="active">
    11     <br /> 
     11    <br />
    1212    <table class="display dataTable">
    1313      <thead>
     
    2626          <td tal:content="entry/container/title">
    2727               Title
    28           </td> 
     28          </td>
    2929        </tr>
    3030      </tbody>
    3131    </table>
    3232    <br /><br />
    33     </div> 
     33    </div>
    3434    <div id="tab-2">
    3535    <br />
     
    5050          <td tal:content="entry/container/title">
    5151               Title
    52           </td> 
     52          </td>
    5353        </tr>
    5454      </tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultymanagepage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL"
    2   i18n:domain="waeup.sirp" method="POST" enctype="multipart/form-data">
     2  i18n:domain="waeup.kofa" method="POST" enctype="multipart/form-data">
    33  <ul class="tabs" data-tabs="tabs">
    44    <li tal:attributes="class view/tab1">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/facultypage.pt

    r7707 r7811  
    1 <div i18n:domain="waeup.sirp" i18n:translate="" tal:condition="python: not len(context.keys())">
     1<div i18n:domain="waeup.kofa" i18n:translate="" tal:condition="python: not len(context.keys())">
    22There no subobjects registered yet.
    33</div>
    44
    5 <table i18n:domain="waeup.sirp">
     5<table i18n:domain="waeup.kofa">
    66  <thead>
    77    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/loginpage.pt

    r7707 r7811  
    1 <form i18n:domain="waeup.sirp" method="post">
     1<form i18n:domain="waeup.kofa" method="post">
    22  <table id="login" class="form-table" summary="Table for entering login information">
    33    <tbody>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/myrolespage.pt

    r7707 r7811  
    1 <h3 i18n:domain="waeup.sirp"
     1<h3 i18n:domain="waeup.kofa"
    22    i18n:translate="">My Portal Roles:</h3>
    3 <table i18n:domain="waeup.sirp" class="form-table">
     3<table i18n:domain="waeup.kofa" class="form-table">
    44<tr tal:repeat="role view/getSiteRoles">
    55    <td>
     
    99</table>
    1010
    11 <h3 i18n:domain="waeup.sirp"
     11<h3 i18n:domain="waeup.kofa"
    1212    i18n:translate="">My Local Roles:</h3>
    1313<table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/notfound.pt

    r7707 r7811  
    1 <h2 i18n:domain="waeup.sirp" i18n:translate="">
     1<h2 i18n:domain="waeup.kofa" i18n:translate="">
    22  The page you are trying to access is not available.
    33</h2>
    44
    5 <div i18n:domain="waeup.sirp">
     5<div i18n:domain="waeup.kofa">
    66  <b i18n:translate="">Please note the following:</b></div>
    7 <div i18n:domain="waeup.sirp">
     7<div i18n:domain="waeup.kofa">
    88  <ol class="list">
    99    <li i18n:translate="">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/searchpage.pt

    r7707 r7811  
    66</form>
    77<br />
    8 <span  i18n:domain="waeup.sirp" tal:condition="view/hitlist">
     8<span  i18n:domain="waeup.kofa" tal:condition="view/hitlist">
    99    <h3 i18n:translate="">Search Results</h3>
    1010    <table class="display dataTable">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/showstudentspage.pt

    r7707 r7811  
    1 <table i18n:domain="waeup.sirp" class="display dataTable">
     1<table i18n:domain="waeup.kofa" class="display dataTable">
    22  <thead>
    33        <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/staffsitelayout.pt

    r7707 r7811  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.sirp">
     2<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" i18n:domain="waeup.kofa">
    33  <head>
    44    <title>WAeUP - your way up
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/studentsitelayout.pt

    r7707 r7811  
    11<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    2 <html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup.sirp">
     2<html xmlns="http://www.w3.org/1999/xhtml" i18n:domain="waeup.kofa">
    33  <head>
    44    <title>WAeUP - your way up
     
    1010    <meta name="viewport" content="width=320, initial-scale=1, maximum-scale=1"/>
    1111    <link rel="stylesheet" media="only screen and (max-device-width: 480px)"
    12         tal:attributes="href python: view.url(layout.site, '@@/waeup.sirp.browser/mobile.css')"
     12        tal:attributes="href python: view.url(layout.site, '@@/waeup.kofa.browser/mobile.css')"
    1313        type="text/css" />
    1414    <link rel="shortcut icon" tal:attributes="href static/favicon.ico" type="image/x-icon" />
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/universityrss20feed.pt

    r4989 r7811  
    11<?xml version="1.0" encoding="UTF-8"?>
    2 <rss version="2.0" 
    3      xmlns:tal="http://xml.zope.org/namespaces/tal" 
     2<rss version="2.0"
     3     xmlns:tal="http://xml.zope.org/namespaces/tal"
    44     xmlns:atom="http://www.w3.org/2005/Atom">
    55  <channel>
    66    <title>
    77      <tal:block tal:content="view/title"/>
    8       <tal:block 
    9           tal:define="title view/contexttitle" 
     8      <tal:block
     9          tal:define="title view/contexttitle"
    1010          tal:condition="title"> - <tal:block content="title"/>
    1111      </tal:block>
     
    1616        tal:content="view/description"></description>
    1717    <language
    18         tal:condition="view/language" 
     18        tal:condition="view/language"
    1919        tal:content="view/language"></language>
    2020    <pubDate
    21         tal:condition="view/date" 
     21        tal:condition="view/date"
    2222        tal:content="view/date"></pubDate>
    2323    <lastBuildDate
    24         tal:condition="view/buildDate" 
     24        tal:condition="view/buildDate"
    2525        tal:content="view/buildDate"></lastBuildDate>
    2626    <managingEditor
    27         tal:condition="view/editor" 
     27        tal:condition="view/editor"
    2828        tal:content="view/editor"></managingEditor>
    2929    <webMaster
    30         tal:condition="view/webmaster" 
     30        tal:condition="view/webmaster"
    3131        tal:content="view/webmaster"></webMaster>
    3232    <atom:link
    33         tal:attributes="href string:${view/link}@@feeds/${view/name}" 
     33        tal:attributes="href string:${view/link}@@feeds/${view/name}"
    3434        rel="self" type="application/rss+xml" />
    3535    <item
     
    4040          tal:content="item/description"></description>
    4141      <guid
    42           tal:content="item/guid" 
     42          tal:content="item/guid"
    4343          tal:define="isPermaLink item/isPermaLink|nothing"
    4444          tal:attributes="isPermaLink python:isPermaLink and 'true' or 'false'"></guid>
    4545      <link
    46           tal:condition="item/link|nothing" 
     46          tal:condition="item/link|nothing"
    4747          tal:content="item/link"></link>
    4848      <author
    49           tal:condition="item/author|nothing" 
     49          tal:condition="item/author|nothing"
    5050          tal:content="item/author"></author>
    5151      <category
    52           tal:condition="item/category|nothing" 
     52          tal:condition="item/category|nothing"
    5353          tal:content="item/category"></category>
    5454      <pubDate
    55           tal:condition="item/pubDate|nothing" 
     55          tal:condition="item/pubDate|nothing"
    5656          tal:content="item/pubDate"></pubDate>
    5757    </item>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/usereditformpage.pt

    r7737 r7811  
    11<form action="." tal:attributes="action request/URL" method="post"
    2       i18n:domain="waeup.sirp" enctype="multipart/form-data">
     2      i18n:domain="waeup.kofa" enctype="multipart/form-data">
    33
    44  <table class="form-table">
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/templates/userscontainerpage.pt

    r7745 r7811  
    1 <table i18n:domain="waeup.sirp">
     1<table i18n:domain="waeup.kofa">
    22  <thead>
    33    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_captcha.py

    r7312 r7811  
    2121from zope.interface import verify
    2222from zope.publisher.browser import TestRequest
    23 from waeup.sirp.testing import FunctionalLayer, FunctionalTestCase
    24 from waeup.sirp.browser.captcha import (
     23from waeup.kofa.testing import FunctionalLayer, FunctionalTestCase
     24from waeup.kofa.browser.captcha import (
    2525    CaptchaResponse, CaptchaRequest, NullCaptcha, StaticCaptcha, ReCaptcha,
    2626    CaptchaManager)
    27 from waeup.sirp.browser.interfaces import (
     27from waeup.kofa.browser.interfaces import (
    2828    ICaptchaRequest, ICaptchaResponse, ICaptcha, ICaptchaConfig,
    2929    ICaptchaManager)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_doctests.py

    r7195 r7811  
    1818"""Setup doctests for browser module.
    1919"""
    20 from waeup.sirp.testing import get_doctest_suite
     20from waeup.kofa.testing import get_doctest_suite
    2121
    2222def test_suite():
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/tests/test_permissions.py

    r7195 r7811  
    3131from zope.security.interfaces import Unauthorized
    3232from zope.testbrowser.testing import Browser
    33 from waeup.sirp.app import University
    34 from waeup.sirp.testing import (
     33from waeup.kofa.app import University
     34from waeup.kofa.testing import (
    3535    FunctionalLayer, FunctionalTestCase, get_all_loggers, remove_new_loggers,
    3636    remove_logger)
  • main/waeup.kofa/trunk/src/waeup/kofa/browser/theming.py

    r7459 r7811  
    2323from zope.interface import Interface
    2424from zope.schema.interfaces import IVocabularyFactory
    25 from waeup.sirp.interfaces import SimpleSIRPVocabulary
    26 from waeup.sirp.browser.interfaces import ITheme
    27 from waeup.sirp.browser.resources import (
     25from waeup.kofa.interfaces import SimpleKOFAVocabulary
     26from waeup.kofa.browser.interfaces import ITheme
     27from waeup.kofa.browser.resources import (
    2828    waeuptheme_empty, waeup_base_css,
    2929    )
    3030
    31 class SIRPThemeBase(grok.GlobalUtility):
     31class KOFAThemeBase(grok.GlobalUtility):
    3232    grok.implements(ITheme)
    3333    grok.name('base waeup theme')
     
    3838        return [waeup_base_css]
    3939
    40 #class SIRPThemeRed1(grok.GlobalUtility):
     40#class KOFAThemeRed1(grok.GlobalUtility):
    4141#    grok.implements(ITheme)
    4242#    grok.name('red waeup theme')
     
    4747#        return [waeuptheme_red1]
    4848
    49 #class SIRPThemeGray1(grok.GlobalUtility):
     49#class KOFAThemeGray1(grok.GlobalUtility):
    5050#    grok.implements(ITheme)
    5151#    grok.name('gray waeup theme')
     
    5656#        return [waeuptheme_gray1]
    5757
    58 class SIRPThemeEmpty(grok.GlobalUtility):
     58class KOFAThemeEmpty(grok.GlobalUtility):
    5959    """A theme based on jQuery only.
    6060
     
    8787    and registered under the name
    8888
    89       'waeup.sirp.browser.theming.ThemesVocabulary'
     89      'waeup.kofa.browser.theming.ThemesVocabulary'
    9090
    9191    Interface fields that wish to provide a list of available themes
    9292    can require a 'named vocabulary', i.e. set:
    9393
    94       vocabulary = 'waeup.sirp.browser.theming.ThemesVocabulary'
     94      vocabulary = 'waeup.kofa.browser.theming.ThemesVocabulary'
    9595
    9696    and the vocabulary will deliver themes and their descriptive text
     
    101101    """
    102102    grok.implements(IVocabularyFactory)
    103     grok.name('waeup.sirp.browser.theming.ThemesVocabulary')
     103    grok.name('waeup.kofa.browser.theming.ThemesVocabulary')
    104104
    105105    def __call__(self, context):
     
    112112        terms = [(theme.description, name)
    113113                 for name, theme in get_all_themes()]
    114         vocab = SimpleSIRPVocabulary(*terms)
     114        vocab = SimpleKOFAVocabulary(*terms)
    115115        return vocab
  • 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.