Changeset 2689

Show
Ignore:
Timestamp:
10/30/08 16:34:15 (2 months ago)
Author:
gbastien
Message:

Simplified user interface...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • communesplone/urban/trunk/BuildLicence.py

    r2688 r2689  
    131131        urbanTool = getToolByName(self,'portal_urban') 
    132132        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) 
    133136        self.updateTitle() 
    134137 
  • communesplone/urban/trunk/GenericLicence.py

    r2688 r2689  
    207207    TextField( 
    208208        name='description', 
    209         widget=TextAreaWidget( 
     209        allowable_content_types=('text/plain', 'text/structured', 'text/html', 'application/msword',), 
     210        widget=RichWidget( 
    210211            label='Description', 
    211212            label_msgid='urban_label_description', 
    212213            i18n_domain='urban', 
    213214        ), 
     215        default_output_type='text/html', 
    214216    ), 
    215217    StringField( 
  • communesplone/urban/trunk/i18n/urban-fr.po

    r2688 r2689  
    305305 
    306306msgid "urban_label_annoncedDelay" 
    307 msgstr "Délai
     307msgstr "Délai annoncé
    308308 
    309309msgid "urban_label_solicitOpinionsTo" 
     
    411411msgstr "Rechercher tous les permis de lotir" 
    412412 
    413 msgid "searchfinishedbuildlicences" 
     413msgid "searchclosedbuildlicences" 
    414414msgstr "Rechercher les permis d'urbanisme clÃŽturés" 
    415415 
    416 msgid "searchfinishedparceloutlicences" 
     416msgid "searchclosedparceloutlicences" 
    417417msgstr "Rechercher les permis de lotir clÃŽturés" 
    418418 
     
    439439#error messages... 
    440440msgid "warning_add_a_parcel" 
    441 msgstr "Veuillez renseigner la ou les parcelles concernées." 
     441msgstr "Veuillez renseigner la ou les parcelles concernée(s)." 
    442442 
    443443msgid "warning_add_an_applicant" 
    444 msgstr "Veuillez renseigner le ou les demandeurs." 
     444msgstr "Veuillez renseigner le ou les demandeur(s)." 
    445445 
    446446#buildlicence_view 
     
    460460msgstr "Chercher des parcelles" 
    461461 
     462msgid "Licence state" 
     463msgstr "Etat du permis" 
     464 
    462465#PortionOutSearch 
    463466msgid "Search parcel(s)" 
     
    488491msgid "ParcelOutLicence" 
    489492msgstr "Ajouter un Permis de lotir" 
     493 
     494#urban_actions 
     495msgid "View" 
     496msgstr "Voir le permis" 
     497 
     498msgid "Edit" 
     499msgstr "Modifier le permis" 
     500 
     501msgid "Delete" 
     502msgstr "Supprimer le permis" 
     503 
     504msgid "Close" 
     505msgstr "ClÃŽturer le permis" 
     506 
     507msgid "Reopen" 
     508msgstr "Réouvrir le permis" 
     509 
     510msgid "label_remove" 
     511msgstr "Supprimer" 
     512 
     513msgid "label_edit" 
     514msgstr "Modifier" 
     515 
     516msgid "actions" 
     517msgstr "actions" 
  • communesplone/urban/trunk/i18n/urban-plone-fr.po

    r2683 r2689  
    6464#states 
    6565msgid "in_progress" 
    66 msgstr "en cours" 
     66msgstr "En cours" 
    6767 
    68 msgid "finished" 
    69 msgstr "clÃŽturé" 
     68msgid "closed" 
     69msgstr "ClÃŽturé" 
    7070 
    7171#transitions 
    72 msgid "finish
    73 msgstr "clÃŽturer" 
     72msgid "close
     73msgstr "ClÃŽturer" 
    7474 
    7575msgid "reopen" 
    76 msgstr "réouvrir" 
     76msgstr "Réouvrir" 
    7777 
    7878#control panel 
    7979msgid "UrbanTool" 
    8080msgstr "Configuration de 'urban'" 
     81 
     82#actions 
     83msgid "edit" 
     84msgstr "Modifier le permis" 
  • communesplone/urban/trunk/profiles/default/actions.xml

    r2670 r2689  
    1818  </object> 
    1919 </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  
    20101</object> 
  • communesplone/urban/trunk/profiles/default/cssregistry.xml

    r2686 r2689  
    2525             rel="stylesheet" 
    2626             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"/> 
    2838 <!-- ##/code-section cssregistry.xml --> 
    2939</object> 
  • communesplone/urban/trunk/profiles/default/import_steps.xml

    r2688 r2689  
    66    handler="Products.urban.setuphandlers.setupHideToolsFromNavigation" 
    77    title="Hide Custom tools from Navigation for urban" 
    8     version="2008-10-27T16:17:34.279236"> 
     8    version="2008-10-30T16:06:26.329085"> 
    99   <dependency step="urban-QI-dependencies"/> 
    1010   Hides custom tools from navigation tree for urban 
     
    1515    handler="Products.urban.setuphandlers.fixTools" 
    1616    title="Fix tools for urban" 
    17     version="2008-10-27T16:17:34.279236"> 
     17    version="2008-10-30T16:06:26.329085"> 
    1818   <dependency step="urban-QI-dependencies"/> 
    1919   call initializeArchetyps for tools in urban 
     
    2525    handler="Products.urban.setuphandlers.updateRoleMappings" 
    2626    title="Update Workflow role mappings for urban" 
    27     version="2008-10-27T16:17:34.279236"> 
     27    version="2008-10-30T16:06:26.329085"> 
    2828   <dependency step="urban-QI-dependencies"/> 
    2929   updates the workflow role mappings for urban 
     
    3434    handler="Products.urban.setuphandlers.postInstall" 
    3535    title="manual coded post-install for urban" 
    36     version="2008-10-27T16:17:34.279236"> 
     36    version="2008-10-30T16:06:26.329085"> 
    3737   <dependency step="urban-QI-dependencies"/> 
    3838   manual coded post-install for urban 
  • communesplone/urban/trunk/profiles/default/types/BuildLicence.xml

    r2505 r2689  
    3030 <alias from="properties" to="base_metadata"/> 
    3131 <alias from="sharing" to="folder_localrole_form"/> 
    32  <action title="Properties"  
    33          action_id="metadata
     32 <action title="View"  
     33         action_id="view
    3434         category="object"  
    3535         condition_expr="" 
    36          url_expr="string:${object_url}/properties"  
     36         url_expr="string:${object_url}/view"  
    3737         visible="True"> 
    38   <permission value="Modify portal content"/> 
     38  <permission value="View"/> 
    3939 </action> 
    4040 <action title="Edit"  
    4141         action_id="edit" 
    4242         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"  
    4545         visible="True"> 
    4646  <permission value="Modify portal content"/> 
    4747 </action> 
    48  <action title="View"  
    49          action_id="view
     48 <action title="Properties"  
     49         action_id="metadata
    5050         category="object"  
    5151         condition_expr="python:1" 
    52          url_expr="string:${object_url}/buildlicence_view"  
     52         url_expr="string:${object_url}/properties"  
    5353         visible="True"> 
    54   <permission value="View"/> 
     54  <permission value="Manage properties"/> 
    5555 </action> 
    5656</object> 
  • communesplone/urban/trunk/profiles/default/workflows/urbanfolder_workflow/definition.xml

    r2688 r2689  
    1313 <permission>urban: Add UrbanEvent</permission> 
    1414 <permission>ATContentTypes: Add File</permission> 
     15 <permission>Add portal content</permission> 
     16 <permission>Modify view template</permission> 
    1517 <permission>Access contents information</permission> 
    16  <state state_id="finished" 
    17         title="finished"> 
     18 <state state_id="closed" 
     19        title="closed"> 
    1820  <exit-transition transition_id="reopen"/> 
    1921  <permission-map name="ATContentTypes: Add File" 
     
    3638   <permission-role>Owner</permission-role> 
    3739  </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> 
    3845  <permission-map name="Delete objects" 
    3946                  acquired="False"> 
     
    4754   <permission-role>Manager</permission-role> 
    4855   <permission-role>Owner</permission-role> 
     56  </permission-map> 
     57  <permission-map name="Modify view template" 
     58                  acquired="False"> 
     59   <permission-role>Manager</permission-role> 
    4960  </permission-map> 
    5061  <permission-map name="Review portal content" 
     
    7990 <state state_id="in_progress" 
    8091        title="in_progress"> 
    81   <exit-transition transition_id="finish"/> 
     92  <exit-transition transition_id="close"/> 
    8293  <permission-map name="ATContentTypes: Add File" 
    8394                  acquired="False"> 
     
    99110   <permission-role>Owner</permission-role> 
    100111  </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> 
    101117  <permission-map name="Delete objects" 
    102118                  acquired="False"> 
     
    111127   <permission-role>Owner</permission-role> 
    112128  </permission-map> 
     129  <permission-map name="Modify view template" 
     130                  acquired="False"> 
     131   <permission-role>Manager</permission-role> 
     132  </permission-map> 
    113133  <permission-map name="Review portal content" 
    114134                  acquired="False"> 
     
    140160  </permission-map> 
    141161 </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" 
    145165             trigger="USER" 
    146166             before_script="" 
    147167             after_script=""> 
    148   <action url="" category="workflow">finish</action> 
     168  <action url="" category="workflow">close</action> 
    149169  <guard> 
    150170  </guard> 
  • communesplone/urban/trunk/setuphandlers.py

    r2688 r2689  
    286286        app_folder.manage_addLocalRoles("urban_readers", ("Reader",)) 
    287287        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) 
    288293 
    289294    #buildlicences folder : "urban_readers" can read and "urban_editors" can edit... 
     
    310315    ( 'searchinprogressbuildlicences', 
    311316    (  ('Type', 'ATPortalTypeCriterion', 'BuildLicence'), 
    312     ), ('in_progress', ) 
     317    ), ('in_progress', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 
    313318    ), 
    314319    # ParcelOutLicences in state 'in_progress' 
     
    316321    ( 'searchinprogressparceloutlicences', 
    317322    (  ('Type', 'ATPortalTypeCriterion', 'ParcelOutLicence'), 
    318     ), ('in_progress', ) 
     323    ), ('in_progress', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 
    319324    ), 
    320325    # All BuildLicences 
    321326    ( 'searchbuildlicences', 
    322327    (  ('Type', 'ATPortalTypeCriterion', 'BuildLicence'), 
    323     ), None 
     328    ), None, ['Title', 'CreationDate', 'Creator', 'review_state'] 
    324329    ), 
    325330    # All ParcelOutLicences 
    326331    ( 'searchparceloutlicences', 
    327332    (  ('Type', 'ATPortalTypeCriterion', 'ParcelOutLicence'), 
    328     ), None 
    329     ), 
    330     # Finished BuildLicences 
    331     ( 'searchfinishedbuildlicences', 
     333    ), None, ['Title', 'CreationDate', 'Creator', 'review_state'] 
     334    ), 
     335    # Closed BuildLicences 
     336    ( 'searchclosedbuildlicences', 
    332337    (  ('Type', 'ATPortalTypeCriterion', 'BuildLicence'), 
    333     ), ('finished', ) 
    334     ), 
    335     # Finished ParcelOutLicences 
    336     ( 'searchfinishedparceloutlicences', 
     338    ), ('closed', ), ['Title', 'CreationDate', 'Creator', 'review_state'] 
     339    ), 
     340    # Closed ParcelOutLicences 
     341    ( 'searchclosedparceloutlicences', 
    337342    (  ('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 
    340352    ) 
    341353    if not hasattr(tool, "topics"): 
    342354        topicsFolderId = tool.invokeFactory("Folder",id="topics",title=service.translate("urban","topics",context=site,default="Topics")) 
    343355        topicsFolder = getattr(tool, topicsFolderId) 
     356        #restrict the addable types to "ATTopic" 
    344357        #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: 
    346362            topicsFolder.invokeFactory('Topic', topicId) 
    347363            topic = getattr(topicsFolder, topicId) 
     
    352368                                                criterion_type=criterionType) 
    353369                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') 
    356373            #add a review_state criterion if needed... 
    357374            if stateValues: 
     
    397414        pass 
    398415 
     416    #hide de sendto action 
     417    #set visible = 0 
     418    site.portal_actions.document_actions.sendto.manage_changeProperties(visible = False) 
     419 
    399420def addApplicationFolders(context): 
    400421    """ 
     
    409430        newFolderid = site.invokeFactory("Folder",id="urban",title=service.translate("urban","urban",context=site,default="urban")) 
    410431        newFolder = getattr(site, newFolderid) 
    411     else:  
     432    else: 
    412433        newFolder = getattr(site, 'urban') 
    413434 
     
    421442    if not hasattr(newFolder, "buildlicences"): 
    422443        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")) 
    424445        site.portal_types["Large Plone Folder"].global_allow = 0 
    425446        newSubFolder = getattr(newFolder, newFolderid) 
     
    435456        #enable Large Plone Folder global_allow 
    436457        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")) 
    438459        site.portal_types["Large Plone Folder"].global_allow = 0 
    439460        newSubFolder = getattr(newFolder, newFolderid) 
  • communesplone/urban/trunk/skins/urban/buildlicence_edit.cpt

    r2683 r2689  
    3636      i18n:domain="plone"> 
    3737 
    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)" /> 
    4443 
    4544  <metal:javascript_head fill-slot="javascript_head_slot"> 
     
    9594 
    9695          <metal:block define-slot="widgets"> 
    97             <p><br /><br /><p/> 
    9896            <metal:myfield use-macro="python:here.widget('licenceSubject', mode='edit')" /> 
    9997            <metal:myfield use-macro="python:here.widget('description', mode='edit')" /> 
  • communesplone/urban/trunk/skins/urban/buildlicence_view.cpt

    r2688 r2689  
    77             tal:define="global body_onload string: init(); 
    88                         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'); 
    1010                         dummy python:request.set(border, 1)" /> 
    1111 
     
    3030    <metal:body define-macro="body_macro" tal:define="parcels context/getParcels; 
    3131                                                     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" 
     34i18n: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 
    3338<tal:block condition="python: not parcels or not applicants"> 
    3439<dl class="portalMessage warning" tal:define="messages context/constructPortalMessage"> 
     
    4550</tal:block> 
    4651 
    47 <div metal:use-macro="here/document_actions/macros/document_actions"> 
    48      Document actions (print, sendto etc) 
    49     </div> 
    5052<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 
    5358<u><b><span i18n:translate="treating_agent">Treating agent</span> :</b></u><br> 
    5459<span tal:content="python: here.getFoldermanagers().getName1()+' '+here.getFoldermanagers().getName2()" /> 
    55 <br /><br /> 
    56  
    57 <table> 
     60 
     61<p>&nbsp;</p> 
     62 
     63<table cellspacing=0 cellpadding=0> 
    5864 <tr> 
    5965  <td> 
     
    6167    <div tal:condition="not: applicants" i18n:translate="warning_add_an_applicant">You must encode applicant(s) 
    6268    </div> 
    63     <table
     69    <table cellspacing=0 cellpadding=0 border=0
    6470     <tr> 
    6571      <td> 
     
    7480    <tal:block condition="applicants"> 
    7581     <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()" /> 
    8187     </tal:block> 
    8288    </tal:block> 
     
    9298   </div> 
    9399  </td> 
    94   <td
     100  <td colspan=2
    95101   <u><b><span i18n:translate="architect">Architect</span> :</b></u><br> 
    96102   <span tal:content="python: here.getArchitects().getPersonTitle()" /> 
     
    102108 </tr> 
    103109 <tr> 
    104   <td> 
    105    <br> 
     110  <td colspan=2> 
    106111   <u><b><span i18n:translate="commune_reference">Commune reference</span> :</b></u> <span tal:content="python: here.getReference()" /><br /> 
    107112   <u><b><span i18n:translate="dgatlp_referece">DGATLP reference</span> :</b></u> <span tal:content="python: here.getReferenceDGATLP()" /> 
     
    109114 </tr> 
    110115 <tr> 
    111   <td
     116  <td colspan=2
    112117   <br> 
    113118   <u><b><span i18n:translate="folder_category">Folder category</span> :</b></u><br> 
     
    123128 </tr> 
    124129 <tr> 
    125   <td
     130  <td colspan=2
    126131   <br> 
    127132   <u><b><span i18n:translate="work_location">Work location</span> :</b></u><br> 
     
    132137 </tr> 
    133138 <tr> 
    134   <td
     139  <td colspan=2
    135140   <br> 
    136141   <u><b><span i18n:translate="in_subdivision">In subdivision</span>?</b></u> 
     
    164169 </tr> 
    165170 <tr> 
    166   <td
     171  <td colspan=2
    167172   <br> 
    168173   <tal:block condition="python: context.getInvestigationStart()"> 
     
    182187   <input type="checkbox"> r&eacute;seau d'&eacute;gouttage s&eacute;paratif<br--> 
    183188   <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 /> 
    186191   <metal:myfield use-macro="python:here.widget('solicitOpinionsTo', mode='view')" /><br /> 
    187192   <br /> 
    188    <u>D&eacute;lai annonc&eacute;:</u><br /> 
     193   <u i18n:translate="urban_label_annoncedDelay">Deadline delay</u><br /> 
    189194   <metal:myfield use-macro="python:here.widget('annoncedDelay', mode='view')" /> 
    190195  </td> 
    191196 </tr> 
    192197 <tr> 
    193   <td
     198  <td colspan=2
    194199   <br /> 
    195200   <u>Ev&eacute;nements de ce dossier:</u>(cliquez sur le lien pour visualiser ou ajouter des documents)<br /> 
     
    205210 </tr> 
    206211 <tr> 
    207   <td
     212  <td colspan=2
    208213   <br /> 
    209214   Ajouter un &eacute;v&eacute;nement &aacute; ce dossier: 
     
    222227</table> 
    223228 
     229<div tal:replace="structure provider:plone.belowcontentbody" /> 
     230 
    224231</metal:body> 
    225232</metal:main_macro> 
  • communesplone/urban/trunk/skins/urban/PortionsOutSearch.cpt

    r2688 r2689  
    2626</a> 
    2727 
     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 
    2840<!-- On crée un forumlaire html simple avec les critÚres de recherche adéquats. --> 
    2941<fieldset><b><legend i18n:translate="">Search parcel(s)</legend></b> 
     
    4658 
    4759<!-- 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> 
    4962<thead> 
    5063<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> 
    5367</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 
    5478</table> 
     79</tal:block> 
    5580</div> 
    5681</div> 
  • communesplone/urban/trunk/skins/urban/urban.css.dtml

    r2688 r2689  
    2020} 
    2121 
    22 .state-finished { 
     22.state-closed { 
    2323color: black; 
    2424} 
    2525 
     26/* table styles */ 
     27/* we want a table with no styles at all */ 
     28.no-style-table { 
     29border: 0 !important; 
     30padding: 0 !important; 
     31margin: 0 !important; 
     32} 
     33 
     34.no-style-table td { 
     35border: 0 !important; 
     36padding-left: 0 !important; 
     37margin: 0 !important; 
     38} 
     39 
    2640/* </dtml-with> */ 
  • communesplone/urban/trunk/skins/urban/urban_macros.pt

    r2687 r2689  
    2626  </table> 
    2727</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" />