Changeset 119 for waeup_product


Ignore:
Timestamp:
28 Oct 2005, 19:44:25 (19 years ago)
Author:
Henrik Bettermann
Message:

bug fixes

Location:
waeup_product/trunk
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • waeup_product/trunk/Extensions/install.py

    r115 r119  
    2929        product_name = self.product_name
    3030        self.log("Starting %(product_name)s install" % vars() )
    31    
     31
    3232        # Roles and Permissions ###(
    3333        #
     
    4848        waeup_perms = {
    4949            UniversityManage:
    50                 ('Manager', 'SectionManager','UniversityManager', 
     50                ('Manager', 'SectionManager','UniversityManager',
    5151                 ),
    5252            StudentManage:
    53                 ('Manager', 'SectionManager','UniversityManager', 'StudentManager' 
     53                ('Manager', 'SectionManager','UniversityManager', 'StudentManager'
    5454                 ),
    5555            FacultyManage:
    56                 ('Manager', 'SectionManager','UniversityManager', 'FacultyManager' 
     56                ('Manager', 'SectionManager','UniversityManager', 'FacultyManager'
    5757                 ),
    5858            DepartmentManage:
    59                 ('Manager', 'SectionManager','UniversityManager', 'DepartmentManager' 
     59                ('Manager', 'SectionManager','UniversityManager', 'DepartmentManager'
    6060                 ),
    6161            CourseManage:
    62                 ('Manager', 'SectionManager','UniversityManager', 'CourseManager' 
     62                ('Manager', 'SectionManager','UniversityManager', 'CourseManager'
    6363                 ),
    6464        }
     
    6868
    6969        ##########################################
    70         # Actions 
     70        # Actions
    7171        ##########################################
    7272        waeup_ptypes = "'University','StudentsFolder','Student','Jamb','Faculty','Department','Course'"
    73         waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','Academics'"
     73        waeup_ptypes += ",'AccoFolder','Accommodation','StudentPersonal','AcademicsFolder'"
    7474        if CPSSubscriptions: ###(
    75            
     75
    7676            ptypes = "('Portal', 'CPSMailAccess Message', 'CPSMailAccess Box', 'CPSMailAccess Folder',"\
    7777                     + waeup_ptypes + ")"
    7878            condition = "object.portal_type not in %s" % ptypes
    79    
     79
    8080            action = {'id' : 'notify_content',
    8181                      'name' : 'action_notify_content',
     
    8989        if CPSForum:
    9090            condition = "object.portal_type not in (%s)" % waeup_ptypes
    91    
     91
    9292            action = {'id' : 'activate_comments',
    9393                      'name': 'action_activate_comments',
     
    136136                      }
    137137            self.verifyAction('portal_discussion', **action)
    138        
     138
    139139###)
    140140
     
    144144        actions = ( { 'tool'      : 'portal_actions',
    145145                        'id'        : 'student_administration',
    146                         'name'      : 'Student Administration',
     146                        'name'      : 'Students',
    147147                        'action'    : 'string:${portal_url}/sections/waeup/students',
    148148                        'permission': (View, ),
     
    161161                        'id'        : 'accomodation',
    162162                        'name'      : 'Accommodation',
    163                         'action'    : 'string:${portal_url}/sections/waeup/Accommodation/accommodation_index_html',
     163                        'action'    : 'string:${portal_url}/sections/waeup/accommodation/accommodation_index_html',
    164164                        'permissions': (View),
    165165                        #'permissions': (ModifyPortalContent,UniversityManage,StudentManage),
     
    226226###)
    227227
    228         # skins 
     228        # skins
    229229        ##########################################
    230230        self.log("Verifying %(product_name)s skinss" % vars())
     
    235235        self.verifySkins(wskins)
    236236        self.resetSkinCache()
    237        
     237
    238238        ##########################################
    239239        # portal types
     
    265265        # Groups
    266266        ##########################################
    267            
     267
    268268        self.installCustomWorkflows()
    269269        self.verifyWorkflowAssociation()
    270        
     270
    271271        self.log("End of specific %(product_name)s install" % vars())
    272272        self.finalize()
    273        
     273
    274274
    275275    def installCustomWorkflows(self):
     
    285285        """Verify workflow association
    286286        """
    287         ws_chains = { 
     287        ws_chains = {
    288288                      'Student': 'waeup_workspace_wf',
    289289                      'Jamb': 'waeup_workspace_wf',
     
    319319    for delEntry in ('StudentManager',):
    320320        if delEntry in groups.listEntryIds():
    321             groups.deleteEntry(delEntry) 
     321            groups.deleteEntry(delEntry)
    322322    for newEntry in ('Students',):
    323323        if newEntry not in groups.listEntryIds():
    324             groups.createEntry({'group': newEntry, 
    325                                 'members': []}) 
     324            groups.createEntry({'group': newEntry,
     325                                'members': []})
    326326    #groups.manage_setLocalGroupRoles(groupid = 'StudentManager',roles=('Manager',))
    327327    #groups.manage_setLocalGroupRoles(groupid = 'Students',roles=('Contributor',))
  • waeup_product/trunk/skins/waeup_default/getWAeUPTypes.py

    r113 r119  
    5151                 'action': 'folder_contents',
    5252                 'condition': "python:member and  'Manager' in member.getRoles()",
    53                  'condition': "",
    5453                 'permissions': (ModifyPortalContent,)},
    5554                {'id': 'edit',
     
    106105                {
    107106                'id'        : 'add_jamb',
    108                 'name'      : 'Add Student JAMB',
     107                'name'      : 'Add JAMB Data',
    109108                'action'    : 'string:${object/absolute_url}/create_jamb',
    110109                'permissions': (UniversityManage,StudentManage)},
    111           {'id': 'localroles',
    112           'name': 'delegate',
    113           'action': 'folder_localrole_form',
    114           'permissions': (UniversityManage,)
    115           },
     110                {
     111                'id': 'localroles',
     112                 'name': 'delegate',
     113                 'action': 'folder_localrole_form',
     114                 'permissions': (ModifyPortalContent),
     115                 'visible' : 0,
     116                },
    116117##                {'id': 'contents',
    117118##                 'name': 'action_folder_contents',
     
    159160                 'permissions': (View,)},
    160161                {'id': 'add_faculty',
    161                  'name': 'Add a Faculty',
     162                 'name': 'Add Faculty',
    162163                 'condition': "python:member and 'UniversityManager'in member.getRoles()",
    163164                 'action'    : 'string:${object/absolute_url}/create_common?type_name=Faculty',
     
    208209          'condition': "python:member and 'Manager' in member.getRoles()",
    209210          'permissions': (UniversityManage,)},
    210           {'id': 'localroles',
     211         {'id': 'localroles',
    211212          'name': 'delegate',
    212213          'action': 'folder_localrole_form',
    213           'permissions': (UniversityManage,)
     214          'permissions': (ModifyPortalContent),
     215          'visible' : 0,
    214216          },
    215217          )
     
    306308          'permission': (ModifyPortalContent,StudentManage),
    307309          },
    308           {'id': 'localroles',
     310         {'id': 'localroles',
    309311          'name': 'delegate',
    310312          'action': 'folder_localrole_form',
    311           'permissions': (UniversityManage,)
     313          'permissions': (ModifyPortalContent),
     314          'visible' : 0,
    312315          },
    313316          {
     
    407410          'visible': True,},
    408411          {'id': 'add_department',
    409           'name': 'Add a Department',
     412          'name': 'Add Department',
    410413          'action'    : 'string:${object/absolute_url}/create_common?type_name=Department',
    411414          'permissions': (ModifyPortalContent,UniversityManage,)},
     
    428431          'name': 'delegate',
    429432          'action': 'folder_localrole_form',
    430           'permissions': (UniversityManage,)
     433          'permissions': (ModifyPortalContent),
     434          'visible' : 0,
    431435          },
    432436          )
     
    469473          'visible': True,},
    470474          {'id': 'create_course',
    471           'name': 'Add a Course',
     475          'name': 'Add Course',
    472476          'action'    : 'string:${object/absolute_url}/create_course',
    473477          'permissions': (ModifyPortalContent,UniversityManage,)},
     
    490494          'name': 'delegate',
    491495          'action': 'folder_localrole_form',
    492           'permissions': (UniversityManage,)
    493           },
    494           )
    495 }
    496 ###)
    497 
    498 course_type = { ###( 
     496          'permissions': (ModifyPortalContent),
     497          'visible' : 0,
     498          },
     499          )
     500}
     501###)
     502
     503course_type = { ###(
    499504    'title': 'WAeUP Course',
    500505    'description': '',
     
    550555          'name': 'delegate',
    551556          'action': 'folder_localrole_form',
    552           'permissions': (UniversityManage,)
     557          'permissions': (ModifyPortalContent),
     558          'visible' : 0,
    553559          },
    554560          )
     
    586592          'visible': True,},
    587593          {'id': 'add_accommodation',
    588           'name': 'Add an Accommodation Hall',
    589           'condition': "python:member and not 'Student'in member.getRoles()",
     594          'name': 'Add Accommodation Hall',
     595          'condition': "python:member and 'UniversityManager'in member.getRoles()",
    590596          'action'    : 'add_accommodation',
    591597          #'action': 'folder_factories',
     
    606612###)
    607613
    608 accommodation = { ###( 
     614accommodation = { ###(
    609615    'title': 'WAeUP Accommodation',
    610616    'description': '',
  • waeup_product/trunk/skins/waeup_faculty/academics_view_all.pt

    r114 r119  
    1515  <metal:block fill-slot="main"
    1616               tal:define="items here/contentValues">
    17     <h2>The Faculties</h2>
     17    <h2>Academics (Faculties)</h2>
    1818    <table cellspacing="0" cellpadding="0">
    1919      <tal:block condition="python: len(items)">
  • waeup_product/trunk/skins/waeup_student/accommodation_index_html.py

    r103 r119  
    33# $Id$
    44
    5 """Default view for the Accommodation. 
     5"""Default view for the Accommodation.
    66"""
    77
     
    1010    roles = member.getRoles()
    1111    if 'Manager' in roles:
    12         return context.folder_view()
     12        return context.accommodation_view_manager(psm=psm)
    1313    elif 'StudentManager' in roles:
    1414        return context.accommodation_view_manager(psm=psm)
  • waeup_product/trunk/skins/waeup_student/accommodation_view_all.pt

    r103 r119  
    1212             tal:define="items here/contentValues"
    1313             >
    14     <h2><span tal:content="context/id" /></h2>
     14    <h2>Accomodation</h2>
    1515    <table cellspacing="0" cellpadding="0">
    1616      <tal:block condition="python: len(items)">
     
    1919            <a href="jamb"
    2020               tal:attributes="href item/absolute_url"
    21                tal:content="item/title_or_id"></a>
     21               tal:content="item/heading"></a>
    2222          </td>
    2323        </tr>
  • waeup_product/trunk/skins/waeup_student/accommodation_view_manager.pt

    r103 r119  
    1212             tal:define="items here/contentValues"
    1313             >
    14     <h2><span tal:content="context/id" /></h2>
     14    <h2>Accomodation</h2>
    1515    <table cellspacing="0" cellpadding="0">
    1616      <tal:block condition="python: len(items)">
     
    1919            <a href="jamb"
    2020               tal:attributes="href item/absolute_url"
    21                tal:content="item/title_or_id"></a>
     21               tal:content="item/heading"></a>
    2222          </td>
    2323        </tr>
  • waeup_product/trunk/skins/waeup_student/accommodation_view_student.pt

    r103 r119  
    1212             tal:define="items here/contentValues"
    1313             >
    14     <h2><span tal:content="context/title_or_id" /></h2>
     14    <h2>Accomodation</h2>
    1515    <table cellspacing="0" cellpadding="0">
    1616      <tal:block condition="python: len(items)">
     
    1919            <a href="jamb"
    2020               tal:attributes="href item/absolute_url"
    21                tal:content="item/title_or_id"></a>
     21               tal:content="item/heading"></a>
    2222          </td>
    2323        </tr>
  • waeup_product/trunk/skins/waeup_student/add_accommodation.py

    r107 r119  
    1616lt = context.portal_layouts
    1717
    18 accofolder = getattr(context,"Accommodation",None)
    19 if accofolder is None:
    20     context.invokeFactory('AccoFolder','Accommodation')
    21     accofolder = getattr(context,"Accommodation")
    22     context.notifyCPSDocumentCreation(ob=accofolder)
    23    
    24    
    2518res,psm,ds = lt.renderLayout(layout_id= 'accommodation',
    2619                      schema_id = 'accommodation',
     
    4538elif psm == 'valid':
    4639    oid = "%s" % ds.get('heading').replace(' ','')
    47     accofolder.invokeFactory(type_name,oid)
    48     object = getattr(accofolder,oid)   
     40    context.invokeFactory(type_name,oid)
     41    object = getattr(context,oid)
    4942    object.getContent().edit(mapping=ds)
    5043    context.notifyCPSDocumentCreation(ob=object)
    5144    psm = 'new %s created' % oid
    52     context_ti = context.portal_types[context.portal_type] 
     45    context_ti = context.portal_types[context.portal_type]
    5346    index = context_ti.getActionById('view','university_view')
    5447    return getattr(context,index)(psm=psm)
Note: See TracChangeset for help on using the changeset viewer.