Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update parcels info view URB-2498 #240

Open
wants to merge 1 commit into
base: urban2.7.x
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions news/URB-2498.internal
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Update parcels info view
[fngaha]
107 changes: 50 additions & 57 deletions src/Products/urban/browser/templates/parcelsinfo.pt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,12 @@
<div i18n:domain="urban"
tal:define="parcel python: view.get_parcel(capakey);
normalizeString nocall:context/@@plone/normalizeString;
wtool context/portal_workflow">
wtool context/portal_workflow;
displays python: view.get_related_licences_displays(capakey);
licences python: displays[0];
parcel_historic python: displays[1];
line_result parcel_historic;
">
<dl class="collapsible expandedOnLoad" tal:condition="parcel">
<dt class="collapsibleHeader" tal:content="python:parcel.display()">name</dt>
<dd class="collapsibleContent">
Expand All @@ -20,7 +25,7 @@
</td>
</tr>
<tr>
<td><b><u i18n:translate="urban_label_owner">owner:</u></b> </td>
<td><b><u i18n:translate="urban_label_owner">owners:</u></b> </td>
</tr>
<tr tal:repeat="owner python: parcel.owners.values()">
<td>
Expand All @@ -32,68 +37,56 @@
</td>
</tr>
<tr>
<td><b><u i18n:translate="urban_label_type">type:</u></b> </td>
<td><b><u i18n:translate="urban_label_type">types:</u></b> </td>
</tr>
<tr tal:repeat="nature python: parcel.natures">
<td>
<span tal:content="nature"/><br>
</td>
</tr>
<tr>
<td><b><u i18n:translate="">History of the parcel and related licences</u></b></td>
</tr>
<table class="listing" class="listing" border="0" cellspacing="0">
<tal:lines repeat="line_result parcel_historic">
<tr tal:define="oddrow repeat/line_result/odd;"
tal:attributes="class python: oddrow and 'even' or 'odd'">
<tal:line repeat="parcel line_result">
<td fcolor="#FF0000"
tal:define="old python: getattr(parcel, 'old', None);
root python: getattr(parcel, 'level', None) == 0;
licences python: getattr(parcel, 'licences', []);
center python: False;
is_parcel python: hasattr(parcel, 'division')"
tal:attributes="style python: root and 'background-color:yellow' or '';
class python: center and 'center-parcel' or 'left-parcel';
colspan python: parcel.width">
<div class="parcel-name">
<span tal:attributes="class python: not old and 'leaf-parcel' or ''"
tal:content="parcel/display">
</span>
<span tal:condition="licences">:</span>
</div>
<tal:licences condition="licences">
<div tal:repeat="licence licences">
<a class="link-overlay"
tal:attributes="href python: licence['url']; class python: licence['class']"
tal:content="python: licence['title']" i18n:translate="">
lien vers les anciens permis
</a>
<p class="discreet">
<span tal:content="structure python: licence['description']">
Result description
</span>
</p>
</div>
</tal:licences>
</td>
</tal:line>
</tr>
</tal:lines>
</table>
</table>

<tal:display define="displays python: view.get_related_licences_displays(capakey);
licences python: displays[0];
parcel_historic python: displays[1];">
<tal:no_result condition="python: not licences">
<h2 i18n:translate="">No related licences</h2>
</tal:no_result>
<tal:result condition="licences">
<h2 i18n:translate="">Related licences</h2>
<br />
<div tal:repeat="licence_info licences">
<a class="link-overlay"
tal:attributes="href python: licence_info['url']; class python: licence_info['class']"
tal:content="python: licence_info['title']" i18n:translate="">lien vers les anciens permis</a>
</div>
</tal:result>

<span tal:condition="parcel_historic">
<h2 i18n:translate="">History of the parcel and related licences</h2>
<table class="listing" class="listing" border="0" cellspacing="0">
<tal:lines repeat="line_result parcel_historic">
<tr tal:define="oddrow repeat/line_result/odd;"
tal:attributes="class python: oddrow and 'even' or 'odd'">
<tal:line repeat="parcel line_result">
<td fcolor="#FF0000"
tal:define="old python: getattr(parcel, 'old', None);
root python: getattr(parcel, 'level', None) == 0;
licences python: getattr(parcel, 'licences', []);
center python: False;
is_parcel python: hasattr(parcel, 'division')"
tal:attributes="style python: root and 'background-color:yellow' or '';
class python: center and 'center-parcel' or 'left-parcel';
colspan python: parcel.width">
<div class="parcel-name">
<span tal:attributes="class python: not old and 'leaf-parcel' or ''"
tal:content="parcel/display"></span>
<span tal:condition="licences">:</span>
</div>
<tal:licences condition="licences">
<div tal:repeat="licence licences" style="text-align: left; padding-left: 1.6em">
<a class="link-overlay"
tal:attributes="href python: licence['url']; class python: licence['class']"
tal:content="python: licence['title']" i18n:translate="">lien vers les anciens permis</a>
<p class="discreet"><span tal:content="structure python: licence['description']">Result description</span></p>
</div>
</tal:licences>
</td>
</tal:line>
</tr>
</tal:lines>
</table>
<br />
</span>
</tal:display>
</dd>
</dl>
</div>
Expand Down
8 changes: 3 additions & 5 deletions src/Products/urban/locales/fr/LC_MESSAGES/urban.po
Original file line number Diff line number Diff line change
Expand Up @@ -2652,7 +2652,7 @@ msgstr "Conditions intégrales et sectorielles supplémentaires"
#. Default: "address:"
#: ../browser/templates/parcelsinfo.pt:14
msgid "urban_label_address"
msgstr "Adresse"
msgstr "Adresses"

#. Default: "Adr1"
#: RecipientCadastre.py
Expand Down Expand Up @@ -4055,9 +4055,8 @@ msgstr "Hors délai"
# parcelsinfo.pt
#. Default: "owner:"
#: ../browser/templates/parcelsinfo.pt:23
#, fuzzy
msgid "urban_label_owner"
msgstr "Propriétaire"
msgstr "Propriétaires"

#. Default: "Parcellings"
#: ../content/licence/GenericLicence.py:1180
Expand Down Expand Up @@ -4958,9 +4957,8 @@ msgstr "N° TVA"

#. Default: "type:"
#: ../browser/templates/parcelsinfo.pt:35
#, fuzzy
msgid "urban_label_type"
msgstr "Type"
msgstr "Types"

#. Default: "Typeandstreetname_number_box"
#: ../OpinionRequestEventType.py:79
Expand Down