- Timestamp:
- 17 Mar 2011, 21:18:36 (14 years ago)
- Location:
- main/waeup.plonetheme/trunk/waeup/plonetheme
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.plonetheme/trunk/waeup/plonetheme/adapter.py
r5870 r5871 1 1 from plone.app.users.browser.personalpreferences import UserDataPanelAdapter 2 from Products.CMFCore.utils import getToolByName 2 3 3 4 class EnhancedUserDataPanelAdapter(UserDataPanelAdapter): 4 5 """ 5 6 """ 7 6 8 def get_position(self): 7 9 return self.context.getProperty('position', '') 8 10 def set_position(self, value): 11 membership = getToolByName(self.context, 'portal_membership') 12 if not membership.checkPermission('Manage portal', self.context): 13 return 9 14 return self.context.setMemberProperties({'position': value}) 10 15 position = property(get_position, set_position) -
main/waeup.plonetheme/trunk/waeup/plonetheme/locales/de/LC_MESSAGES/waeup.po
r5870 r5871 56 56 msgstr "Projektmitglieder" 57 57 58 #. Default: "Your WAeUP position "58 #. Default: "Your WAeUP position (write-protected)" 59 59 #: .././userdataschema.py:28 60 60 msgid "help_position" 61 msgstr "Deine Position im WAeUP "61 msgstr "Deine Position im WAeUP (schreibgeschützt)" 62 62 63 63 #. Default: "Position" -
main/waeup.plonetheme/trunk/waeup/plonetheme/locales/en/LC_MESSAGES/waeup.po
r5870 r5871 56 56 msgstr "" 57 57 58 #. Default: "Your WAeUP position "58 #. Default: "Your WAeUP position (write-protected)" 59 59 #: .././userdataschema.py:28 60 60 msgid "help_position" -
main/waeup.plonetheme/trunk/waeup/plonetheme/locales/fr/LC_MESSAGES/waeup.po
r5870 r5871 57 57 msgstr "Membres" 58 58 59 #. Default: "Your WAeUP position "59 #. Default: "Your WAeUP position (write-protected)" 60 60 #: .././userdataschema.py:28 61 61 msgid "help_position" … … 67 67 msgstr "" 68 68 69 #. Default: "Location :"69 #. Default: "Location" 70 70 #: .././skins/waeup_plonetheme_custom_templates/member_search_form.pt:87 71 71 msgid "location" … … 88 88 msgstr "mes préférences personnelles" 89 89 90 #. Default: "Position :"90 #. Default: "Position" 91 91 #: .././skins/waeup_plonetheme_custom_templates/member_search_form.pt:89 92 92 msgid "position" -
main/waeup.plonetheme/trunk/waeup/plonetheme/locales/waeup.pot
r5870 r5871 51 51 msgstr "" 52 52 53 #. Default: "Your WAeUP position "53 #. Default: "Your WAeUP position (write-protected)" 54 54 #: .././userdataschema.py:28 55 55 msgid "help_position" … … 61 61 msgstr "" 62 62 63 #. Default: "Location :"63 #. Default: "Location" 64 64 #: .././skins/waeup_plonetheme_custom_templates/member_search_form.pt:87 65 65 msgid "location" … … 81 81 msgstr "" 82 82 83 #. Default: "Position :"83 #. Default: "Position" 84 84 #: .././skins/waeup_plonetheme_custom_templates/member_search_form.pt:89 85 85 msgid "position" -
main/waeup.plonetheme/trunk/waeup/plonetheme/skins/waeup_plonetheme_custom_templates/member_search_form.pt
r5870 r5871 13 13 tal:define="search_view here/@@pas_search; 14 14 listing_allowed python: checkPermission('List portal members', here); 15 results python:listing_allowed and here.portal_membership.searchForMembers(request) or []; 15 results python:listing_allowed and here.portal_membership.searchForMembers(); 16 dummy python:results.sort(key=lambda x: x.getProperty('position') or '9999'); 16 17 DateTime python:modules['DateTime'].DateTime; 17 18 is_anonymous python:here.portal_membership.isAnonymousUser(); 18 19 is_manager python:test(here.portal_membership.checkPermission('Manage portal', here), 1, 0); "> 19 20 21 20 22 <h1 class="documentFirstHeading" 21 23 i18n:translate="heading_list_members">Project Members</h1> … … 37 39 portal_url context/@@plone_portal_state/portal_url"> 38 40 39 40 41 41 <table align="left" width=100%> 42 42 <tbody> 43 <tal:repeat tal:define="Groups python:(('Nigeria','Nigerian Group'), ('Germany','German Group'), ('Ghana','Ghanaian Group'), ('Niger','Niger Group'))"43 <tal:repeat tal:define="Groups python:(('Nigeria','Nigerian Group'), ('Germany','German Group'), )" 44 44 tal:repeat="Group Groups"> 45 45 <tr><td colspan="5"> 46 46 <h2 style="padding: 0.5em 0em" tal:content="python:Group[1]" /> 47 47 </td></tr> 48 49 50 48 51 49 <tal:block tal:repeat="result results"> 52 50 53 <tr tal:define="id result/getUserName | nothing; 51 <tr style="border: 10px solid white" 52 tal:define="id result/getUserName | nothing; 54 53 author python:pm.getMemberInfo(id) or {}; 55 54 portrait python:pm.getPersonalPortrait(id); … … 60 59 <td style="width: 8%; vertical-align:top;"> 61 60 <a href="#" tal:attributes="href portrait/absolute_url"> 62 <img src="" alt="" class="portraitPhoto" height="80"61 <img src="" alt="" class="portraitPhoto" width="60" 63 62 style="float: left; margin: 0em;" 64 63 tal:attributes="src portrait/absolute_url" /> … … 66 65 </td> 67 66 68 <td style="width: 17%; vertical-align:top;">67 <td style="width: 20%; vertical-align:top;"> 69 68 <span tal:condition="python: author['fullname']"> 70 69 <span tal:content="python: author['fullname']">name</span> … … 80 79 </td> 81 80 82 <td style="width: 5 7%; padding: 0em 2em 0em 0em; vertical-align:top;">81 <td style="width: 50%; padding: 0em 2em 0em 0em; vertical-align:top;"> 83 82 <span tal:content="author/description|nothing">Biography</span> 84 83 </td> 85 84 86 <td style="width: 18%; vertical-align:top;">85 <td style="width: 22%; vertical-align:top;"> 87 86 <span i18n:translate="location">Location</span>: <span tal:content="author/location|nothing">Location</span> 88 87 <br /> 89 <span i18n:translate="position">Position</span>: <span tal:content="p osition">Position</span>88 <span i18n:translate="position">Position</span>: <span tal:content="python: ' '.join(position.split()[1:])">Position</span> 90 89 <div tal:condition="python: author['fullname'] and not is_anonymous"> 91 90 <a href="#" tal:attributes="href string:${portal_url}/author/${id}" … … 107 106 </div> 108 107 </td> 109 110 108 </tr> 111 112 109 113 110 </tal:block> … … 117 114 118 115 </div> 119 120 116 <div class="visualClear" id="clear-space-before-navigation"><!-- --></div> 121 122 123 117 <div class="visualClear" id="clear-space-after-navigation"><!-- --></div> 124 118 … … 133 127 134 128 </html> 135 -
main/waeup.plonetheme/trunk/waeup/plonetheme/userdataschema.py
r5870 r5871 27 27 title=_(u'label_position', default=u'Position'), 28 28 description=_(u'help_position', 29 default=u"Your WAeUP position "),29 default=u"Your WAeUP position (write-protected)", 30 30 required=False) 31 31
Note: See TracChangeset for help on using the changeset viewer.