source: extensions/mypolls/templates/mypolls_public_results.tpl @ 24331

Last change on this file since 24331 was 3397, checked in by grum, 15 years ago

Add plugin MyPolls - this release is not published in PEM (functionnal but not tested yet...)

File size: 2.7 KB
Line 
1
2{if isset($datas.AJAX_URL_POLL_COMMENT_LIST) and $datas.AJAX_URL_POLL_COMMENT_LIST!=""}
3{literal}
4  <script type="text/javascript">
5    function load_poll_comment_list(page)
6    {
7      var doc = document.getElementById("icomment_list");
8
9      {/literal}
10      http_request=create_httpobject('get', '', '{$datas.AJAX_URL_POLL_COMMENT_LIST}'+page, false);
11      {literal}
12      http_request.send(null);
13      doc.innerHTML = http_request.responseText;
14    }
15  </script>
16{/literal}
17{/if}
18
19
20
21<div class="mypolls_page">
22
23{if isset($datas.GENERIC_TEXT) and $datas.GENERIC_TEXT!=""}
24  <p>{$datas.GENERIC_TEXT}</p>
25  <hr/>
26{/if}
27
28<p>{$datas.DESCRIPTION}</p>
29
30{if isset($datas.AFTER_VOTE_TEXT) and $datas.AFTER_VOTE_TEXT!=""}
31  <hr/>
32  <p>{$datas.AFTER_VOTE_TEXT}</p>
33{/if}
34
35
36{if isset($datas.NOT_PUBLIC_RESULT_TEXT) and $datas.NOT_PUBLIC_RESULT_TEXT!=""}
37  <br>
38  <fieldset class="mypolls_page">
39  <div>{$datas.NOT_PUBLIC_RESULT_TEXT}</div>
40  </fieldset>
41{/if}
42
43
44{if isset($questions) and count($questions)}
45  {foreach from=$questions key=name item=question}
46    <fieldset class="formtable">
47      <legend>{'mypolls_cm_question'|@translate} #{$question.NUMQUESTION}</legend>
48        <p>{$question.DESCRIPTION}&nbsp;</p>
49        <ul class="compact">
50          <li>{'mypolls_att_question_type'|@translate}&nbsp;:&nbsp;{$question.QUESTION_TYPE}</li>
51        </ul>
52        <table class="table2 littlefont" width='100%'>
53          <tr class="throw">
54            <th colspan=2>{'mypolls_cm_answer'|@translate}</th>
55            {if $question.NBVOTES != ""}
56                <th width='10%'>{$question.NBVOTES}</th>
57            {/if}
58            <th colspan=2 width='{$question.MAXGRAPH}px'>{'mypolls_result_pct'|@translate}</th>
59          </tr>
60          {if isset($question.answers) and count($question.answers)}
61            {foreach from=$question.answers key=name3 item=answer}
62              <tr class="TableRow">
63                <td width='20px'>{$answer.NUMANSWER}</td>
64                <td>{$answer.ANSWER}</td>
65                {if $answer.NBANSWERS != ""}
66                    <td>{$answer.NBANSWERS}</td>
67                {/if}
68                <td>{$answer.PCT}</td>
69                <td>
70                  <div class='graphbarx' style='width:{$answer.MAXGRAPH}px'/>
71                  <div class='graphbar1' style='width:{$answer.GRAPH}px'/>
72                </td>
73              </tr>
74            {/foreach}
75          {/if}
76        </table>
77    </fieldset>
78  {/foreach}
79{/if}
80
81
82{if isset($datas.AJAX_URL_POLL_COMMENT_LIST) and $datas.AJAX_URL_POLL_COMMENT_LIST!=""}
83  <fieldset class="formtable">
84    <legend>{"mypolls_comment_list"|@translate}</legend>
85    <div id="icomment_list">
86    </div>
87  </fieldset>
88
89  <script type="text/javascript">
90    load_poll_comment_list(1);
91  </script>
92{/if}
93
94
95</div>
96
Note: See TracBrowser for help on using the repository browser.