Changeset 2715

Show
Ignore:
Timestamp:
11/07/08 13:21:02 (2 months ago)
Author:
gbastien
Message:

Continue interface smoothing...

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • communesplone/urban/trunk/i18n/urban-fr.po

    r2689 r2715  
    460460msgstr "Chercher des parcelles" 
    461461 
     462msgid "Public inquiry" 
     463msgstr "Enquête publique" 
     464 
     465msgid "inquiry_article" 
     466msgstr "Article" 
     467 
     468msgid "inquiry_item" 
     469msgstr "Point" 
     470 
     471msgid "inquiry_from" 
     472msgstr "du" 
     473 
     474msgid "inquiry_to" 
     475msgstr "au" 
     476 
     477msgid "work_location" 
     478msgstr "Lieu des travaux" 
     479 
    462480msgid "Licence state" 
    463481msgstr "Etat du permis" 
     482 
     483msgid "folder_events" 
     484msgstr "Evénements du dossier" 
     485 
     486msgid "click_to_view_or_add" 
     487msgstr "Cliquez ici pour voir ou ajouter des documents" 
     488 
     489msgid "add_event" 
     490msgstr "Ajouter un événement" 
    464491 
    465492#PortionOutSearch 
     
    516543msgid "actions" 
    517544msgstr "actions" 
     545 
     546#urbanevent_view 
     547msgid "add_a_linked_event" 
     548msgstr "Ajouter un événement lié au dossier" 
     549 
     550msgid "create" 
     551msgstr "Créer un événement" 
     552 
     553msgid "event_linked_documents" 
     554msgstr "Documents liés à cet événement" 
  • communesplone/urban/trunk/profiles/default/actions.xml

    r2689 r2715  
    2727     <property name="icon_expr"></property> 
    2828     <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> 
    3030     <property name="permissions"> 
    3131       <element value="View"/> 
     
    4343     <property name="icon_expr"></property> 
    4444     <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> 
    4646     <property name="permissions"> 
    4747       <element value="Modify portal content"/> 
     
    5959     <property name="icon_expr"></property> 
    6060     <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> 
    6262     <property name="permissions"> 
    6363       <element value="Delete objects"/> 
     
    6666   </object> 
    6767 </object> 
    68   
     68 
    6969 <object name="document_actions" meta_type="CMF Action Category"> 
    7070   <property name="title"></property> 
     
    7575     <property name="icon_expr"></property> 
    7676     <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> 
    7878     <property name="permissions"> 
    7979       <element value="Review portal content"/> 
     
    9191     <property name="icon_expr"></property> 
    9292     <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> 
    9494     <property name="permissions"> 
    9595       <element value="Review portal content"/> 
     
    9898   </object> 
    9999 </object> 
    100   
    101100</object> 
  • communesplone/urban/trunk/setuphandlers.py

    r2689 r2715  
    346346    ( 'searchportionsout', 
    347347    (  ('Type', 'ATPortalTypeCriterion', 'PortionOut'), 
     348       ('Path', 'ATPathCriterion', ''), 
     349    ), None, ['Title', 'CreationDate', 'Creator'] 
     350    ), 
     351    # Folder events 
     352    ( 'searchurbanevents', 
     353    (  ('Type', 'ATPortalTypeCriterion', 'UrbanEvent'), 
    348354       ('Path', 'ATPathCriterion', ''), 
    349355    ), None, ['Title', 'CreationDate', 'Creator'] 
  • communesplone/urban/trunk/skins/urban/addPortionOutScript.py

    r2497 r2715  
    66##bind script=script 
    77##bind subpath=traverse_subpath 
    8 ##parameters=daa='',prc='' 
    98## 
     9prc = context.REQUEST.get('prc', None) 
     10daa = context.REQUEST.get('daa', None) 
     11 
     12if not prc or not daa: 
     13    return context.REQUEST.RESPONSE.redirect(context.absolute_url()) 
     14 
    1015AZ=['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'] 
    1116NUM=['0','1','2','3','4','5','6','7','8','9','0'] 
    12 prc=prc.strip() 
    1317i=0 
    1418section='' 
     
    1721exposant='' 
    1822puissance='' 
    19 while prc[i] in AZ and i<= len(prc)-1: 
     23prc=prc.strip() 
     24 
     25while prc[i] in AZ and i<=len(prc)-1: 
    2026    section=section+prc[i] 
    2127    i=i+1 
    2228    if i > len(prc)-1: 
    2329        break 
    24      
     30 
    2531while prc[i] == ' ' and i<= len(prc)-1: 
    2632    i=i+1 
     
    3339    if i > len(prc)-1: 
    3440        break 
    35      
     41 
    3642if prc[i] == '/': 
    3743    i=i+1 
     
    5258    if i > len(prc)-1: 
    5359        break 
    54      
     60 
    5561while i<= len(prc)-1: 
    5662    if prc[i] != ' ': 
  • communesplone/urban/trunk/skins/urban/buildlicence_edit.cpt

    r2689 r2715  
    9292                            class python:test(path('allow_tabbing|nothing'), 'enableUnloadProtection enableAutoFocus enableFormTabbing enableUnlockProtection', 'enableUnloadProtection enableAutoFocus enableUnlockProtection');"> 
    9393          <metal:block define-slot="extra_top" /> 
    94  
     94          <p><br /></p> 
    9595          <metal:block define-slot="widgets"> 
    9696            <metal:myfield use-macro="python:here.widget('licenceSubject', mode='edit')" /> 
  • communesplone/urban/trunk/skins/urban/buildlicence_view.cpt

    r2689 r2715  
    9999  </td> 
    100100  <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> 
    102102   <span tal:content="python: here.getArchitects().getPersonTitle()" /> 
    103103   <span tal:content="python: here.getArchitects().getName1()" /> 
     
    123123  <td> 
    124124   <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> 
    126126   <span tal:content="python: here.displayValue(context.listBuildWorkTypeTerms(), context.getWorkType())" /> 
    127127  </td> 
     
    139139  <td colspan=2> 
    140140   <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> 
    142142   <metal:myfield use-macro="python:here.widget('isInSubdivision', mode='view')" /> 
    143143   <br> 
     
    146146    </div> 
    147147    <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> 
    156157    <p> 
    157158     <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')"> 
     
    173174   <tal:block condition="python: context.getInvestigationStart()"> 
    174175    <b><u i18n:translate="">Public inquiry</u></b><br /> 
    175     <span i18n:translate="inquiry_article">Inquiry article</span> <span 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> <span 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> 
    177178   </tal:block> 
    178179   <u><b i18n:translate="">Road</b> :</u><br> 
     
    191192   <metal:myfield use-macro="python:here.widget('solicitOpinionsTo', mode='view')" /><br /> 
    192193   <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 /> 
    194195   <metal:myfield use-macro="python:here.widget('annoncedDelay', mode='view')" /> 
    195196  </td> 
     
    198199  <td colspan=2> 
    199200   <br /> 
    200    <u>Ev&eacute;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&eacute;p&ocirc;t de la demande</a><br> 
    205    06/03/2008 <a href=""> R&eacute;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> 
    209211  </td> 
    210212 </tr> 
     
    212214  <td colspan=2> 
    213215   <br /> 
    214    Ajouter un &eacute;v&eacute;nement &aacute; ce dossier: 
     216   <strong><u><span i18n:translate="add_event">Add an event</span></u></strong> 
    215217   <form action="CreateUrbanEvent" method="POST"> 
    216218    <input type='hidden' name="urban_folder_id" tal:attributes="value here/getId" value=''> 
     
    221223     </tal:loopEventType> 
    222224    </select> 
    223     <input type="submit" value="Ajouter"> 
     225    <input type="submit" i18n:domain="plone" i18n:attributes="value" value="Add"> 
    224226   </form> 
    225227  </td> 
  • communesplone/urban/trunk/skins/urban/PortionsOutSearch.cpt

    r2689 r2715  
    66      i18n:domain="urban" 
    77      metal:use-macro="here/main_template/macros/master"> 
     8 
    89 
    910<metal:block fill-slot="top_slot" 
     
    1718                 divisions python:here.portal_urban.findDivisions()"> 
    1819 
     20<h1 class="documentFirstHeading" i18n:translate="search_parcels"></h1> 
     21 
     22        <div tal:replace="structure provider:plone.belowcontenttitle" /> 
     23 
    1924<!-- Back to the build licence... --> 
    2025<a href="" 
     
    2732 
    2833<!-- Display the list of already added parcels --> 
     34<fieldset><strong><legend i18n:translate="concerned_parcels">Concerned parcels</legend></strong> 
    2935<div tal:define="tool python: getattr(context, 'portal_urban'); 
    3036                 topics python: getattr(tool, 'topics'); 
     
    3339                 dummy python: context.setPathCritValue(path_crit, context.UID()); 
    3440                 showActions python: True;"> 
    35     <metal:listing use-macro="here/urban_macros/macros/listing" /> 
     41 <metal:listing use-macro="here/urban_macros/macros/listing" /> 
    3642</div> 
    37  
    38  
     43</fieldset> 
    3944 
    4045<!-- On crée un forumlaire html simple avec les critÚres de recherche adéquats. --> 
     
    7075<tr tal:define="oddrow repeat/res/odd;" tal:attributes="class python:test(oddrow, 'even', 'odd')"> 
    7176<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(' ','')" /> 
    7380<input type="submit" class="standalone" id="parcel" value="Add this parcel" i18n:attributes="value" /> 
    7481</form> 
  • communesplone/urban/trunk/skins/urban/urbanevent_view.cpt

    r2506 r2715  
    2626    <h1 class="documentFirstHeading" tal:content="here/Title"/> 
    2727 
     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 /> 
    2838<tal:showablefields repeat="evtfield python:here.getUrbaneventtypes().getActivatedFields()"> 
    2939                <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
    3343                <metal:myfield use-macro="python:here.widget(evtfield, mode='view')" /> 
    3444                </span> 
     45</tal:showablefields> 
    3546 
    36              <BR> 
    37 </tal:showablefields> 
    38 Documents li&eacute;s &aacute; cet &eacute;v&eacute;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&eacute; &aacute; cet &eacute;v&eacute;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> 
    4458<form action="CreateUrbanDoc" method="POST"> 
    4559<input type='hidden' name="urban_event_uid" tal:attributes="value here/UID" value=''> 
     
    5064</tal:loopEventType> 
    5165</select> 
    52 <input type="submit" value="Cr&eacute;er"> 
     66<input type="submit" i18n:attributes="value" value="create"> 
    5367</form> 
    5468<br> 
     
    7589</tal:block> 
    7690 
    77  
    78 <a href="..">Retourner au dossier</a> 
    79  
    80  
    8191    <!--tal:block condition="docObj" define="dummy python:docObj.getObject().external_edit()"/--> 
    8292<tal:block condition="python: context.REQUEST.get('doc_uid') != None"> 
  • communesplone/urban/trunk/skins/urban/urban_macros.pt

    r2689 r2715  
    2828 
    2929<!-- This macro need to receive a topic --> 
     30<!--We can receive parameters here : 
     31boolean showActions specify if we show the actions column 
     32list showedCols speicy a list of indexes we want to display if these indexes have been defined in the topic/customViewFields--> 
    3033<div metal:define-macro="listing" i18n:domain="plone"> 
    3134<tal:topiccontents define="topicContents python: topic.queryCatalog(batch=True); 
    3235                           batch topicContents; 
    33                            showActions showActions|nothing"> 
     36                           showActions showActions|nothing; 
     37                           showedCols showedCols|topic/getCustomViewFields"> 
    3438 
    3539    <tal:listing condition="topicContents"> 
     
    5862                <thead> 
    5963                <tr> 
    60                     <th tal:repeat="field topic/getCustomViewFields" 
     64                    <tal:block repeat="field topic/getCustomViewFields"> 
     65                    <th tal:condition="python: field in showedCols" 
    6166                        tal:content="python:vocab.getValue(field, field)" 
    6267                        i18n:translate=""/> 
     68                    </tal:block> 
    6369                    <th tal:condition="showActions" i18n:domain="urban" i18n:translate="actions"> 
    6470                      Actions 
     
    7884                                        obj_wf_state_class python:'state-' + normalizeString(obj_wf_state); 
    7985                                        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)"> 
    8187                        <td tal:condition="python: field != 'Title'" 
    8288                            tal:content="python:topic.formatCatalogMetadata(value)" 
    8389                            i18n:translate=""/> 
    8490                        <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 
    8593                            <a href="#" tal:attributes="href url"> 
    8694                                <img src="#"