Skip to content

Commit

Permalink
Merge pull request ECLK#859 from sm1990/ECLKgh-858
Browse files Browse the repository at this point in the history
Gh 858:PCE_PC_SA_2, PCE_PC_SA_2-letter and PCE-42 template updates
  • Loading branch information
umayangag authored Feb 13, 2021
2 parents fa34edc + 9de9ac5 commit 0ffd763
Show file tree
Hide file tree
Showing 4 changed files with 103 additions and 124 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,6 @@ def html(self, title="", total_registered_voters=None):
for party_wise_result in party_wise_results.itertuples():
data_row = [
party_wise_result.partyName,
party_wise_result.partyAbbreviation,
to_comma_seperated_num(party_wise_result.validVoteCount)
]

Expand All @@ -156,7 +155,6 @@ def html(self, title="", total_registered_voters=None):
else:
data_row.append('')

data_row.append(to_comma_seperated_num(party_wise_result.seatsAllocated))
data_row.append(to_comma_seperated_num(party_wise_result.bonusSeatsAllocated))
data_row.append(to_comma_seperated_num(party_wise_result.totalSeatsAllocated))

Expand Down Expand Up @@ -221,7 +219,6 @@ def html_letter(self, title="", total_registered_voters=None, signatures=[]):
for party_wise_result in party_wise_results.itertuples():
data_row = [
party_wise_result.partyName,
party_wise_result.partyAbbreviation,
to_comma_seperated_num(party_wise_result.validVoteCount)
]

Expand All @@ -230,7 +227,6 @@ def html_letter(self, title="", total_registered_voters=None, signatures=[]):
else:
data_row.append('')

data_row.append(to_comma_seperated_num(party_wise_result.seatsAllocated))
data_row.append(to_comma_seperated_num(party_wise_result.bonusSeatsAllocated))
data_row.append(to_comma_seperated_num(party_wise_result.totalSeatsAllocated))

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<tr>
<td class="no-padding-left no-padding-right" style="vertical-align:middle; text-align:justify;" colspan="2">
I hereby certify that the following Members, nominated by the recognized Poloitical Party or
Independent group shown against the name of each such Member, were elected for <span style="border-bottom: 1px dotted #000;">{{content.administrativeDistrictNo}}</span> Provincial Council
Independent group shown against the name of each such Member, were elected for <span style="border-bottom: 1px dotted #000;">{{content.province}}</span> Provincial Council
from the Administrative District of <span style="border-bottom: 1px dotted #000;">{{content.administrativeDistrict}}</span>
the election held on ..........................
</td>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,38 +56,22 @@
<table class="table table-sm" style="width:100%;">
<tbody>
<tr>
<th scope="col">#</th>
<th scope="col" style="width:40%;">Name of the Party</th>
<th scope="col">Party Abbreviation</th>
<th scope="col" style="text-align:right;">Votes Received</th>
<th scope="col" style="text-align:right;">Percentage</th>
<th scope="col" style="text-align:right;">Seats</th>
<th scope="col" style="text-align:right;">Bonus Seats</th>
<th scope="col" style="text-align:right;">Total Seats</th>
<th scope="col" style="width:40%;padding-left: 40px;">Name of the Party/Independent Group</th>
<th scope="col" style="text-align:center;">No. of Votes Received</th>
<th scope="col" style="text-align:center;">Percentage %</th>
<th scope="col" style="text-align:center;">No. of Members Elected</th>
</tr>
{% for row in content.data %}
<tr>
<td>{{ loop.index }}</td>
<td class="{% if row[0]=='' %}missing-value{% endif %}">{{ row[0] }}</td>
<td class="{% if row[1]=='' %}missing-value{% endif %}">{{ row[1] }}</td>
<td class="{% if row[2]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[2] }}</td>
<td class="{% if row[3]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[3] }}</td>
<td class="{% if row[4]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[4] }}</td>
<td class="{% if row[5]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[5] }}</td>
<td class="{% if row[6]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[6] }}</td>
style="text-align:right;">{{ row[4] }}{% if row[3]==2 %}*{% endif %}</td>
</tr>
{% endfor %}
<tr>
<td colspan="8" style="height: 50px;"></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Total Valid Votes</b></td>
<td class="{% if content.validVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;">
Expand All @@ -97,11 +81,9 @@
style="text-align:right;">
{{ content.validVoteCounts[1] }}
</td>
<td colspan="3"></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Rejected Votes</b></td>
<td class="{% if content.rejectedVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;">
Expand All @@ -111,12 +93,10 @@
style="text-align:right;">
{{ content.rejectedVoteCounts[1] }}
</td>
<td colspan="3"></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Total Polled</b></td>
<td><b>Total Votes Polled</b></td>
<td class="{% if content.totalVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;">
<b>{{ content.totalVoteCounts[0] }}</b>
Expand All @@ -125,30 +105,21 @@
style="text-align:right;">
{{ content.totalVoteCounts[1] }}
</td>
<td colspan="3"></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Registered No. of Electors</b></td>
<td><b>Registered Electors</b></td>
<td style="text-align:right"><b>{{ content.registeredVoters[0] }}</b></td>
<td style="text-align:right"></td>
<td colspan="3"></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Time</b></td>
<td colspan="2" style="text-align:center;">{{ content.time }}</td>
<td colspan="3"></td>
</tr>
<tr>
<td>* Including two(2) bonus seats.</td>
<td></td>
<td></td>
<td></td>
<td><b>Date</b></td>
<td colspan="2" style="text-align:center;">{{ content.date }}</td>
<td colspan="3"></td>
</tr>

