Show.html 2.72 KB
Newer Older
1
2
3
<f:layout name="Frontend"/>

<f:section name="Main">
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
    <h1>
        {election.title}
    </h1>
    <div>
        {election.description}
    </div>
    <f:if condition="!{election.ElectionFinished}">
        <f:then>
            <h2>Current Voting</h2>
            <table class="table table-hover">
                <thead>
                <tr>
                    <th>
                        <f:translate key="view.fe.election.show.nominee"/>
                    </th>
                    <th>
                        Status
                    </th>
                </tr>
                </thead>
                <tbody>
                <f:for each="{election.nominees}" as="nominee">
                    <tr>
                        <td>
                            {nominee.lastName}, {nominee.firstName} {nominee.MiddleName}
                        </td>
                        <td>
                            <f:translate key="view.fe.election.show.active"/>
                        </td>
                    </tr>
                </f:for>
                </tbody>
            </table>
        </f:then>
        <f:else>
            <h2>
                <f:translate key="view.fe.election.show.result"/>
            </h2>

            <table class="table table-hover">
                <thead>
                <tr>
                    <th>
                        <f:translate key="view.fe.election.show.nominee"/>
                    </th>
                    <th>
                        <f:translate key="view.fe.election.show.votes"/>
                    </th>
                </tr>
                </thead>
                <tbody>
                <f:for each="{results}" as="result">
                    <tr>
                        <td>
                            {result.nominee.lastName}, {result.nominee.firstName} {result.nominee.MiddleName}
                        </td>
                        <td>
                            <f:if condition="{election.ElectionFinished}">
                                <f:then>
                                    <f:if condition="{result.relativevotes}">
                                        {result.relativevotes}% ({result.votes}
                                        <f:translate key="view.fe.election.show.votes"/>
                                        )
                                    </f:if>
                                </f:then>
                                <f:else>
                                    <f:translate key="view.fe.election.show.active"/>
                                </f:else>
                            </f:if>
                        </td>
                    </tr>
                </f:for>
                </tbody>
            </table>
        </f:else>
    </f:if>
80
</f:section>