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/hostels
Files:
11 edited

Legend:

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

    r6963 r7811  
    22"""
    33# Make this a package.
    4 from waeup.sirp.hostels.container import HostelsContainer
    5 from waeup.sirp.hostels.hostel import Hostel, Bed
     4from waeup.kofa.hostels.container import HostelsContainer
     5from waeup.kofa.hostels.hostel import Hostel, Bed
    66
    77__all__ = [
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser.py

    r7718 r7811  
    2222from zope.i18n import translate
    2323from zope.component import getUtility
    24 from waeup.sirp.browser import (
    25     SIRPEditFormPage, SIRPAddFormPage, SIRPDisplayFormPage,
     24from waeup.kofa.browser import (
     25    KOFAEditFormPage, KOFAAddFormPage, KOFADisplayFormPage,
    2626    NullValidator)
    27 from waeup.sirp.browser.breadcrumbs import Breadcrumb
    28 from waeup.sirp.browser.resources import datepicker, datatable, tabs, warning
    29 from waeup.sirp.browser.layout import default_primary_nav_template
    30 from waeup.sirp.browser.pages import delSubobjects
    31 from waeup.sirp.browser.viewlets import (
     27from waeup.kofa.browser.breadcrumbs import Breadcrumb
     28from waeup.kofa.browser.resources import datepicker, datatable, tabs, warning
     29from waeup.kofa.browser.layout import default_primary_nav_template
     30from waeup.kofa.browser.pages import delSubobjects
     31from waeup.kofa.browser.viewlets import (
    3232    ManageActionButton, PrimaryNavTab)
    33 from waeup.sirp.browser.layout import jsaction, action
    34 from waeup.sirp.interfaces import ISIRPObject, ISIRPUtils
    35 from waeup.sirp.interfaces import MessageFactory as _
    36 from waeup.sirp.hostels.vocabularies import NOT_OCCUPIED
    37 from waeup.sirp.hostels.hostel import Hostel
    38 from waeup.sirp.hostels.interfaces import (
     33from waeup.kofa.browser.layout import jsaction, action
     34from waeup.kofa.interfaces import IKOFAObject, IKOFAUtils
     35from waeup.kofa.interfaces import MessageFactory as _
     36from waeup.kofa.hostels.vocabularies import NOT_OCCUPIED
     37from waeup.kofa.hostels.hostel import Hostel
     38from waeup.kofa.hostels.interfaces import (
    3939    IHostelsContainer, IHostel, IBed, IBedAllocateStudent)
    4040
    4141def write_log_message(view, message):
    42     ob_class = view.__implemented__.__name__.replace('waeup.sirp.','')
     42    ob_class = view.__implemented__.__name__.replace('waeup.kofa.','')
    4343    view.context.loggerInfo(ob_class, message)
    4444    return
     
    6161    """
    6262
    63     grok.context(ISIRPObject)
     63    grok.context(IKOFAObject)
    6464    grok.order(5)
    6565    grok.require('waeup.viewHostels')
     
    9696            mapping = {'a':co[1], 'b':co[2], 'c':co[3]})
    9797
    98 class HostelsContainerPage(SIRPDisplayFormPage):
     98class HostelsContainerPage(KOFADisplayFormPage):
    9999    """The standard view for hostels containers.
    100100    """
     
    113113    text = _('Manage accommodation section')
    114114
    115 class HostelsContainerManagePage(SIRPDisplayFormPage):
     115class HostelsContainerManagePage(KOFADisplayFormPage):
    116116    """The manage page for hostel containers.
    117117    """
     
    148148        return
    149149
    150 class HostelAddFormPage(SIRPAddFormPage):
     150class HostelAddFormPage(KOFAAddFormPage):
    151151    """Add-form to add a hostel.
    152152    """
     
    175175        return
    176176
    177 class HostelDisplayFormPage(SIRPDisplayFormPage):
     177class HostelDisplayFormPage(KOFADisplayFormPage):
    178178    """ Page to display hostel data
    179179    """
     
    196196    target = 'manage'
    197197
    198 class HostelManageFormPage(SIRPEditFormPage):
     198class HostelManageFormPage(KOFAEditFormPage):
    199199    """ View to edit hostel data
    200200    """
     
    261261        switched = [] # for log file
    262262        switched_translated = [] # for flash message
    263         portal_language = getUtility(ISIRPUtils).PORTAL_LANGUAGE
     263        portal_language = getUtility(IKOFAUtils).PORTAL_LANGUAGE
    264264        preferred_language = self.request.cookies.get(
    265             'sirp.language', portal_language)
     265            'kofa.language', portal_language)
    266266        for bed_id in child_id:
    267267            message = self.context[bed_id].switchReservation()
    268268            switched.append('%s (%s)' % (bed_id,message))
    269             m_translated = translate(message, 'waeup.sirp',
     269            m_translated = translate(message, 'waeup.kofa',
    270270                target_language=preferred_language)
    271271            switched_translated.append('%s (%s)' % (bed_id,m_translated))
     
    306306        return
    307307
    308 class BedManageFormPage(SIRPEditFormPage):
     308class BedManageFormPage(KOFAEditFormPage):
    309309    """ View to edit bed data
    310310    """
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containermanagepage.pt

    r7718 r7811  
    11<form action="." tal:attributes="action request/URL"
    2     i18n:domain="waeup.sirp"
     2    i18n:domain="waeup.kofa"
    33    method="POST" enctype="multipart/form-data">
    44  <table>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/containerpage.pt

    r7718 r7811  
    1 <div i18n:domain="waeup.sirp"
     1<div i18n:domain="waeup.kofa"
    22   i18n:translate="" tal:condition="python: not len(context.keys())">
    33There no subobjects registered yet.
    44</div>
    55
    6 <table i18n:domain="waeup.sirp">
     6<table i18n:domain="waeup.kofa">
    77  <thead>
    88    <tr>
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/browser_templates/hostelmanagepage.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  <ul class="tabs" data-tabs="tabs">
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/catalog.py

    r7257 r7811  
    2020import grok
    2121from grok import index
    22 from waeup.sirp.interfaces import IUniversity
    23 from waeup.sirp.hostels.interfaces import IBed
     22from waeup.kofa.interfaces import IUniversity
     23from waeup.kofa.hostels.interfaces import IBed
    2424
    2525class BedIndexes(grok.Indexes):
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/container.py

    r7652 r7811  
    2020"""
    2121import grok
    22 from waeup.sirp.hostels.interfaces import IHostelsContainer, IHostel
    23 from waeup.sirp.utils.logger import Logger
     22from waeup.kofa.hostels.interfaces import IHostelsContainer, IHostel
     23from waeup.kofa.utils.logger import Logger
    2424
    2525class HostelsContainer(grok.Container, Logger):
     
    4848        return
    4949
    50     logger_name = 'waeup.sirp.${sitename}.hostels'
     50    logger_name = 'waeup.kofa.${sitename}.hostels'
    5151    logger_filename = 'hostels.log'
    5252
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/hostel.py

    r7718 r7811  
    2222from zope.event import notify
    2323from datetime import datetime
    24 from waeup.sirp.utils.helpers import attrs_to_fields
    25 from waeup.sirp.hostels.vocabularies import NOT_OCCUPIED
    26 from waeup.sirp.hostels.interfaces import IHostel, IBed, IBedAllocateStudent
    27 from waeup.sirp.students.interfaces import IBedTicket
    28 from waeup.sirp.interfaces import MessageFactory as _
     24from waeup.kofa.utils.helpers import attrs_to_fields
     25from waeup.kofa.hostels.vocabularies import NOT_OCCUPIED
     26from waeup.kofa.hostels.interfaces import IHostel, IBed, IBedAllocateStudent
     27from waeup.kofa.students.interfaces import IBedTicket
     28from waeup.kofa.interfaces import MessageFactory as _
    2929
    3030class Hostel(grok.Container):
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/interfaces.py

    r7718 r7811  
    1818from zope.interface import invariant, Invalid
    1919from zope import schema
    20 from waeup.sirp.interfaces import ISIRPObject
    21 from waeup.sirp.interfaces import MessageFactory as _
    22 from waeup.sirp.hostels.vocabularies import (
     20from waeup.kofa.interfaces import IKOFAObject
     21from waeup.kofa.interfaces import MessageFactory as _
     22from waeup.kofa.hostels.vocabularies import (
    2323    bed_letters, blocks, special_handling, StudentSource)
    2424
    25 class IHostelsContainer(ISIRPObject):
     25class IHostelsContainer(IKOFAObject):
    2626    """A container for all kind of hostel objects.
    2727
    2828    """
    2929
    30 class IHostel(ISIRPObject):
     30class IHostel(IKOFAObject):
    3131    """A base representation of hostels.
    3232
     
    146146            raise Invalid(_('Bed categories overlap.'))
    147147
    148 class IBed(ISIRPObject):
     148class IBed(IKOFAObject):
    149149    """A base representation of beds.
    150150
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/tests.py

    r7802 r7811  
    3030from zope.catalog.interfaces import ICatalog
    3131from zope.component import queryUtility
    32 from waeup.sirp.app import University
    33 from waeup.sirp.hostels.interfaces import (
     32from waeup.kofa.app import University
     33from waeup.kofa.hostels.interfaces import (
    3434    IHostelsContainer, IHostel, IBed)
    35 from waeup.sirp.hostels.container import HostelsContainer
    36 from waeup.sirp.hostels.hostel import Hostel, Bed
    37 from waeup.sirp.testing import (FunctionalLayer, FunctionalTestCase)
    38 from waeup.sirp.students.student import Student
    39 from waeup.sirp.students.accommodation import BedTicket
    40 from waeup.sirp.university.department import Department
     35from waeup.kofa.hostels.container import HostelsContainer
     36from waeup.kofa.hostels.hostel import Hostel, Bed
     37from waeup.kofa.testing import (FunctionalLayer, FunctionalTestCase)
     38from waeup.kofa.students.student import Student
     39from waeup.kofa.students.accommodation import BedTicket
     40from waeup.kofa.university.department import Department
    4141
    4242class HostelsContainerTestCase(FunctionalTestCase):
  • main/waeup.kofa/trunk/src/waeup/kofa/hostels/vocabularies.py

    r7718 r7811  
    2222from zope.catalog.interfaces import ICatalog
    2323from zc.sourcefactory.contextual import BasicContextualSourceFactory
    24 from waeup.sirp.interfaces import SimpleSIRPVocabulary
    25 from waeup.sirp.interfaces import MessageFactory as _
     24from waeup.kofa.interfaces import SimpleKOFAVocabulary
     25from waeup.kofa.interfaces import MessageFactory as _
    2626
    2727NOT_OCCUPIED = u'not occupied'
     
    5454        return "%s - %s" % (value, self.acco_students(context)[value])
    5555
    56 bed_letters = SimpleSIRPVocabulary(
     56bed_letters = SimpleKOFAVocabulary(
    5757    (_('Bed A'),'A'),
    5858    (_('Bed B'),'B'),
     
    6666    )
    6767
    68 blocks = SimpleSIRPVocabulary(
     68blocks = SimpleKOFAVocabulary(
    6969    (_('Block A'),'A'),
    7070    (_('Block B'),'B'),
     
    8484    )
    8585
    86 special_handling = SimpleSIRPVocabulary(
     86special_handling = SimpleKOFAVocabulary(
    8787    (_('Regular Hostel'),'regular'),
    8888    (_('Blocked Hostel'),'blocked'),
Note: See TracChangeset for help on using the changeset viewer.