</tbody>
</table>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
}
}

* {
/* * {
font-family: "Lucida Console", Courier, monospace;
}

Expand All @@ -23,136 +23,148 @@

.table th {
font-weight: 800;
}
} */

</style>

<div style="padding-left: 50px;padding-right: 50px;">
<table style="border: none;width: 100%;">
<div class="font1" style="padding-left: 50px;padding-right: 50px;">
<table class="table table-borderless">
<tbody>
<tr>
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top">
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
style="display: inline-block"/><br/>
<span style="font-size:12px; font-weight:bold;">OFFICIAL RESULTS</span>
</td>
<td style="text-align:center; vertical-align:middle; width:70%;">
<span style="font-size: 11px;font-weight: 600;">ELECTION COMMISSION OF SRI LANKA</span><br/>
<span style="font-weight: 700;font-weight: 600;font-size: 23px;">
{{ content.election.electionName }}
</span><br/>
<span style="font-weight:bold;font-size: 17px;">Votes, Seats & Bonus Seats by Party</span><br/>
<span style="font-size:14px;font-weight: 500;">
<strong>{{ content.election.provinceName }} Province</strong>
</span>
</td>
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
</tr>
<tr>
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top" colspan="3">
<img src="data:image/png;base64, {{ content.logo }}" width="65px"
style="display: inline-block"/>
</td>
</tr>
<tr>
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top"></td>
<td style="text-align:center; vertical-align:middle; width:70%;">
<span style="font-size: 23px;font-weight: 600;">Department of Elections</span><br/>
<span style="font-weight: 700;font-weight: 600;font-size: 18px;">{{ content.election.electionName }}</span>
</td>
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
</tr>
<tr>
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top"></td>
<td style="text-align:center; vertical-align:middle; width:70%;">
<span style="font-size:18px;font-weight: 500;"><strong>Final Results</strong></span>
</td>
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
</tr>
<tr>
<td style="width:15%; text-align:center;" class="no-padding-bottom no-padding-top"></td>
<td style="text-align:center; vertical-align:middle; width:70%;">
<span style="font-size:18px;font-weight: 500;"><strong>{{ content.election.provinceName }} Province Provincial Council</strong></span>
</td>
<td style="text-align:right; width:15%; font-size:12px; font-weight:bold;"></td>
</tr>

</tbody>
</table>


<div style="width: 100%; padding-bottom: 50px;"></div>

<table class="table table-sm" style="width:100%;">
<table class="table table-borderless" style="width:100%;">
<tbody>
<tr>
<th scope="col">#</th>
<th scope="col" style="width:40%;">Name of the Party</th>
<th scope="col">Party Abbreviation</th>
<th scope="col" style="text-align:right;">Votes Received</th>
<th scope="col" style="text-align:right;">Percentage</th>
<th scope="col" style="text-align:right;">Seats</th>
<th scope="col" style="text-align:right;">Bonus Seats</th>
<th scope="col" style="text-align:right;">Total Seats</th>
<th class="all" scope="col" style="width:40%;padding-left: 40px;">Name of the Party/Independent Group</th>
<th class="all" scope="col" style="text-align:center;">No. of Votes Received</th>
<th class="all" scope="col" style="text-align:center;">Percentage</th>
<th class="all" scope="col" style="text-align:center;">No. of Members Elected</th>
</tr>
{% for row in content.data %}
<tr>
<td>{{ loop.index }}</td>
<td class="{% if row[0]=='' %}missing-value{% endif %}">{{ row[0] }}</td>
<td class="{% if row[1]=='' %}missing-value{% endif %}">{{ row[1] }}</td>
<td class="{% if row[2]=='' %}missing-value{% endif %}"
<td class="left no-padding-top no-padding-bottom {% if row[0]=='' %}missing-value{% endif %}">{{ row[0] }}</td>
<td class="left right no-padding-top no-padding-bottom {% if row[2]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[1] }}</td>
<td class="left right no-padding-top no-padding-bottom {% if row[3]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[2] }}</td>
<td class="{% if row[3]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[3] }}</td>
<td class="{% if row[4]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[4] }}</td>
<td class="{% if row[5]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[5] }}</td>
<td class="{% if row[6]=='' %}missing-value{% endif %}"
style="text-align:right;">{{ row[6] }}</td>
<td class="right no-padding-top no-padding-bottom {% if row[6]=='' %}missing-value{% endif %}"
style="text-align:center;">{{ row[4] }}
{% if row[3]==2 %}*{% endif %}
</td>
</tr>
{% endfor %}
<tr>
<td colspan="8" style="height: 50px;"></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Total Valid Votes</b></td>
<td class="{% if content.validVoteCounts[0]=='' %}missing-value{% endif %}"
<td class="top left no-padding-top no-padding-bottom " style="text-align:right;">Total Valid Votes</td>
<td class="top left right no-padding-top no-padding-bottom {% if content.validVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;">
<b>{{ content.validVoteCounts[0] }}</b>
</td>
<td class="{% if content.validVoteCounts[1]=='' %}missing-value{% endif %}"
<td class="right no-padding-top no-padding-bottom {% if content.validVoteCounts[1]=='' %}missing-value{% endif %}"
style="text-align:right;">
{{ content.validVoteCounts[1] }}
</td>
<td colspan="3"></td>
<td class="right no-padding-top no-padding-bottom "></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Rejected Votes</b></td>
<td class="{% if content.rejectedVoteCounts[0]=='' %}missing-value{% endif %}"
<td class="left no-padding-top no-padding-bottom " style="text-align:right;">Rejected Votes</td>
<td class="top left right no-padding-top no-padding-bottom {% if content.rejectedVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;">
<b>{{ content.rejectedVoteCounts[0] }}</b>
</td>
<td class="{% if content.rejectedVoteCounts[1]=='' %}missing-value{% endif %}"
<td class="right no-padding-top no-padding-bottom {% if content.rejectedVoteCounts[1]=='' %}missing-value{% endif %}"
style="text-align:right;">
{{ content.rejectedVoteCounts[1] }}
</td>
<td colspan="3"></td>
<td class="right no-padding-top no-padding-bottom "></td>
</tr>
<tr>
<td></td>
<td></td>
<td><b>Total Polled</b></td>
<td class="{% if content.totalVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;">
<td class="left no-padding-top no-padding-bottom " style="text-align:right;">Total Votes Polled</td>
<td class="top left right no-padding-top no-padding-bottom {% if content.totalVoteCounts[0]=='' %}missing-value{% endif %}"
style="text-align:right;border-bottom: double;">
<b>{{ content.totalVoteCounts[0] }}</b>
</td>
<td class="{% if content.totalVoteCounts[1]=='' %}missing-value{% endif %}"
<td class="right no-padding-top no-padding-bottom {% if content.totalVoteCounts[1]=='' %}missing-value{% endif %}"
style="text-align:right;">
{{ content.totalVoteCounts[1] }}
</td>
<td colspan="3"></td>
<td class="right no-padding-top no-padding-bottom "></td>
</tr>
<tr>
<td class="left bottom no-padding-top no-padding-bottom " style="text-align:right;">Registered Electors</td>
<td class="left right bottom no-padding-top no-padding-bottom " style="text-align:right"><b>{{ content.registeredVoters[0] }}</b></td>
<td class="right bottom no-padding-top no-padding-bottom " style="text-align:right"></td>
<td class="right bottom no-padding-top no-padding-bottom "></td>
</tr>


<tr>
<td class="left">* Including two(2) bonus seats.</td>
<td></td>
<td></td>
<td><b>Registered No. of Electors</b></td>
<td style="text-align:right"><b>{{ content.registeredVoters[0] }}</b></td>
<td style="text-align:right"></td>
<td colspan="3"></td>
<td class="right"></td>
</tr>
<tr>
<td class="left"></td>
<td></td>
<td></td>
<td><b>Time</b></td>
<td colspan="2" style="text-align:center;">{{ content.time }}</td>
<td colspan="3"></td>
<td class="right"></td>
</tr>
<tr>
<td class="left"></td>
<td></td>
<td></td>
<td><b>Date</b></td>
<td colspan="2" style="text-align:center;">{{ content.date }}</td>
<td colspan="3"></td>
<td class="right"></td>
</tr>
<tr>
<td class="left"></td>
<td></td>
<td></td>
<td class="right"></td>
</tr>
<tr>
<td class="left bottom"></td>
<td class="bottom"></td>
<td class="right bottom" style="text-align: center;" colspan="2">
<span>Mahinda Deshapriya</br>
Commissioner of Elections</span>
</td>
</tr>

</tbody>
</table>
</div>

{% include 'ParliamentaryElection2020/calculation-information.html' with context %}

{% endblock %}

0 comments on commit 0ffd763

Please sign in to comment.