Changeset 2715
- Timestamp:
- 11/07/08 13:21:02 (2 months ago)
- Files:
-
- communesplone/urban/trunk/i18n/urban-fr.po (modified) (2 diffs)
- communesplone/urban/trunk/profiles/default/actions.xml (modified) (7 diffs)
- communesplone/urban/trunk/setuphandlers.py (modified) (1 diff)
- communesplone/urban/trunk/skins/urban/addPortionOutScript.py (modified) (4 diffs)
- communesplone/urban/trunk/skins/urban/buildlicence_edit.cpt (modified) (1 diff)
- communesplone/urban/trunk/skins/urban/buildlicence_view.cpt (modified) (9 diffs)
- communesplone/urban/trunk/skins/urban/PortionsOutSearch.cpt (modified) (5 diffs)
- communesplone/urban/trunk/skins/urban/urbanevent_view.cpt (modified) (3 diffs)
- communesplone/urban/trunk/skins/urban/urban_macros.pt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
communesplone/urban/trunk/i18n/urban-fr.po
r2689 r2715 460 460 msgstr "Chercher des parcelles" 461 461 462 msgid "Public inquiry" 463 msgstr "Enquête publique" 464 465 msgid "inquiry_article" 466 msgstr "Article" 467 468 msgid "inquiry_item" 469 msgstr "Point" 470 471 msgid "inquiry_from" 472 msgstr "du" 473 474 msgid "inquiry_to" 475 msgstr "au" 476 477 msgid "work_location" 478 msgstr "Lieu des travaux" 479 462 480 msgid "Licence state" 463 481 msgstr "Etat du permis" 482 483 msgid "folder_events" 484 msgstr "Evénements du dossier" 485 486 msgid "click_to_view_or_add" 487 msgstr "Cliquez ici pour voir ou ajouter des documents" 488 489 msgid "add_event" 490 msgstr "Ajouter un événement" 464 491 465 492 #PortionOutSearch … … 516 543 msgid "actions" 517 544 msgstr "actions" 545 546 #urbanevent_view 547 msgid "add_a_linked_event" 548 msgstr "Ajouter un événement lié au dossier" 549 550 msgid "create" 551 msgstr "Créer un événement" 552 553 msgid "event_linked_documents" 554 msgstr "Documents liés à cet événement" communesplone/urban/trunk/profiles/default/actions.xml
r2689 r2715 27 27 <property name="icon_expr"></property> 28 28 <property 29 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] </property>29 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and here.portal_urban.getSimplifyInterface()</property> 30 30 <property name="permissions"> 31 31 <element value="View"/> … … 43 43 <property name="icon_expr"></property> 44 44 <property 45 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] </property>45 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and here.portal_urban.getSimplifyInterface()</property> 46 46 <property name="permissions"> 47 47 <element value="Modify portal content"/> … … 59 59 <property name="icon_expr"></property> 60 60 <property 61 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] </property>61 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and here.portal_urban.getSimplifyInterface()</property> 62 62 <property name="permissions"> 63 63 <element value="Delete objects"/> … … 66 66 </object> 67 67 </object> 68 68 69 69 <object name="document_actions" meta_type="CMF Action Category"> 70 70 <property name="title"></property> … … 75 75 <property name="icon_expr"></property> 76 76 <property 77 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and portal.portal_workflow.getInfoFor(here, 'review_state') == 'in_progress' </property>77 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and portal.portal_workflow.getInfoFor(here, 'review_state') == 'in_progress' and here.portal_urban.getSimplifyInterface()</property> 78 78 <property name="permissions"> 79 79 <element value="Review portal content"/> … … 91 91 <property name="icon_expr"></property> 92 92 <property 93 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and portal.portal_workflow.getInfoFor(here, 'review_state') == 'closed' </property>93 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and portal.portal_workflow.getInfoFor(here, 'review_state') == 'closed' and here.portal_urban.getSimplifyInterface()</property> 94 94 <property name="permissions"> 95 95 <element value="Review portal content"/> … … 98 98 </object> 99 99 </object> 100 101 100 </object> communesplone/urban/trunk/setuphandlers.py
r2689 r2715 346 346 ( 'searchportionsout', 347 347 ( ('Type', 'ATPortalTypeCriterion', 'PortionOut'), 348 ('Path', 'ATPathCriterion', ''), 349 ), None, ['Title', 'CreationDate', 'Creator'] 350 ), 351 # Folder events 352 ( 'searchurbanevents', 353 ( ('Type', 'ATPortalTypeCriterion', 'UrbanEvent'), 348 354 ('Path', 'ATPathCriterion', ''), 349 355 ), None, ['Title', 'CreationDate', 'Creator'] communesplone/urban/trunk/skins/urban/addPortionOutScript.py
r2497 r2715 6 6 ##bind script=script 7 7 ##bind subpath=traverse_subpath 8 ##parameters=daa='',prc=''9 8 ## 9 prc = context.REQUEST.get('prc', None) 10 daa = context.REQUEST.get('daa', None) 11 12 if not prc or not daa: 13 return context.REQUEST.RESPONSE.redirect(context.absolute_url()) 14 10 15 AZ=['A','B','C','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'] 11 16 NUM=['0','1','2','3','4','5','6','7','8','9','0'] 12 prc=prc.strip()13 17 i=0 14 18 section='' … … 17 21 exposant='' 18 22 puissance='' 19 while prc[i] in AZ and i<= len(prc)-1: 23 prc=prc.strip() 24 25 while prc[i] in AZ and i<=len(prc)-1: 20 26 section=section+prc[i] 21 27 i=i+1 22 28 if i > len(prc)-1: 23 29 break 24 30 25 31 while prc[i] == ' ' and i<= len(prc)-1: 26 32 i=i+1 … … 33 39 if i > len(prc)-1: 34 40 break 35 41 36 42 if prc[i] == '/': 37 43 i=i+1 … … 52 58 if i > len(prc)-1: 53 59 break 54 60 55 61 while i<= len(prc)-1: 56 62 if prc[i] != ' ': communesplone/urban/trunk/skins/urban/buildlicence_edit.cpt
r2689 r2715 92 92 class python:test(path('allow_tabbing|nothing'), 'enableUnloadProtection enableAutoFocus enableFormTabbing enableUnlockProtection', 'enableUnloadProtection enableAutoFocus enableUnlockProtection');"> 93 93 <metal:block define-slot="extra_top" /> 94 94 <p><br /></p> 95 95 <metal:block define-slot="widgets"> 96 96 <metal:myfield use-macro="python:here.widget('licenceSubject', mode='edit')" /> communesplone/urban/trunk/skins/urban/buildlicence_view.cpt
r2689 r2715 99 99 </td> 100 100 <td colspan=2> 101 <u><b><span i18n:translate=" architect">Architect</span> :</b></u><br>101 <u><b><span i18n:translate="urban_label_architects">Architect</span> :</b></u><br> 102 102 <span tal:content="python: here.getArchitects().getPersonTitle()" /> 103 103 <span tal:content="python: here.getArchitects().getName1()" /> … … 123 123 <td> 124 124 <br> 125 <u><b><span i18n:translate=" work_type">Work type</span> :</b></u><br>125 <u><b><span i18n:translate="urban_label_workType">Work type</span> :</b></u><br> 126 126 <span tal:content="python: here.displayValue(context.listBuildWorkTypeTerms(), context.getWorkType())" /> 127 127 </td> … … 139 139 <td colspan=2> 140 140 <br> 141 <u><b><span i18n:translate=" in_subdivision">In subdivision</span>?</b></u>141 <u><b><span i18n:translate="urban_label_isInSubdivision">In subdivision</span>?</b></u> 142 142 <metal:myfield use-macro="python:here.widget('isInSubdivision', mode='view')" /> 143 143 <br> … … 146 146 </div> 147 147 <u><b><span i18n:translate="concerned_parcels">Concerned parcel(s)</span> :</b></u><br> 148 <tal:block repeat="portionOutObj parcels"> 149 <span tal:content="python: portionOutObj.getDivision()" /> 150 <span tal:content="python: portionOutObj.getSection()" /> 151 <span tal:content="python: portionOutObj.getRadical()" /> 152 <span tal:condition="python: portionOutObj.getBis()" tal:content="python: '/'+portionOutObj.getBis()" /> 153 <span tal:content="python: portionOutObj.getExposant()" /> 154 <span tal:content="python: portionOutObj.getPuissance()" /><br /> 155 </tal:block> 148 <div tal:define="tool python: getattr(context, 'portal_urban'); 149 topics python: getattr(tool, 'topics'); 150 topic python: getattr(topics, 'searchportionsout'); 151 path_crit python: getattr(topic, 'crit__Path_ATPathCriterion'); 152 dummy python: context.setPathCritValue(path_crit, context.UID()); 153 showActions python: True; 154 showedCols python: ('Title', 'Creator');"> 155 <metal:listing use-macro="here/urban_macros/macros/listing" /> 156 </div> 156 157 <p> 157 158 <form i18n:domain="urban" name="quickAdd" tal:attributes="action python: context.absolute_url() + '/PortionsOutSearch'" action="PortionsOutSearch" method="post" tal:define="ctype python: context.portal_types.getTypeInfo('Applicant')"> … … 173 174 <tal:block condition="python: context.getInvestigationStart()"> 174 175 <b><u i18n:translate="">Public inquiry</u></b><br /> 175 <span i18n:translate="inquiry_article">Inquiry article</span> <s pan tal:content="python: context.getInvestigationArticle()"/> - <span i18n:translate="inquiry_item">Inquiry item</span> <span tal:content="python: context.getInvestigationPoint()"/>176 <br><span i18n:translate="inquiry_from">from</span> <s pan tal:content="python: context.getInvestigationStart()"/> <span i18n:translate="inquiey_to">to</span> <span tal:content="python: context.getInvestigationEnd()"/><br><br>176 <span i18n:translate="inquiry_article">Inquiry article</span> <strong><span tal:content="python: context.getInvestigationArticle()"/></strong> - <span i18n:translate="inquiry_item">Inquiry item</span> <strong><span tal:content="python: context.getInvestigationPoint()"/></strong> 177 <br><span i18n:translate="inquiry_from">from</span> <strong><span tal:content="python: context.getInvestigationStart()"/></strong> <span i18n:translate="inquiry_to">to</span> <strong><span tal:content="python: context.getInvestigationEnd()"/></strong><br><br> 177 178 </tal:block> 178 179 <u><b i18n:translate="">Road</b> :</u><br> … … 191 192 <metal:myfield use-macro="python:here.widget('solicitOpinionsTo', mode='view')" /><br /> 192 193 <br /> 193 < u i18n:translate="urban_label_annoncedDelay">Deadline delay</u><br />194 <strong><u i18n:translate="urban_label_annoncedDelay">Deadline delay</u></strong><br /> 194 195 <metal:myfield use-macro="python:here.widget('annoncedDelay', mode='view')" /> 195 196 </td> … … 198 199 <td colspan=2> 199 200 <br /> 200 <u>Evénements de ce dossier:</u>(cliquez sur le lien pour visualiser ou ajouter des documents)<br /> 201 <tal:listEvents repeat="eventListObj python:context.objectValues('UrbanEvent')"> 202 <span tal:content="python: eventListObj.getDate1()" /> <a tal:attributes="href eventListObj/absolute_url" tal:content="eventListObj/Title" /> <a tal:attributes="href python:eventListObj.absolute_url()+'/delete_confirmation'">Supprimer</a><br> 203 </tal:listEvents> 204 <!-- 01/03/2008 <a href=""> Dépôt de la demande</a><br> 205 06/03/2008 <a href=""> Réception de la demande</a><br> 206 07/03/2008 <a href=""> Demande d'avis MET</a><br> 207 07/03/2008 <a href=""> Demande d'avis FD</a><br> 208 07/03/2008 <a href=""> Demande d'avis DGRNE</a><br --> 201 <strong><u><span i18n:translate="folder_events">Folder events</span></u></strong><span> </span><br /> 202 203 <div tal:define="tool python: getattr(context, 'portal_urban'); 204 topics python: getattr(tool, 'topics'); 205 topic python: getattr(topics, 'searchurbanevents'); 206 path_crit python: getattr(topic, 'crit__path_ATPathCriterion'); 207 dummy python: context.setPathCritValue(path_crit, context.UID()); 208 showActions python: True;"> 209 <metal:listing use-macro="here/urban_macros/macros/listing" /> 210 </div> 209 211 </td> 210 212 </tr> … … 212 214 <td colspan=2> 213 215 <br /> 214 Ajouter un événement á ce dossier:216 <strong><u><span i18n:translate="add_event">Add an event</span></u></strong> 215 217 <form action="CreateUrbanEvent" method="POST"> 216 218 <input type='hidden' name="urban_folder_id" tal:attributes="value here/getId" value=''> … … 221 223 </tal:loopEventType> 222 224 </select> 223 <input type="submit" value="Ajouter">225 <input type="submit" i18n:domain="plone" i18n:attributes="value" value="Add"> 224 226 </form> 225 227 </td> communesplone/urban/trunk/skins/urban/PortionsOutSearch.cpt
r2689 r2715 6 6 i18n:domain="urban" 7 7 metal:use-macro="here/main_template/macros/master"> 8 8 9 9 10 <metal:block fill-slot="top_slot" … … 17 18 divisions python:here.portal_urban.findDivisions()"> 18 19 20 <h1 class="documentFirstHeading" i18n:translate="search_parcels"></h1> 21 22 <div tal:replace="structure provider:plone.belowcontenttitle" /> 23 19 24 <!-- Back to the build licence... --> 20 25 <a href="" … … 27 32 28 33 <!-- Display the list of already added parcels --> 34 <fieldset><strong><legend i18n:translate="concerned_parcels">Concerned parcels</legend></strong> 29 35 <div tal:define="tool python: getattr(context, 'portal_urban'); 30 36 topics python: getattr(tool, 'topics'); … … 33 39 dummy python: context.setPathCritValue(path_crit, context.UID()); 34 40 showActions python: True;"> 35 <metal:listing use-macro="here/urban_macros/macros/listing" />41 <metal:listing use-macro="here/urban_macros/macros/listing" /> 36 42 </div> 37 38 43 </fieldset> 39 44 40 45 <!-- On crée un forumlaire html simple avec les critÚres de recherche adéquats. --> … … 70 75 <tr tal:define="oddrow repeat/res/odd;" tal:attributes="class python:test(oddrow, 'even', 'odd')"> 71 76 <td tal:content="python: res[1]"/><td> 72 <form i18n:domain="urban" name="quickAddParcel" tal:attributes="action python:'addPortionOutScript?daa='+res[0]+'&prc='+res[1]" action="addPortionOutScript" method="post"> 77 <form i18n:domain="urban" name="quickAddParcel" tal:attributes="action python: context.absolute_url() + '/addPortionOutScript'" action="#" method="post"> 78 <input type="hidden" name="daa" value="#" tal:attributes="value python: res[0]" /> 79 <input type="hidden" name="prc" value="#" tal:attributes="value python: res[1].replace(' ','')" /> 73 80 <input type="submit" class="standalone" id="parcel" value="Add this parcel" i18n:attributes="value" /> 74 81 </form> communesplone/urban/trunk/skins/urban/urbanevent_view.cpt
r2506 r2715 26 26 <h1 class="documentFirstHeading" tal:content="here/Title"/> 27 27 28 <!-- Back to the build licence... --> 29 <a href="" 30 class="link-parent" 31 tal:define="parent_url python: here.navigationParent(here, template_id)" 32 tal:condition="parent_url" 33 tal:attributes="href string:${parent_url}/view" 34 i18n:translate="back_to_licence"> 35 Go back to the licence 36 </a> 37 <br /> 28 38 <tal:showablefields repeat="evtfield python:here.getUrbaneventtypes().getActivatedFields()"> 29 39 <span tal:condition="evtfield"> 30 < span tal:condition="python:evtfield=='Date1'" tal:content=python:here.getUrbaneventtypes().getDate1Label() />31 < span tal:condition="python:evtfield=='Date2'" tal:content=python:here.getUrbaneventtypes().getDate2Label() />32 < span tal:condition="python:evtfield=='Date3'" tal:content=python:here.getUrbaneventtypes().getDate3Label() />40 <u tal:condition="python:evtfield=='Date1'"><strong><span tal:content=python:here.getUrbaneventtypes().getDate1Label() /> :</strong></u> 41 <u tal:condition="python:evtfield=='Date2'"><strong><span tal:content=python:here.getUrbaneventtypes().getDate2Label() /> :</strong></u> 42 <u tal:condition="python:evtfield=='Date3'"><strong><span tal:content=python:here.getUrbaneventtypes().getDate3Label() /> :</strong></u> 33 43 <metal:myfield use-macro="python:here.widget(evtfield, mode='view')" /> 34 44 </span> 45 </tal:showablefields> 35 46 36 <BR> 37 </tal:showablefields> 38 Documents liés á cet événement:<br> 39 <tal:listDocuments repeat="docListObj python:context.objectValues('ATFile')"> 40 <a tal:attributes="href python:docListObj.absolute_url()+'/external_edit'" tal:content="docListObj/Title" /> <a tal:attributes="href python:docListObj.absolute_url()+'/delete_confirmation'">Effacer</a><br> 41 </tal:listDocuments> 42 <br> 43 Ajouter un document lié á cet événement: 47 <fieldset><strong><legend i18n:translate="event_linked_documents">Event linked documents</legend><strong> 48 <div tal:define="tool python: getattr(context, 'portal_urban'); 49 topics python: getattr(tool, 'topics'); 50 topic python: getattr(topics, 'searchlinkedevents'); 51 path_crit python: getattr(topic, 'crit__path_ATPathCriterion'); 52 dummy python: context.setPathCritValue(path_crit, context.UID()); 53 showActions python: True;"> 54 <metal:listing use-macro="here/urban_macros/macros/listing" /> 55 </div> 56 </fieldset> 57 <u><strong><span i18n:translate="add_a_linked_event">Add a linked event</span> :</strong></u> 44 58 <form action="CreateUrbanDoc" method="POST"> 45 59 <input type='hidden' name="urban_event_uid" tal:attributes="value here/UID" value=''> … … 50 64 </tal:loopEventType> 51 65 </select> 52 <input type="submit" value="Créer">66 <input type="submit" i18n:attributes="value" value="create"> 53 67 </form> 54 68 <br> … … 75 89 </tal:block> 76 90 77 78 <a href="..">Retourner au dossier</a>79 80 81 91 <!--tal:block condition="docObj" define="dummy python:docObj.getObject().external_edit()"/--> 82 92 <tal:block condition="python: context.REQUEST.get('doc_uid') != None"> communesplone/urban/trunk/skins/urban/urban_macros.pt
r2689 r2715 28 28 29 29 <!-- This macro need to receive a topic --> 30 <!--We can receive parameters here : 31 boolean showActions specify if we show the actions column 32 list showedCols speicy a list of indexes we want to display if these indexes have been defined in the topic/customViewFields--> 30 33 <div metal:define-macro="listing" i18n:domain="plone"> 31 34 <tal:topiccontents define="topicContents python: topic.queryCatalog(batch=True); 32 35 batch topicContents; 33 showActions showActions|nothing"> 36 showActions showActions|nothing; 37 showedCols showedCols|topic/getCustomViewFields"> 34 38 35 39 <tal:listing condition="topicContents"> … … 58 62 <thead> 59 63 <tr> 60 <th tal:repeat="field topic/getCustomViewFields" 64 <tal:block repeat="field topic/getCustomViewFields"> 65 <th tal:condition="python: field in showedCols" 61 66 tal:content="python:vocab.getValue(field, field)" 62 67 i18n:translate=""/> 68 </tal:block> 63 69 <th tal:condition="showActions" i18n:domain="urban" i18n:translate="actions"> 64 70 Actions … … 78 84 obj_wf_state_class python:'state-' + normalizeString(obj_wf_state); 79 85 title_or_id obj/pretty_title_or_id"> 80 <tal:block define="value python: getattr(obj, field, None)">86 <tal:block condition="python: field in showedCols" define="value python: getattr(obj, field, None)"> 81 87 <td tal:condition="python: field != 'Title'" 82 88 tal:content="python:topic.formatCatalogMetadata(value)" 83 89 i18n:translate=""/> 84 90 <td tal:condition="python: field == 'Title'"> 91 <span tal:define="global url python: test(obj.getObject().aq_parent.meta_type == 'UrbanEvent', url + '/external_edit', url)" /> 92 85 93 <a href="#" tal:attributes="href url"> 86 94 <img src="#"
