Changeset 586


Ignore:
Timestamp:
28 Sep 2006, 22:10:21 (18 years ago)
Author:
joachim
Message:

fixed 'zwei kleine Sachen'

Location:
WAeUP_SRP/trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/Widgets.py

    r551 r586  
    187187            return 0
    188188        else:
     189            portal_type_query = {'query':['Faculty',
     190                                          'Department',
     191                                          'Course',
     192                                          'Certificate',
     193                                          'CertificateCourse',]}
    189194            widget_id = self.getWidgetId()
    190195            value = datastructure[widget_id].upper()
     
    192197            if len(value.split()) > 1:
    193198                err = 'Invalid Id (Id contains space(s)'
    194             elif hasattr(self.aq_parent,value):
    195                 err = 'An object with the Id %s already exists in this context' % (value)
     199            elif self.portal_catalog(portal_type=portal_type_query,id=value):
     200                err = 'An object with the Id %s already exists in the Academic section' % (value)
    196201            if err:
    197202                datastructure.setError(widget_id, err)
  • WAeUP_SRP/trunk/profiles/default/layouts/department.xml

    r551 r586  
    2020 <widget name="Title" meta_type="String Widget">
    2121  <property name="fields">
    22    <element value="Title"/>
     22   <element value="title"/>
    2323  </property>
    2424  <property name="is_required">True</property>
  • WAeUP_SRP/trunk/profiles/default/layouts/faculty.xml

    r556 r586  
    2020 <widget name="Title" meta_type="String Widget">
    2121  <property name="fields">
    22    <element value="Title"/>
     22   <element value="title"/>
    2323  </property>
    2424  <property name="is_required">True</property>
  • WAeUP_SRP/trunk/profiles/default/types/Department.xml

    r538 r586  
    3434 <property name="cps_is_portlet">False</property>
    3535 <alias from="(Default)" to="academics_index"/>
     36 <alias from="create_do" to="waeup_document_create_do"/>
    3637 <alias from="created" to="department_created"/>
    3738 <alias from="view" to="academics_index"/>
  • WAeUP_SRP/trunk/skins/waeup_academics/academics_index_view.pt

    r558 r586  
    5151                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    5252                       />
    53                 <input type="submit" name="approve_checked:method"
    54                        class="context" value="Approve" />
    55                 <input type="submit" name="retract_checked:method"
    56                        class="context" value="Retract" />
    5753                <input type="submit" name="folder_delete:method" value="button_delete"
    5854                       class="destructive" i18n:attributes="value"
  • WAeUP_SRP/trunk/skins/waeup_academics/faculty_index_view.pt

    r585 r586  
    5858                       % (cpsmcat('button_select_all'), cpsmcat('button_deselect_all'))"
    5959                       />
    60                 <input type="submit" name="approve_checked:method"
    61                        class="context" value="Approve" />
    62                 <input type="submit" name="retract_checked:method"
    63                        class="context" value="Retract" />
    6460                <input type="submit" name="folder_delete:method" value="button_delete"
    6561                       class="destructive" i18n:attributes="value"
  • WAeUP_SRP/trunk/skins/waeup_academics/getFacultiesInfo.py

    r573 r586  
    3232    fo = f.getObject()
    3333    fd = fo.getContent()
    34     row['id'] = f.getId
     34    row['id'] = fo.getId()
    3535    row['title'] = fd.LongTitle()
    3636    row['url'] = fo.absolute_url()
  • WAeUP_SRP/trunk/skins/waeup_custom/folder_delete.py

    r486 r586  
    1414
    1515from Products.CMFCore.utils import getToolByName
     16here = context
     17if context.portal_type == "University":
     18    here = context.academics
    1619
    17 ti = getToolByName(context, 'portal_types').getTypeInfo(context.portal_type)
     20ti = getToolByName(here, 'portal_types').getTypeInfo(here.portal_type)
    1821meth_id = ti.queryMethodID('view', 'folder_contents')
    19 ret_url = context.absolute_url() + '/' + meth_id
     22ret_url = here.absolute_url() + '/' + meth_id
     23
    2024
    2125if ids:
     
    2327        # XXX has to be called from here since the workflow doesn't handle the
    2428        # deletion yet
    25         ob = getattr(context, id)
     29        ob = getattr(here, id)
    2630        from Products.CPSCore.EventServiceTool import getPublicEventService
    27         evtool = getPublicEventService(context)
     31        evtool = getPublicEventService(here)
    2832        evtool.notifyEvent('workflow_delete', ob, {})
    29     context.manage_delObjects(ids)
     33    here.manage_delObjects(ids)
    3034    message = 'portal_status_message=psm_item(s)_deleted'
    3135else:
  • WAeUP_SRP/trunk/skins/waeup_default/id_rename.py

    r486 r586  
    1717new_ids = [id.upper() for id in REQUEST['new_ids']]
    1818
    19 context.manage_renameObjects(REQUEST['ids'], new_ids, REQUEST)
     19here = context
     20if context.portal_type == "University":
     21    here = context.academics
     22   
    2023
    21 return REQUEST.RESPONSE.redirect(context.absolute_url() + \
    22                                 ('/academics_contents?portal_status_message=%s' \
     24here.manage_renameObjects(REQUEST['ids'], new_ids, REQUEST)
     25
     26return REQUEST.RESPONSE.redirect(here.absolute_url() + \
     27                                ('/academics_index?portal_status_message=%s' \
    2328                                % ('psm_item(s)_renamed',)))
  • WAeUP_SRP/trunk/skins/waeup_default/id_rename_form.pt

    r486 r586  
    1212<metal:main fill-slot="main">
    1313
    14 <div class="group" tal:condition="here/folder_rename_items" >
     14<div class="group" tal:condition="context/academics_rename_items" >
    1515<form action="folder_rename" method="post"
    1616      tal:attributes="action string:${here_url}/id_rename">
    1717
    1818  <table width="90%">
    19     <tr tal:repeat="item here/folder_rename_items">
     19    <tr tal:repeat="item context/academics_rename_items">
    2020      <td align="left" valign="top" width="20%" nowrap="nowrap">
    2121        <span tal:replace="structure item/iconHTML">Type Image</span>
Note: See TracChangeset for help on using the changeset viewer.