Changeset 2689
- Timestamp:
- 10/30/08 16:34:15 (2 months ago)
- Files:
-
- communesplone/urban/trunk/BuildLicence.py (modified) (1 diff)
- communesplone/urban/trunk/GenericLicence.py (modified) (1 diff)
- communesplone/urban/trunk/i18n/urban-fr.po (modified) (5 diffs)
- communesplone/urban/trunk/i18n/urban-plone-fr.po (modified) (1 diff)
- communesplone/urban/trunk/model/urban.zargo (modified) (previous)
- communesplone/urban/trunk/profiles/default/actions.xml (modified) (1 diff)
- communesplone/urban/trunk/profiles/default/cssregistry.xml (modified) (1 diff)
- communesplone/urban/trunk/profiles/default/import_steps.xml (modified) (4 diffs)
- communesplone/urban/trunk/profiles/default/types/BuildLicence.xml (modified) (1 diff)
- communesplone/urban/trunk/profiles/default/workflows/urbanfolder_workflow/definition.xml (modified) (7 diffs)
- communesplone/urban/trunk/setuphandlers.py (modified) (8 diffs)
- communesplone/urban/trunk/skins/urban/buildlicence_edit.cpt (modified) (2 diffs)
- communesplone/urban/trunk/skins/urban/buildlicence_view.cpt (modified) (14 diffs)
- communesplone/urban/trunk/skins/urban/PortionsOutSearch.cpt (modified) (2 diffs)
- communesplone/urban/trunk/skins/urban/setPathCritValue.py (added)
- communesplone/urban/trunk/skins/urban/setPathCritValue.py.metadata (added)
- communesplone/urban/trunk/skins/urban/urban.css.dtml (modified) (1 diff)
- communesplone/urban/trunk/skins/urban/urbanlicences.css.dtml (added)
- communesplone/urban/trunk/skins/urban/urban_macros.pt (modified) (1 diff)
- communesplone/urban/trunk/skins/urban/urban_view.pt (modified) (1 diff)
- communesplone/urban/trunk/UrbanTool.py (modified) (2 diffs)
- communesplone/urban/trunk/version.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
communesplone/urban/trunk/BuildLicence.py
r2688 r2689 131 131 urbanTool = getToolByName(self,'portal_urban') 132 132 urbanTool.setBuildLicenceNumerotation(self.getReference()) 133 #there is no need for other users than Managers to List folder contents 134 #set this permission here if we use the simple_publication_workflow... 135 self.manage_permission('List folder contents', ['Manager', ], acquire=0) 133 136 self.updateTitle() 134 137 communesplone/urban/trunk/GenericLicence.py
r2688 r2689 207 207 TextField( 208 208 name='description', 209 widget=TextAreaWidget( 209 allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword',), 210 widget=RichWidget( 210 211 label='Description', 211 212 label_msgid='urban_label_description', 212 213 i18n_domain='urban', 213 214 ), 215 default_output_type='text/html', 214 216 ), 215 217 StringField( communesplone/urban/trunk/i18n/urban-fr.po
r2688 r2689 305 305 306 306 msgid "urban_label_annoncedDelay" 307 msgstr "Délai "307 msgstr "Délai annoncé" 308 308 309 309 msgid "urban_label_solicitOpinionsTo" … … 411 411 msgstr "Rechercher tous les permis de lotir" 412 412 413 msgid "search finishedbuildlicences"413 msgid "searchclosedbuildlicences" 414 414 msgstr "Rechercher les permis d'urbanisme clÃŽturés" 415 415 416 msgid "search finishedparceloutlicences"416 msgid "searchclosedparceloutlicences" 417 417 msgstr "Rechercher les permis de lotir clÃŽturés" 418 418 … … 439 439 #error messages... 440 440 msgid "warning_add_a_parcel" 441 msgstr "Veuillez renseigner la ou les parcelles concernée s."441 msgstr "Veuillez renseigner la ou les parcelles concernée(s)." 442 442 443 443 msgid "warning_add_an_applicant" 444 msgstr "Veuillez renseigner le ou les demandeur s."444 msgstr "Veuillez renseigner le ou les demandeur(s)." 445 445 446 446 #buildlicence_view … … 460 460 msgstr "Chercher des parcelles" 461 461 462 msgid "Licence state" 463 msgstr "Etat du permis" 464 462 465 #PortionOutSearch 463 466 msgid "Search parcel(s)" … … 488 491 msgid "ParcelOutLicence" 489 492 msgstr "Ajouter un Permis de lotir" 493 494 #urban_actions 495 msgid "View" 496 msgstr "Voir le permis" 497 498 msgid "Edit" 499 msgstr "Modifier le permis" 500 501 msgid "Delete" 502 msgstr "Supprimer le permis" 503 504 msgid "Close" 505 msgstr "ClÃŽturer le permis" 506 507 msgid "Reopen" 508 msgstr "Réouvrir le permis" 509 510 msgid "label_remove" 511 msgstr "Supprimer" 512 513 msgid "label_edit" 514 msgstr "Modifier" 515 516 msgid "actions" 517 msgstr "actions" communesplone/urban/trunk/i18n/urban-plone-fr.po
r2683 r2689 64 64 #states 65 65 msgid "in_progress" 66 msgstr " en cours"66 msgstr "En cours" 67 67 68 msgid " finished"69 msgstr " clÎturé"68 msgid "closed" 69 msgstr "ClÎturé" 70 70 71 71 #transitions 72 msgid " finish"73 msgstr " clÎturer"72 msgid "close" 73 msgstr "ClÎturer" 74 74 75 75 msgid "reopen" 76 msgstr " réouvrir"76 msgstr "Réouvrir" 77 77 78 78 #control panel 79 79 msgid "UrbanTool" 80 80 msgstr "Configuration de 'urban'" 81 82 #actions 83 msgid "edit" 84 msgstr "Modifier le permis" communesplone/urban/trunk/profiles/default/actions.xml
r2670 r2689 18 18 </object> 19 19 </object> 20 21 <object name="document_actions" meta_type="CMF Action Category"> 22 <property name="title"></property> 23 <object name="view" meta_type="CMF Action" i18n:domain="urban"> 24 <property name="title" i18n:translate="">View</property> 25 <property name="description" i18n:translate=""></property> 26 <property name="url_expr">string:$object_url/</property> 27 <property name="icon_expr"></property> 28 <property 29 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ]</property> 30 <property name="permissions"> 31 <element value="View"/> 32 </property> 33 <property name="visible">True</property> 34 </object> 35 </object> 36 37 <object name="document_actions" meta_type="CMF Action Category"> 38 <property name="title"></property> 39 <object name="edit" meta_type="CMF Action" i18n:domain="urban"> 40 <property name="title" i18n:translate="">Edit</property> 41 <property name="description" i18n:translate=""></property> 42 <property name="url_expr">string:$object_url/edit</property> 43 <property name="icon_expr"></property> 44 <property 45 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ]</property> 46 <property name="permissions"> 47 <element value="Modify portal content"/> 48 </property> 49 <property name="visible">True</property> 50 </object> 51 </object> 52 53 <object name="document_actions" meta_type="CMF Action Category"> 54 <property name="title"></property> 55 <object name="delete" meta_type="CMF Action" i18n:domain="urban"> 56 <property name="title" i18n:translate="">Delete</property> 57 <property name="description" i18n:translate=""></property> 58 <property name="url_expr">string:$object_url/delete_confirmation</property> 59 <property name="icon_expr"></property> 60 <property 61 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ]</property> 62 <property name="permissions"> 63 <element value="Delete objects"/> 64 </property> 65 <property name="visible">True</property> 66 </object> 67 </object> 68 69 <object name="document_actions" meta_type="CMF Action Category"> 70 <property name="title"></property> 71 <object name="close" meta_type="CMF Action" i18n:domain="urban"> 72 <property name="title" i18n:translate="">Close</property> 73 <property name="description" i18n:translate=""></property> 74 <property name="url_expr">string:$object_url/content_status_modify?workflow_action=close</property> 75 <property name="icon_expr"></property> 76 <property 77 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and portal.portal_workflow.getInfoFor(here, 'review_state') == 'in_progress'</property> 78 <property name="permissions"> 79 <element value="Review portal content"/> 80 </property> 81 <property name="visible">True</property> 82 </object> 83 </object> 84 85 <object name="document_actions" meta_type="CMF Action Category"> 86 <property name="title"></property> 87 <object name="reopen" meta_type="CMF Action" i18n:domain="urban"> 88 <property name="title" i18n:translate="">Reopen</property> 89 <property name="description" i18n:translate=""></property> 90 <property name="url_expr">string:$object_url/content_status_modify?workflow_action=reopen</property> 91 <property name="icon_expr"></property> 92 <property 93 name="available_expr">python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and portal.portal_workflow.getInfoFor(here, 'review_state') == 'closed'</property> 94 <property name="permissions"> 95 <element value="Review portal content"/> 96 </property> 97 <property name="visible">True</property> 98 </object> 99 </object> 100 20 101 </object> communesplone/urban/trunk/profiles/default/cssregistry.xml
r2686 r2689 25 25 rel="stylesheet" 26 26 rendering="import"/> 27 --> 27 28 <stylesheet title="urban licences CSS" 29 cacheable="True" 30 compression="safe" 31 cookable="True" 32 enabled="1" 33 expression="python: here.meta_type in ['BuildLicence', 'ParcelOutLicence', ] and not member.has_role('Manager')" 34 id="urbanlicences.css" 35 media="all" 36 rel="stylesheet" 37 rendering="import"/> 28 38 <!-- ##/code-section cssregistry.xml --> 29 39 </object> communesplone/urban/trunk/profiles/default/import_steps.xml
r2688 r2689 6 6 handler="Products.urban.setuphandlers.setupHideToolsFromNavigation" 7 7 title="Hide Custom tools from Navigation for urban" 8 version="2008-10- 27T16:17:34.279236">8 version="2008-10-30T16:06:26.329085"> 9 9 <dependency step="urban-QI-dependencies"/> 10 10 Hides custom tools from navigation tree for urban … … 15 15 handler="Products.urban.setuphandlers.fixTools" 16 16 title="Fix tools for urban" 17 version="2008-10- 27T16:17:34.279236">17 version="2008-10-30T16:06:26.329085"> 18 18 <dependency step="urban-QI-dependencies"/> 19 19 call initializeArchetyps for tools in urban … … 25 25 handler="Products.urban.setuphandlers.updateRoleMappings" 26 26 title="Update Workflow role mappings for urban" 27 version="2008-10- 27T16:17:34.279236">27 version="2008-10-30T16:06:26.329085"> 28 28 <dependency step="urban-QI-dependencies"/> 29 29 updates the workflow role mappings for urban … … 34 34 handler="Products.urban.setuphandlers.postInstall" 35 35 title="manual coded post-install for urban" 36 version="2008-10- 27T16:17:34.279236">36 version="2008-10-30T16:06:26.329085"> 37 37 <dependency step="urban-QI-dependencies"/> 38 38 manual coded post-install for urban communesplone/urban/trunk/profiles/default/types/BuildLicence.xml
r2505 r2689 30 30 <alias from="properties" to="base_metadata"/> 31 31 <alias from="sharing" to="folder_localrole_form"/> 32 <action title=" Properties"33 action_id=" metadata"32 <action title="View" 33 action_id="view" 34 34 category="object" 35 35 condition_expr="" 36 url_expr="string:${object_url}/ properties"36 url_expr="string:${object_url}/view" 37 37 visible="True"> 38 <permission value=" Modify portal content"/>38 <permission value="View"/> 39 39 </action> 40 40 <action title="Edit" 41 41 action_id="edit" 42 42 category="object" 43 condition_expr=" python:1"44 url_expr="string:${object_url}/ buildlicence_edit"43 condition_expr="not:object/@@plone_lock_info/is_locked_for_current_user" 44 url_expr="string:${object_url}/edit" 45 45 visible="True"> 46 46 <permission value="Modify portal content"/> 47 47 </action> 48 <action title=" View"49 action_id=" view"48 <action title="Properties" 49 action_id="metadata" 50 50 category="object" 51 51 condition_expr="python:1" 52 url_expr="string:${object_url}/ buildlicence_view"52 url_expr="string:${object_url}/properties" 53 53 visible="True"> 54 <permission value=" View"/>54 <permission value="Manage properties"/> 55 55 </action> 56 56 </object> communesplone/urban/trunk/profiles/default/workflows/urbanfolder_workflow/definition.xml
r2688 r2689 13 13 <permission>urban: Add UrbanEvent</permission> 14 14 <permission>ATContentTypes: Add File</permission> 15 <permission>Add portal content</permission> 16 <permission>Modify view template</permission> 15 17 <permission>Access contents information</permission> 16 <state state_id=" finished"17 title=" finished">18 <state state_id="closed" 19 title="closed"> 18 20 <exit-transition transition_id="reopen"/> 19 21 <permission-map name="ATContentTypes: Add File" … … 36 38 <permission-role>Owner</permission-role> 37 39 </permission-map> 40 <permission-map name="Add portal content" 41 acquired="False"> 42 <permission-role>Editor</permission-role> 43 <permission-role>Manager</permission-role> 44 </permission-map> 38 45 <permission-map name="Delete objects" 39 46 acquired="False"> … … 47 54 <permission-role>Manager</permission-role> 48 55 <permission-role>Owner</permission-role> 56 </permission-map> 57 <permission-map name="Modify view template" 58 acquired="False"> 59 <permission-role>Manager</permission-role> 49 60 </permission-map> 50 61 <permission-map name="Review portal content" … … 79 90 <state state_id="in_progress" 80 91 title="in_progress"> 81 <exit-transition transition_id=" finish"/>92 <exit-transition transition_id="close"/> 82 93 <permission-map name="ATContentTypes: Add File" 83 94 acquired="False"> … … 99 110 <permission-role>Owner</permission-role> 100 111 </permission-map> 112 <permission-map name="Add portal content" 113 acquired="False"> 114 <permission-role>Editor</permission-role> 115 <permission-role>Manager</permission-role> 116 </permission-map> 101 117 <permission-map name="Delete objects" 102 118 acquired="False"> … … 111 127 <permission-role>Owner</permission-role> 112 128 </permission-map> 129 <permission-map name="Modify view template" 130 acquired="False"> 131 <permission-role>Manager</permission-role> 132 </permission-map> 113 133 <permission-map name="Review portal content" 114 134 acquired="False"> … … 140 160 </permission-map> 141 161 </state> 142 <transition transition_id=" finish"143 title=" finish"144 new_state=" finished"162 <transition transition_id="close" 163 title="close" 164 new_state="closed" 145 165 trigger="USER" 146 166 before_script="" 147 167 after_script=""> 148 <action url="" category="workflow"> finish</action>168 <action url="" category="workflow">close</action> 149 169 <guard> 150 170 </guard> communesplone/urban/trunk/setuphandlers.py
r2688 r2689 286 286 app_folder.manage_addLocalRoles("urban_readers", ("Reader",)) 287 287 app_folder.manage_addLocalRoles("urban_editors", ("Reader",)) 288 #set some hardcoded permissions 289 #sharing is only managed by the 'Managers' 290 app_folder.manage_permission('Sharing page: Delegate roles', ['Manager', ], acquire=0) 291 #hide the 'Properties' tab to other roles than 'Manager' 292 app_folder.manage_permission('Manage properties', ['Manager', ], acquire=0) 288 293 289 294 #buildlicences folder : "urban_readers" can read and "urban_editors" can edit... … … 310 315 ( 'searchinprogressbuildlicences', 311 316 ( ('Type', 'ATPortalTypeCriterion', 'BuildLicence'), 312 ), ('in_progress', ) 317 ), ('in_progress', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 313 318 ), 314 319 # ParcelOutLicences in state 'in_progress' … … 316 321 ( 'searchinprogressparceloutlicences', 317 322 ( ('Type', 'ATPortalTypeCriterion', 'ParcelOutLicence'), 318 ), ('in_progress', ) 323 ), ('in_progress', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 319 324 ), 320 325 # All BuildLicences 321 326 ( 'searchbuildlicences', 322 327 ( ('Type', 'ATPortalTypeCriterion', 'BuildLicence'), 323 ), None 328 ), None, ['Title', 'CreationDate', 'Creator', 'review_state'] 324 329 ), 325 330 # All ParcelOutLicences 326 331 ( 'searchparceloutlicences', 327 332 ( ('Type', 'ATPortalTypeCriterion', 'ParcelOutLicence'), 328 ), None 329 ), 330 # Finished BuildLicences331 ( 'search finishedbuildlicences',333 ), None, ['Title', 'CreationDate', 'Creator', 'review_state'] 334 ), 335 # Closed BuildLicences 336 ( 'searchclosedbuildlicences', 332 337 ( ('Type', 'ATPortalTypeCriterion', 'BuildLicence'), 333 ), (' finished', )334 ), 335 # Finished ParcelOutLicences336 ( 'search finishedparceloutlicences',338 ), ('closed', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 339 ), 340 # Closed ParcelOutLicences 341 ( 'searchclosedparceloutlicences', 337 342 ( ('Type', 'ATPortalTypeCriterion', 'ParcelOutLicence'), 338 ), ('finished', ) 339 ), 343 ), ('closed', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 344 ), 345 # Existing parcels 346 ( 'searchportionsout', 347 ( ('Type', 'ATPortalTypeCriterion', 'PortionOut'), 348 ('Path', 'ATPathCriterion', ''), 349 ), None, ['Title', 'CreationDate', 'Creator'] 350 ), 351 340 352 ) 341 353 if not hasattr(tool, "topics"): 342 354 topicsFolderId = tool.invokeFactory("Folder",id="topics",title=service.translate("urban","topics",context=site,default="Topics")) 343 355 topicsFolder = getattr(tool, topicsFolderId) 356 #restrict the addable types to "ATTopic" 344 357 #Add these searches by meeting config 345 for topicId, topicCriteria, stateValues in topicsInfo: 358 topicsFolder.setConstrainTypesMode(1) 359 topicsFolder.setLocallyAllowedTypes(['Topic']) 360 topicsFolder.setImmediatelyAddableTypes(['Topic']) 361 for topicId, topicCriteria, stateValues, topicViewFields in topicsInfo: 346 362 topicsFolder.invokeFactory('Topic', topicId) 347 363 topic = getattr(topicsFolder, topicId) … … 352 368 criterion_type=criterionType) 353 369 criterion.setValue([criterionValue]) 354 #add a property defining if the topic is relative to a BuildLicence or a ParcelOutLicence 355 topic.manage_addProperty(TOPIC_TYPE, criterionValue, 'string') 370 #add a property defining if the topic is relative to a BuildLicence or a ParcelOutLicence or a PortionOut 371 if criterionType == 'ATPortalTypeCriterion': 372 topic.manage_addProperty(TOPIC_TYPE, criterionValue, 'string') 356 373 #add a review_state criterion if needed... 357 374 if stateValues: … … 397 414 pass 398 415 416 #hide de sendto action 417 #set visible = 0 418 site.portal_actions.document_actions.sendto.manage_changeProperties(visible = False) 419 399 420 def addApplicationFolders(context): 400 421 """ … … 409 430 newFolderid = site.invokeFactory("Folder",id="urban",title=service.translate("urban","urban",context=site,default="urban")) 410 431 newFolder = getattr(site, newFolderid) 411 else: 432 else: 412 433 newFolder = getattr(site, 'urban') 413 434 … … 421 442 if not hasattr(newFolder, "buildlicences"): 422 443 site.portal_types["Large Plone Folder"].global_allow = 1 423 newFolderid = newFolder.invokeFactory("Large Plone Folder",id="buildlicences",title=service.translate(" urban","BuildLicence",context=site,default="BuildLicences"))444 newFolderid = newFolder.invokeFactory("Large Plone Folder",id="buildlicences",title=service.translate("plone","BuildLicence",context=site,default="BuildLicences")) 424 445 site.portal_types["Large Plone Folder"].global_allow = 0 425 446 newSubFolder = getattr(newFolder, newFolderid) … … 435 456 #enable Large Plone Folder global_allow 436 457 site.portal_types["Large Plone Folder"].global_allow = 1 437 newFolderid = newFolder.invokeFactory("Large Plone Folder",id="parceloutlicences",title=service.translate(" urban","ParcelOutLicence",context=site,default="ParcelOutLicences"))458 newFolderid = newFolder.invokeFactory("Large Plone Folder",id="parceloutlicences",title=service.translate("plone","ParcelOutLicence",context=site,default="ParcelOutLicences")) 438 459 site.portal_types["Large Plone Folder"].global_allow = 0 439 460 newSubFolder = getattr(newFolder, newFolderid) communesplone/urban/trunk/skins/urban/buildlicence_edit.cpt
r2683 r2689 36 36 i18n:domain="plone"> 37 37 38 <metal:head fill-slot="top_slot"> 39 <tal:block define="macro edit_macros/topslot | nothing" 40 condition="macro"> 41 <metal:block use-macro="macro" /> 42 </tal:block> 43 </metal:head> 38 <metal:block fill-slot="top_slot" 39 tal:define="global body_onload string: init(); 40 member python: context.portal_membership.getAuthenticatedMember(); 41 border python: test(member.has_role('Manager'), 'enable_border', 'disable_border'); 42 dummy python:request.set(border, 1)" /> 44 43 45 44 <metal:javascript_head fill-slot="javascript_head_slot"> … … 95 94 96 95 <metal:block define-slot="widgets"> 97 <p><br /><br /><p/>98 96 <metal:myfield use-macro="python:here.widget('licenceSubject', mode='edit')" /> 99 97 <metal:myfield use-macro="python:here.widget('description', mode='edit')" /> communesplone/urban/trunk/skins/urban/buildlicence_view.cpt
r2688 r2689 7 7 tal:define="global body_onload string: init(); 8 8 member python: context.portal_membership.getAuthenticatedMember(); 9 border python: test(member.has_role('Manager') , 'enable_border', 'disable_border');9 border python: test(member.has_role('Manager') or not context.portal_urban.getSimplifyInterface(), 'enable_border', 'disable_border'); 10 10 dummy python:request.set(border, 1)" /> 11 11 … … 30 30 <metal:body define-macro="body_macro" tal:define="parcels context/getParcels; 31 31 applicants context/getApplicants"> 32 <!-- h1 class="documentFirstHeading" tal:content="here/Title"/ --> 32 <tal:simplifyInterface tal:condition="context/portal_urban/getSimplifyInterface"> 33 <p align="right"><strong><span i18n:translate="">Licence state</span> : </strong><span tal:define="review_state python: context.portal_workflow.getInfoFor(context, 'review_state')" tal:content="review_state" 34 i18n:translate="" i18n:domain="plone" class="#" tal:attributes="class python: 'state-' + review_state" /></p> 35 <div tal:replace="structure provider:plone.belowcontentbody" /> 36 </tal:simplifyInterface> 37 33 38 <tal:block condition="python: not parcels or not applicants"> 34 39 <dl class="portalMessage warning" tal:define="messages context/constructPortalMessage"> … … 45 50 </tal:block> 46 51 47 <div metal:use-macro="here/document_actions/macros/document_actions">48 Document actions (print, sendto etc)49 </div>50 52 <h1 class="documentFirstHeading" tal:content="context/Title">Title</h1> 51 <span tal:content="context/getLicenceSubject">Subject</span> 52 <p class="discreet" tal:content="context/Description">Description</p> 53 54 <fieldset><legend><strong tal:content="context/getLicenceSubject">Subject</strong></legend> 55 <span class="discreet" tal:content="structure context/Description">Description</span> 56 </fieldset> 57 53 58 <u><b><span i18n:translate="treating_agent">Treating agent</span> :</b></u><br> 54 59 <span tal:content="python: here.getFoldermanagers().getName1()+' '+here.getFoldermanagers().getName2()" /> 55 <br /><br /> 56 57 <table> 60 61 <p> </p> 62 63 <table cellspacing=0 cellpadding=0> 58 64 <tr> 59 65 <td> … … 61 67 <div tal:condition="not: applicants" i18n:translate="warning_add_an_applicant">You must encode applicant(s) 62 68 </div> 63 <table >69 <table cellspacing=0 cellpadding=0 border=0> 64 70 <tr> 65 71 <td> … … 74 80 <tal:block condition="applicants"> 75 81 <tal:block define="applicantObj python: applicants[0]"> 76 <span tal: content="python: applicantObj.getPersonTitle()" />77 <span tal: content="python: applicantObj.getName1()" />78 <span tal: content="python: applicantObj.getName2()" /><br />79 <span tal: content="python: applicantObj.getStreet()+' '+applicantObj.getNumber()" /><br />80 <span tal: content="python: applicantObj.getZipcode()+' '+applicantObj.getCity()" /><br/>82 <span tal:replace="applicantObj/getPersonTitle|nothing" /> 83 <span tal:replace="applicantObj/getName1|nothing" /> 84 <span tal:replace="applicantObj/getName2|nothing" /><br /> 85 <span tal:replace="python: applicantObj.getStreet()+' '+applicantObj.getNumber()" /><br /> 86 <span tal:replace="python: applicantObj.getZipcode()+' '+applicantObj.getCity()" /> 81 87 </tal:block> 82 88 </tal:block> … … 92 98 </div> 93 99 </td> 94 <td >100 <td colspan=2> 95 101 <u><b><span i18n:translate="architect">Architect</span> :</b></u><br> 96 102 <span tal:content="python: here.getArchitects().getPersonTitle()" /> … … 102 108 </tr> 103 109 <tr> 104 <td> 105 <br> 110 <td colspan=2> 106 111 <u><b><span i18n:translate="commune_reference">Commune reference</span> :</b></u> <span tal:content="python: here.getReference()" /><br /> 107 112 <u><b><span i18n:translate="dgatlp_referece">DGATLP reference</span> :</b></u> <span tal:content="python: here.getReferenceDGATLP()" /> … … 109 114 </tr> 110 115 <tr> 111 <td >116 <td colspan=2> 112 117 <br> 113 118 <u><b><span i18n:translate="folder_category">Folder category</span> :</b></u><br> … … 123 128 </tr> 124 129 <tr> 125 <td >130 <td colspan=2> 126 131 <br> 127 132 <u><b><span i18n:translate="work_location">Work location</span> :</b></u><br> … … 132 137 </tr> 133 138 <tr> 134 <td >139 <td colspan=2> 135 140 <br> 136 141 <u><b><span i18n:translate="in_subdivision">In subdivision</span>?</b></u> … … 164 169 </tr> 165 170 <tr> 166 <td >171 <td colspan=2> 167 172 <br> 168 173 <tal:block condition="python: context.getInvestigationStart()"> … … 182 187 <input type="checkbox"> réseau d'égouttage séparatif<br--> 183 188 <metal:myfield use-macro="python:here.widget('roadEquipments', mode='view')" /> 184 <br /> 185 <b><u i18n:translate="">Request for comments</u>< b/><br />189 <br /><br /> 190 <b><u i18n:translate="">Request for comments</u></b><br /> 186 191 <metal:myfield use-macro="python:here.widget('solicitOpinionsTo', mode='view')" /><br /> 187 192 <br /> 188 <u >Délai annoncé:</u><br />193 <u i18n:translate="urban_label_annoncedDelay">Deadline delay</u><br /> 189 194 <metal:myfield use-macro="python:here.widget('annoncedDelay', mode='view')" /> 190 195 </td> 191 196 </tr> 192 197 <tr> 193 <td >198 <td colspan=2> 194 199 <br /> 195 200 <u>Evénements de ce dossier:</u>(cliquez sur le lien pour visualiser ou ajouter des documents)<br /> … … 205 210 </tr> 206 211 <tr> 207 <td >212 <td colspan=2> 208 213 <br /> 209 214 Ajouter un événement á ce dossier: … … 222 227 </table> 223 228 229 <div tal:replace="structure provider:plone.belowcontentbody" /> 230 224 231 </metal:body> 225 232 </metal:main_macro> communesplone/urban/trunk/skins/urban/PortionsOutSearch.cpt
r2688 r2689 26 26 </a> 27 27 28 <!-- Display the list of already added parcels --> 29 <div tal:define="tool python: getattr(context, 'portal_urban'); 30 topics python: getattr(tool, 'topics'); 31 topic python: getattr(topics, 'searchportionsout'); 32 path_crit python: getattr(topic, 'crit__Path_ATPathCriterion'); 33 dummy python: context.setPathCritValue(path_crit, context.UID()); 34 showActions python: True;"> 35 <metal:listing use-macro="here/urban_macros/macros/listing" /> 36 </div> 37 38 39 28 40 <!-- On crée un forumlaire html simple avec les critÚres de recherche adéquats. --> 29 41 <fieldset><b><legend i18n:translate="">Search parcel(s)</legend></b> … … 46 58 47 59 <!-- Display results --> 48 <table class="vertical listing" width=100% border=1 cellspacing=0> 60 <tal:block condition="division"> 61 <table tal:define="results python:here.portal_urban.findParcel(division=division,prc=prc)" class="listing" width=100% border=0 cellspacing=0> 49 62 <thead> 50 63 <tr><th colspan="2" i18n:translate="">Found parcel(s)</th></tr> 51 <tbody tal:condition="prc" tal:define="results python:here.portal_urban.findParcel(division=division,prc=prc)" tal:repeat="res results"> 52 <tr><td tal:content="python: res[1]"/><td><a tal:attributes="href python:'addPortionOutScript?daa='+res[0]+'&prc='+res[1]" i18n:translate="">Add this parcel</a></td></tr> 64 <!-- Display 'no results' --> 65 <tbody tal:condition="not: results"> 66 <tr><td colspan=2 i18n:domain="atcontenttypes" i18n:translate="description_no_items_in_topic" class="discreet">No result found.</td></tr> 53 67 </tbody> 68 <!-- Display the results body --> 69 <tbody tal:repeat="res results" tal:condition="prc"> 70 <tr tal:define="oddrow repeat/res/odd;" tal:attributes="class python:test(oddrow, 'even', 'odd')"> 71 <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"> 73 <input type="submit" class="standalone" id="parcel" value="Add this parcel" i18n:attributes="value" /> 74 </form> 75 </tr> 76 </tbody> 77 54 78 </table> 79 </tal:block> 55 80 </div> 56 81 </div> communesplone/urban/trunk/skins/urban/urban.css.dtml
r2688 r2689 20 20 } 21 21 22 .state- finished {22 .state-closed { 23 23 color: black; 24 24 } 25 25 26 /* table styles */ 27 /* we want a table with no styles at all */ 28 .no-style-table { 29 border: 0 !important; 30 padding: 0 !important; 31 margin: 0 !important; 32 } 33 34 .no-style-table td { 35 border: 0 !important; 36 padding-left: 0 !important; 37 margin: 0 !important; 38 } 39 26 40 /* </dtml-with> */ communesplone/urban/trunk/skins/urban/urban_macros.pt
r2687 r2689 26 26 </table> 27 27 </div> 28 29 <!-- This macro need to receive a topic --> 30 <div metal:define-macro="listing" i18n:domain="plone"> 31 <tal:topiccontents define="topicContents python: topic.queryCatalog(batch=True); 32 batch topicContents; 33 showActions showActions|nothing"> 34 35 <tal:listing condition="topicContents"> 36 <a style='text-align: right' href="#" 37 tal:condition="nocall: here/asPDF|nothing" 38 tal:attributes="href string:${here_url}/asPDF/atct_topic_pdf_template/atct_topic_pdf" 39 i18n:translate="label_download_as_pdf" 40 i18n:domain="atcontenttypes"> 41 Download PDF 42 </a> 43 44 <tal:default condition="not:topic/getCustomView|nothing" 45 define="folderContents topicContents"> 46 <metal:listing metal:use-macro="here/folder_listing/macros/listing"> 47 <metal:empty metal:fill-slot="no_items_in_listing"></metal:empty> 48 </metal:listing> 49 50 </tal:default> 51 <tal:custom condition="topic/getCustomView|nothing" 52 define="vocab python:topic.listMetaDataFields(False)"> 53 54 <table class="listing" 55 summary="Content listing" 56 cellpadding="0" cellspacing="0" width="100%" 57 i18n:attributes="summary summary_content_listing;"> 58 <thead> 59 <tr> 60 <th tal:repeat="field topic/getCustomViewFields" 61 tal:content="python:vocab.getValue(field, field)" 62 i18n:translate=""/> 63 <th tal:condition="showActions" i18n:domain="urban" i18n:translate="actions"> 64 Actions 65 </th> 66 </tr> 67 </thead> 68 <tbody> 69 <tal:brain tal:repeat="obj topicContents"> 70 <tr tal:define="oddrow repeat/obj/odd;" 71 tal:attributes="class python:test(oddrow, 'even', 'odd')"> 72 <tal:fields repeat="field topic/getCustomViewFields" 73 define="url obj/getURL; 74 obj_type obj/portal_type; 75 obj_typeinfo python: here.portal_types.getTypeInfo(obj_type); 76 icon python:portal_url+'/'+ obj_typeinfo.getIcon(); 77 obj_wf_state obj/review_state|python: wtool.getInfoFor(obj, 'review_state', ''); 78 obj_wf_state_class python:'state-' + normalizeString(obj_wf_state); 79 title_or_id obj/pretty_title_or_id"> 80 <tal:block define="value python: getattr(obj, field, None)"> 81 <td tal:condition="python: field != 'Title'" 82 tal:content="python:topic.formatCatalogMetadata(value)" 83 i18n:translate=""/> 84 <td tal:condition="python: field == 'Title'"> 85 <a href="#" tal:attributes="href url"> 86 <img src="#" 87 height="16" 88 width="16" 89 tal:attributes="src icon; 90 alt obj/Type|obj_type"/> 91 </a> 92 93 <a href="#" tal:condition="python: obj.portal_type not in ['Link', 'Image']" 94 tal:attributes="href url; 95 class obj_wf_state_class" 96 tal:content="title_or_id" /> 97 98 <a href="#" tal:condition="python: obj.portal_type == 'Image'" 99 tal:attributes="href string:${url}/view; 100 class obj_wf_state_class" 101 tal:content="title_or_id" /> 102 103 <a href="#" 104 tal:condition="python: obj.portal_type == 'Link'" 105 tal:attributes="href obj/getRemoteUrl; 106 class obj_wf_state_class" 107 class="link-plain" 108 tal:content="title_or_id" />
