<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:py="http://genshi.edgewall.org/"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="../master.html" />
<head>
<meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
<title>${politician.full_name} - Dear Candidate</title>
<link rel="stylesheet" type="text/css" media="screen" href="${tg.url('/static/css/grids.css')}" />
</head>
<body>
<div class="details">
<h1>${politician.full_name}
<a py:if="check_is_mine_or_group(politician, 'update_politician')" class="action" href="${tg.url('/politician/update/%s'%politician.id)}">[e]</a>
<a py:if="check_is_mine_or_group(politician, 'delete_politician')" class="action" href="${tg.url('/politician/delete/%s'%politician.id)}">[delete!]</a>
<a id="report-problem" class="report toggle" href="${tg.url('/ticket/wrong_data/Politician/%s'%politician.id)}">[report an error]</a>
</h1>
<div class="element">
<div class="logo">
<img src="${tg.config('avatar.upload.politicians')}/${politician.id}-128.jpg" alt="${politician.full_name}'s photo"/>
</div>
<div class="info">
<ul>
<li>website: <a href="${politician.site}">${politician.site}</a></li>
<li>birth date: ${politician.pretty_birthdate}</li>
<li>party: <a class="party" href="${tg.url('/party/details/%s')%politician.party.id}">${politician.party.name}</a></li>
</ul>
<h2>The politician stands for those elections:</h2>
<ol class="candidancies">
<li py:for="election in elections">
<a class="election" href="${tg.url('/election/details/%s'%election.id)}">
${election.type} - ${election.place}, ${election.interval}
</a>
<a py:if="check_is_mine_or_group(politician, 'delete_politician')"
class="action"
href="${tg.url('/candidate/delete/%s'%election.candidate_id)}">[delete candidancy!]
</a>
<ol>
<li py:for="candidancy in election.candidancies">
${candidancy.position} - ${candidancy.name}
<span py:if="candidancy.elected" class="tag positive">elected</span>
<span py:if="candidancy.agrees" class="tag positive">subscribed</span>
<a py:if="'update_candidate' in tg.identity.permissions" class="action" href="${tg.url('/candidate/update/%s' % candidancy.electoral_roll_id)}">[e]</a>
<a py:if="check_is_mine_or_group(politician, 'delete_politician')"
class="action"
href="${tg.url('/candidate/delete_position/%s'%candidancy.electoral_roll_id)}">[d]
</a>
</li>
</ol>
</li>
</ol>
</div>
<div style="clear:both"> </div>
</div>
<!--<h1>Attività Recente</h1> -->
</div>
</body>
</html>