Changeset 2564


Ignore:
Timestamp:
7 Nov 2007, 10:50:54 (17 years ago)
Author:
joachim
Message:

make only visible for staff

Location:
WAeUP_SRP/base/skins/waeup_directory
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/skins/waeup_directory/getMembersDirectoryActions.py

    r2348 r2564  
     1## Script (Python) "getMembersDirectoryActions"
     2##bind container=container
     3##bind context=context
     4##bind namespace=
     5##bind script=script
     6##bind subpath=traverse_subpath
    17##parameters=mode
    28#$Id$
     
    1117    def set_trace():
    1218        pass
     19if context.isStudent():
     20    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
    1321
    1422from Products.CMFCore.utils import getToolByName
  • WAeUP_SRP/base/skins/waeup_directory/getWAeUPGroups.py

    r1945 r2564  
     1## Script (Python) "getWAeUPGroups"
     2##bind container=container
     3##bind context=context
     4##bind namespace=
     5##bind script=script
     6##bind subpath=traverse_subpath
    17##parameters=key=None
    28# $Id$
    39"""
    4 Return the groups as an vocabulary
     10Retun the groups as an vocabulary
    511
    612"""
     13if context.isStudent():
     14    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     15
    716groups = context.portal_directories.groups.searchEntries(group='*')
    817if key is None:
  • WAeUP_SRP/base/skins/waeup_directory/search_members_form.pt

    r1917 r2564  
    33  global dir here/portal_directories/?dirname;
    44  global dirtitle dir/title_or_id;
    5   "/>
     5  global allowed context/isStaff;"
     6  />
    67  <metal:block use-macro="here/main_template/macros/master" >
    7   <metal:block fill-slot="action_slot"
     8  <metal:block tal:condition="allowed"
     9               fill-slot="action_slot"
    810               tal:define="actions python:context.getMembersDirectoryActions('search')">   
    911     <span metal:use-macro="here/member_view/macros/members_actions" />
    1012  </metal:block>
    11   <metal:block fill-slot="main" tal:define="
     13  <metal:block fill-slot="main">
     14    <metal:block tal:condition="not: allowed">
     15      <span tal:content="here/illegal_view" />
     16    </metal:block>
     17    <metal:block tal:condition="allowed">
     18      <metal:block
     19          tal:define="
    1220          validate python: request.has_key('cpsdirectory_search_button');
    1321          res python: dir.renderSearchDetailed(request=request, validate=validate,
     
    1725          ds python: res[2];
    1826          global portal_status_message python: (validate and not ok and
    19           'psm_content_error') or request.form.get('portal_status_message', '');">
    20     <h3>
    21       Search Member Section
    22     </h3>
    23     <br />
    24     <div tal:replace="structure rendered_main">Rendered main...</div>
     27          'psm_content_error') or request.form.get('portal_status_message', '');"
     28          >
     29        <h3>
     30          Search Member Section
     31        </h3>
     32        <br />
     33        <div tal:replace="structure rendered_main">Rendered main...</div>
     34      </metal:block>
     35    </metal:block>
    2536  </metal:block>
    2637</metal:block>
Note: See TracChangeset for help on using the changeset viewer.