Merge remote-tracking branch 'upstream/4.3' into 4.3-4.4-2013-10-23-19-26-23
[civicrm-core.git] / templates / CRM / Campaign / Page / Vote.tpl
1 {*
2 +--------------------------------------------------------------------+
3 | CiviCRM version 4.4 |
4 +--------------------------------------------------------------------+
5 | Copyright CiviCRM LLC (c) 2004-2013 |
6 +--------------------------------------------------------------------+
7 | This file is a part of CiviCRM. |
8 | |
9 | CiviCRM is free software; you can copy, modify, and distribute it |
10 | under the terms of the GNU Affero General Public License |
11 | Version 3, 19 November 2007 and the CiviCRM Licensing Exception. |
12 | |
13 | CiviCRM is distributed in the hope that it will be useful, but |
14 | WITHOUT ANY WARRANTY; without even the implied warranty of |
15 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
16 | See the GNU Affero General Public License for more details. |
17 | |
18 | You should have received a copy of the GNU Affero General Public |
19 | License and the CiviCRM Licensing Exception along |
20 | with this program; if not, contact CiviCRM LLC |
21 | at info[AT]civicrm[DOT]org. If you have questions about the |
22 | GNU Affero General Public License or the licensing of CiviCRM, |
23 | see the CiviCRM license FAQ at http://civicrm.org/licensing |
24 +--------------------------------------------------------------------+
25 *}
26 {* Voting Tab Interface - Easy way to get the voter Interview. *}
27 {if $subPageType eq 'interview'}
28 {* build the voter interview grid here *}
29 {include file='CRM/Campaign/Form/Task/Interview.tpl'}
30 {elseif $subPageType eq 'reserve'}
31 {* build the ajax search and voters reserve interface here *}
32 {include file='CRM/Campaign/Form/Gotv.tpl'}
33 {elseif $allTabs}
34 {* build normal page *}
35 <div id="mainTabContainer" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
36 <ul class="crm-vote-tabs-list">
37 {foreach from=$allTabs key=tabName item=tabValue}
38 <li id="tab_{$tabValue.id}" class="crm-tab-button ui-corner-bottom">
39 <a href="{$tabValue.url}" title="{$tabValue.title}"><span></span>{$tabValue.title}</a>
40 </li>
41 {/foreach}
42 </ul>
43 </div>
44 <div class="spacer"></div>
45
46 {literal}
47 <script type="text/javascript">
48
49 //explicitly stop spinner
50 function stopSpinner( ) {
51 cj('li.crm-tab-button').each(function(){ cj(this).find('span').text(' ');})
52 }
53
54 cj(document).ready( function( ) {
55 {/literal}
56 var spinnerImage = '<img src="{$config->resourceBase}i/loading.gif" style="width:10px;height:10px"/>';
57 {literal}
58
59 var selectedTabIndex = {/literal}{$selectedTabIndex}{literal};
60 cj("#mainTabContainer").tabs( {
61 selected: selectedTabIndex,
62 spinner: spinnerImage,
63 cache: false,
64 load: stopSpinner
65 });
66 });
67
68 </script>
69 {/literal}
70 {else}
71 <div class="messages status no-popup">
72 <div class="icon inform-icon"></div>
73 {ts}You are not authorized to access this page.{/ts}
74 </div>
75 {/if}