source: extensions/mypolls/admin/plugin_admin_view.tpl @ 22443

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

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

  • Property svn:executable set to *
File size: 6.0 KB
Line 
1<!-- manage poll's view -->
2{literal}
3<script type="text/javascript">
4
5  function change_lang()
6  {
7    var objstid = document.getElementById('islang');
8    var objtid = document.getElementById('ilang');
9    var objsub = document.getElementById('isubmit');
10
11    objtid.value=objstid.value;
12    objsub.click();
13  }
14
15  function load_poll_voter_list(page)
16  {
17    var doc = document.getElementById("ivoter_list");
18
19    http_request=create_httpobject('get', '', '{/literal}{$datas.MYPOLLS_AJAX_URL_POLL_VOTER_LIST}{literal}'+page, false);
20    http_request.send(null);
21    doc.innerHTML = http_request.responseText;
22  }
23
24  function load_poll_comment_list(page)
25  {
26    var doc = document.getElementById("icomment_list");
27
28    http_request=create_httpobject('get', '', '{/literal}{$datas.MYPOLLS_AJAX_URL_POLL_COMMENT_LIST}{literal}'+page, false);
29    http_request.send(null);
30    doc.innerHTML = http_request.responseText;
31  }
32
33  function poll_delete_comment(id, page)
34  {
35    var doc = document.getElementById("icomment_list");
36    http_request=create_httpobject('get', '', '{/literal}{$datas.MYPOLLS_AJAX_URL_POLL_DELETE_COMMENT}{literal}'+id+"&vpage="+page, false);
37    http_request.send(null);
38    doc.innerHTML = http_request.responseText;
39  }
40</script>
41{/literal}
42
43<div>
44  <div style="text-align:right;margin:0px;margin-right:8px;float:right;">
45    <a href="{$datas.MYPOLLS_LNK_MODIFY}" title="{'mypolls_list_lnk_modify_parent'|@translate}">
46    <img src="{$themeconf.admin_icon_dir}/category_edit.png" class="button" alt="{'mypolls_list_lnk_modify_parent'|@translate}"/></a>
47  </div>
48  &nbsp;
49</div>
50
51
52<!-- lang -->
53<form method="post" action="" class="general">
54  <input type="hidden" name="fmypolls_att_id" value="{$datas.MYPOLLS_ATT_ID}">
55  <input type="hidden" name="action" value="view">
56  <fieldset>
57    <legend>{'mypolls_options_view'|@translate}</legend>
58      <table class="formtable">
59        <tr><td><label>{'mypolls_lang'|@translate}
60          <input type="hidden" name="mypolls_lang" id="ilang" value="">
61          <input type="submit" name="fmypolls_view" id="isubmit" style="visibility:hidden;" >
62          <select onchange="change_lang();" id="islang">
63            {html_options values=$mypolls_langs_list_values output=$mypolls_langs_list_labels selected=$mypolls_langs_selected}
64          </select></label>
65        </td></tr>
66      </table>
67  </fieldset>
68</form>
69
70<!-- general nfo -->
71<fieldset class="formtable">
72  <legend>{'mypolls_cm_nfo'|@translate}</legend>
73    <p>{$datas.MYPOLLS_ATT_TITLE}&nbsp;</p>
74    <hr/>
75    <ul class="compact">
76      <li>{'mypolls_att_creation_date'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_DATE}</li>
77      <li>{'mypolls_poll_enabled'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_ENABLED}</li>
78      <li>{'mypolls_poll_visible'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_VISIBLE}</li>
79      <li>{'mypolls_att_allow_comment'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_ALLOW_COMMENT}</li>
80      <li>{'mypolls_att_show_user_comment'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_SHOW_COMMENTS}</li>
81      <li>{'mypolls_att_allowed_users_default'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_ALLOWED_USERS}</li>
82      <li>{'mypolls_att_allowed_groups_default'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_ALLOWED_GROUPS}</li>
83    </ul>
84    <hr/>
85    <ul>
86      <li>{'mypolls_att_description'|@translate}
87        <p>{$datas.MYPOLLS_ATT_DESCRIPTION}&nbsp;</p>
88      </li>
89      <li>{'mypolls_att_after_vote_text'|@translate}
90        <p>{$datas.MYPOLLS_ATT_AFTER_VOTE_TEXT}&nbsp;</p>
91      </li>
92    </ul>
93    <hr/>
94    <ul class="compact">
95      <li>{'mypolls_att_display_type'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_DISPLAY_TYPE}</li>
96      <li>{'mypolls_att_nb_questions'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_NB_QUESTIONS}</li>
97      <li>{'mypolls_att_total_votes'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_TOTAL_VOTES}</li>
98      <li>{'mypolls_att_last_vote'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_LAST_VOTE}</li>
99      <li>{'mypolls_att_visit_without_vote'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_VISIT_WITHOUT_VOTE}</li>
100      <li>{'mypolls_att_visit_after_vote'|@translate}&nbsp;:&nbsp;{$datas.MYPOLLS_ATT_VISIT_AFTER_VOTE}</li>
101    </ul>
102</fieldset>
103
104{if isset($questions) and count($questions)}
105  {foreach from=$questions key=name item=question}
106    <fieldset class="formtable">
107      <legend>{'mypolls_cm_question'|@translate} #{$question.NUMQUESTION}</legend>
108        <p>{$question.DESCRIPTION}&nbsp;</p>
109        <ul class="compact">
110          <li>{'mypolls_att_question_type'|@translate}&nbsp;:&nbsp;{$question.QUESTION_TYPE}</li>
111        </ul>
112        <table class="table2 littlefont" width='100%'>
113          <tr class="throw">
114            <th colspan=2>{'mypolls_cm_answer'|@translate}</th>
115            {if $question.NBVOTES != ""}
116                <th width='10%'>{$question.NBVOTES}</th>
117            {/if}
118            <th colspan=2 width='{$question.MAXGRAPH}px'>{'mypolls_result_pct'|@translate}</th>
119          </tr>
120          {if isset($question.answers) and count($question.answers)}
121            {foreach from=$question.answers key=name3 item=answer}
122              <tr class="TableRow">
123                <td width='20px'>{$answer.NUMANSWER}</td>
124                <td>{$answer.ANSWER}</td>
125                {if $answer.NBANSWERS != ""}
126                    <td>{$answer.NBANSWERS}</td>
127                {/if}
128                <td>{$answer.PCT}</td>
129                <td>
130                  <div class='graphbarx' style='width:{$answer.MAXGRAPH}px'/>
131                  <div class='graphbar1' style='width:{$answer.GRAPH}px'/>
132                </td>
133              </tr>
134            {/foreach}
135          {/if}
136        </table>
137    </fieldset>
138  {/foreach}
139{/if}
140
141<fieldset class="formtable">
142  <legend>{'mypolls_voter_list'|@translate}</legend>
143  <div id="ivoter_list">
144  </div>
145</fieldset>
146
147<fieldset class="formtable">
148  <legend>{'mypolls_comment_list'|@translate}</legend>
149  <div id="icomment_list">
150  </div>
151</fieldset>
152
153<script type="text/javascript">
154  load_poll_voter_list(1);
155  load_poll_comment_list(1);
156</script>
Note: See TracBrowser for help on using the repository browser.