Ignore:
Timestamp:
21 May 2011, 07:46:51 (14 years ago)
Author:
Henrik Bettermann
Message:

Implement changes in r6180 for academics section. There are some bugs, see email.

Location:
main/waeup.sirp/trunk/src/waeup/sirp/browser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/pages.py

    r6166 r6181  
    2323from zope.exceptions import DuplicationError
    2424from zope.session.interfaces import ISession
     25from zope.event import notify
    2526from waeup.sirp.browser.resources import warning, datepicker, tabs, datatable
    2627from waeup.sirp.browser import (
     
    4041from waeup.sirp.university.vocabularies import course_levels
    4142from waeup.sirp.widgets.restwidget import ReSTDisplayWidget
     43from waeup.sirp.users import LocalRoleSetEvent
    4244
    4345grok.context(IWAeUPObject)
     
    5052    role_manager = IPrincipalRoleManager(view.context)
    5153    role_manager.assignRoleToPrincipal(localrole, user)
     54    notify(LocalRoleSetEvent(view.context, localrole, user, granted=True))
     55    #import pdb; pdb.set_trace()
    5256    view.redirect(view.url(view.context, u'@@manage')+'#tab-%s' % tab)
    5357    return
     
    6367    if not isinstance(child_id, list):
    6468        child_id = [child_id]
    65     #import pdb; pdb.set_trace()
    6669    deleted = []
    6770    role_manager = IPrincipalRoleManager(view.context)
     
    7174        try:
    7275            role_manager.unsetRoleForPrincipal(localrole, user_name)
     76            notify(LocalRoleSetEvent(view.context, localrole, user_name, granted=False))
    7377            deleted.append(id)
    7478        except:
  • main/waeup.sirp/trunk/src/waeup/sirp/browser/templates/usercontainerpage.pt

    r5942 r6181  
    1111      <th>Title</th>
    1212      <th>Description</th>
     13      <th>Local Roles</th>
    1314      <th>Actions</th>
    1415    </tr>
     
    1920      <td tal:content="account/title">Title</td>
    2021      <td tal:content="account/description">Description</td>
     22      <td tal:content="account/getLocalRoles">Local Roles</td>
    2123      <td class="text-right">
    22         <form method="post">
    23           <input type="hidden" name="userid"
    24                 tal:attributes="value account/name"/>
    25           <input type="submit" name="edit" value="edit" />
    26           <input type="submit" name="delete" value="delete" />
    27         </form>
     24        <form method="post">
     25          <input type="hidden" name="userid"
     26          tal:attributes="value account/name"/>
     27            <input type="submit" name="edit" value="edit" />
     28            <input type="submit" name="delete" value="delete" />
     29        </form>
    2830      </td>
    2931    </tr>
Note: See TracChangeset for help on using the changeset viewer.