summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Péters <fpeters@entrouvert.com>2014-06-26 11:23:33 (GMT)
committerFrédéric Péters <fpeters@0d.be>2014-06-26 11:29:59 (GMT)
commit86d93b6ef3630149e0ef04b7ab03cdc38b1e9f2c (patch)
tree1252394ad7dccf28b491f0d189a524e90f8e0338
parent213cea0c0bf127bfd3fc2b73d6e805c8604e6b5a (diff)
downloadtabellio.webviews-master.zip
tabellio.webviews-master.tar.gz
tabellio.webviews-master.tar.bz2
various minor changes to adapt to arrival of PTB*PVDA-GO!HEADmaster
-rw-r--r--tabellio/webviews/deputy.pt4
-rw-r--r--tabellio/webviews/deputy.py3
-rw-r--r--tabellio/webviews/deputy_listform.pt6
3 files changed, 9 insertions, 4 deletions
diff --git a/tabellio/webviews/deputy.pt b/tabellio/webviews/deputy.pt
index 701ac40..e0d70d9 100644
--- a/tabellio/webviews/deputy.pt
+++ b/tabellio/webviews/deputy.pt
@@ -31,7 +31,8 @@
<span id="birthline" tal:content="view/birthline"/><br/>
<span tal:condition="context/bio" id="bio" tal:content="context/bio"/>
<br tal:condition="not: context/active"/>
- <span tal:condition="not: context/active">Ce député ne siège plus au parlement.</span>
+ <span id="siege-plus" tal:condition="not: context/active">Ce député ne siège plus au parlement.</span>
+ <tal:block tal:condition="context/active">
<br tal:condition="context/seat_number"/>
<span tal:condition="context/seat_number" id="deputy-seats">
<span tal:content="context/title">Foo bar </span> est
@@ -39,6 +40,7 @@
<span tal:omit-tag="" tal:condition="python: context.sex == 'M'">député francophone bruxellois. Il</span>
siège au banc numéro <span tal:replace="context/seat_number">23</span>.
</span>
+ </tal:block>
</p>
</div>
<div class="greybloc">
diff --git a/tabellio/webviews/deputy.py b/tabellio/webviews/deputy.py
index 3dc21f7..06259c3 100644
--- a/tabellio/webviews/deputy.py
+++ b/tabellio/webviews/deputy.py
@@ -252,6 +252,9 @@ class FolderView(BrowserView):
except (IndexError, TypeError):
return None
+ def renderPolgroupTitle(self, item):
+ return item.Title().replace('-', ' -')
+
class IDeputiesAndOthersFolderView(Interface):
pass
diff --git a/tabellio/webviews/deputy_listform.pt b/tabellio/webviews/deputy_listform.pt
index 7a35e16..26c8eb7 100644
--- a/tabellio/webviews/deputy_listform.pt
+++ b/tabellio/webviews/deputy_listform.pt
@@ -54,8 +54,8 @@
<a href="#" class="tous" tal:condition="python: view.getSelectedPolgroup()">Tous</a>
<a href="#" class="tous active" tal:condition="python: not view.getSelectedPolgroup()">Tous</a>
<tal:block tal:repeat="item view/getPolGroups">
- <a class="ps" href="#" tal:condition="python: view.getSelectedPolgroup() != item.id" tal:attributes="class item/id" tal:content="item/Title">PS</a>
- <a class="ps" href="#" tal:condition="python: view.getSelectedPolgroup() == item.id" tal:attributes="class string:${item/id} active" tal:content="item/Title">PS</a>
+ <a class="ps" href="#" tal:condition="python: view.getSelectedPolgroup() != item.id" tal:attributes="class item/id" tal:content="python: view.renderPolgroupTitle(item)">PS</a>
+ <a class="ps" href="#" tal:condition="python: view.getSelectedPolgroup() == item.id" tal:attributes="class string:${item/id} active" tal:content="python: view.renderPolgroupTitle(item)">PS</a>
</tal:block>
</div>
</div>
@@ -68,7 +68,7 @@
<table id="deputy-table" class="listing">
<thead>
<th class="name">Nom / Prénom</th>
- <th class="polgroup">Groupe</th>
+ <th class="polgroup">Groupe / Liste</th>
<th class="arrond">Arrondissement</th>
<th class="birth">Naissance</th>
</thead>