Skip to content
This repository has been archived by the owner on Jun 1, 2021. It is now read-only.

Commit

Permalink
Add a bit more fluff in template control statements
Browse files Browse the repository at this point in the history
  • Loading branch information
joelpurra committed Feb 2, 2014
1 parent 5882307 commit ffb9d72
Showing 1 changed file with 27 additions and 27 deletions.
54 changes: 27 additions & 27 deletions src/templates/index.html
Expand Up @@ -16,7 +16,7 @@
}
}}

{{##def.about:
{{## def.about:
<p>
<a href="https://github.com/joelpurra/ep-the-corrections">European Parliament: The Corrections (ep-the-corrections)</a> &copy; 2014 <a href="http://joelpurra.com/">Joel Purra</a>.
</p>
Expand All @@ -34,14 +34,14 @@
</p>
#}}

{{##def.correctors:correctional:
{{## def.correctors:correctional:
<td>
<ul>
{{? correctional }} {{~correctional :correction:correctionIndex}} {{? correction.id }}
<li><a href="http://parltrack.euwiki.org/mep/{{!correction.id}}">{{!correction.orig}}</a>
{{? correctional }} {{~ correctional : correction : correctionIndex }} {{? correction.id }}
<li><a href="http://parltrack.euwiki.org/mep/{{! correction.id }}">{{! correction.orig }}</a>
</li>
{{??}}
<li>{{!correction}}</li>
<li>{{! correction }}</li>
{{?}} {{~}} {{?}}
</ul>
</td>
Expand Down Expand Up @@ -95,27 +95,27 @@ <h1>
</h1>

<section>
{{#def.about}}
{{# def.about }}
<hr />
</section>

{{~it :voting:votingIndex}}
<article id="{{!voting.dossierid}}" class="voting">
{{~ it : voting : votingIndex }}
<article id="{{! voting.dossierid }}" class="voting">
<h2>
{{? voting.dossierid }}
<a href="#{{!voting.dossierid}}" class="voting-anchor-link"></a>
<a href="http://parltrack.euwiki.org/dossier/{{!voting.dossierid}}">{{!voting.title}}</a>
<a href="#{{! voting.dossierid }}" class="voting-anchor-link"></a>
<a href="http://parltrack.euwiki.org/dossier/{{! voting.dossierid }}">{{! voting.title }}</a>
{{??}}
<span class="voting-anchor-placeholder"></span>
{{!voting.title}} {{?}}
<time datetime="{{!voting.ts}}">{{!formatDateString(voting.ts)}}</time>
{{! voting.title }} {{?}}
<time datetime="{{! voting.ts }}">{{! formatDateString(voting.ts) }}</time>
</h2>

<table class="votes">
<caption>Votes recorded for {{? voting.dossierid }}
<a href="http://parltrack.euwiki.org/dossier/{{!voting.dossierid}}">{{!voting.title}}</a>
{{??}} {{!voting.title}} {{?}} at
<time datetime="{{!voting.ts}}">{{!formatDateString(voting.ts)}}</time>
<a href="http://parltrack.euwiki.org/dossier/{{! voting.dossierid }}">{{! voting.title }}</a>
{{??}} {{! voting.title }} {{?}} at
<time datetime="{{! voting.ts }}">{{! formatDateString(voting.ts) }}</time>
</caption>
<colgroup>
<col></col>
Expand All @@ -136,23 +136,23 @@ <h2>
<tbody>
<tr>
<th scope="row">Total count</th>
<td>{{!voting.for.total}}</td>
<td>{{!voting.abstain.total}}</td>
<td>{{!voting.against.total}}</td>
<td>{{!(voting.for.total + voting.abstain.total + voting.against.total)}}</td>
<td>{{! voting.for.total }}</td>
<td>{{! voting.abstain.total }}</td>
<td>{{! voting.against.total }}</td>
<td>{{! (voting.for.total + voting.abstain.total + voting.against.total) }}</td>
</tr>
<tr>
<th scope="row">Corrected count</th>
<td>{{!(voting.for.correctional ? voting.for.correctional.length : 0)}}</td>
<td>{{!(voting.abstain.correctional ? voting.abstain.correctional.length : 0)}}</td>
<td>{{!(voting.against.correctional ? voting.against.correctional.length : 0)}}</td>
<td>{{!((voting.for.correctional ? voting.for.correctional.length : 0) + (voting.abstain.correctional ? voting.abstain.correctional.length : 0) + (voting.against.correctional ? voting.against.correctional.length : 0))}}</td>
<td>{{! (voting.for.correctional ? voting.for.correctional.length : 0) }}</td>
<td>{{! (voting.abstain.correctional ? voting.abstain.correctional.length : 0) }}</td>
<td>{{! (voting.against.correctional ? voting.against.correctional.length : 0) }}</td>
<td>{{! ((voting.for.correctional ? voting.for.correctional.length : 0) + (voting.abstain.correctional ? voting.abstain.correctional.length : 0) + (voting.against.correctional ? voting.against.correctional.length : 0)) }}</td>
</tr>
<tr>
<th scope="row">Correctors</th>
{{#def.correctors:voting.for.correctional}}
{{#def.correctors:voting.abstain.correctional}}
{{#def.correctors:voting.against.correctional}}
{{# def.correctors:voting.for.correctional }}
{{# def.correctors:voting.abstain.correctional }}
{{# def.correctors:voting.against.correctional }}
<td></td>
</tr>
</tbody>
Expand All @@ -161,7 +161,7 @@ <h2>
{{~}}
<footer>
<hr />
{{#def.about}}
{{# def.about }}
</footer>
</body>

Expand Down

0 comments on commit ffb9d72

Please sign in to comment.