Commit | Line | Data |
---|---|---|
6a488035 TO |
1 | {* |
2 | +--------------------------------------------------------------------+ | |
fee14197 | 3 | | CiviCRM version 5 | |
6a488035 | 4 | +--------------------------------------------------------------------+ |
6b83d5bd | 5 | | Copyright CiviCRM LLC (c) 2004-2019 | |
6a488035 TO |
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 | ||
27 | {if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 32 or $action eq 64} | |
28 | {include file="CRM/Admin/Form/Extensions.tpl"} | |
29 | {else} | |
036aa39d | 30 | <div class="crm-content-block crm-block"> |
6a488035 TO |
31 | {if $action ne 1 and $action ne 2} |
32 | {include file="CRM/Admin/Page/Extensions/Refresh.tpl"} | |
33 | {/if} | |
34 | ||
35 | {if $extDbUpgrades} | |
36 | <div class="messages warning"> | |
036aa39d | 37 | <p>{ts 1=$extDbUpgradeUrl}Your extensions require database updates. Please <a href="%1">execute the updates</a>.{/ts}</p> |
6a488035 TO |
38 | </div> |
39 | {/if} | |
40 | ||
41 | {include file="CRM/Admin/Page/Extensions/About.tpl"} | |
42 | ||
4d17a233 | 43 | {include file="CRM/common/enableDisableApi.tpl"} |
6a488035 TO |
44 | {include file="CRM/common/jsortable.tpl"} |
45 | ||
46 | <div id="mainTabContainer" class="ui-tabs ui-widget ui-widget-content ui-corner-all"> | |
47 | <ul class="crm-extensions-tabs-list"> | |
48 | <li id="tab_summary" class="crm-tab-button"> | |
49 | <a href="#extensions-main" title="{ts}Extensions{/ts}"> | |
50 | <span> </span> {ts}Extensions{/ts} | |
51 | <em> </em> | |
52 | </a> | |
53 | </li> | |
54 | <li id="tab_addnew" class="crm-tab-button"> | |
55 | <a href="#extensions-addnew" title="{ts}Add New{/ts}"> | |
56 | <span> </span> {ts}Add New{/ts} | |
57 | <em> </em> | |
58 | </a> | |
59 | </li> | |
60 | </ul> | |
61 | ||
62 | <div id="extensions-main" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> | |
63 | {include file="CRM/Admin/Page/Extensions/Main.tpl"} | |
64 | </div> | |
65 | <div id="extensions-addnew" class="ui-tabs-panel ui-widget-content ui-corner-bottom"> | |
66 | {if $extAddNewEnabled} | |
67 | {if $extAddNewReqs} | |
68 | {include file="CRM/Admin/Page/Extensions/AddNewReq.tpl"} | |
69 | {else} | |
70 | {include file="CRM/Admin/Page/Extensions/AddNew.tpl"} | |
71 | {/if} | |
72 | {else} | |
73 | {ts}The system administrator has disabled this feature.{/ts} | |
74 | {/if} | |
75 | </div> | |
76 | ||
77 | <div class="clear"></div> | |
78 | </div> | |
79 | ||
80 | {if $action ne 1 and $action ne 2} | |
81 | {include file="CRM/Admin/Page/Extensions/Refresh.tpl"} | |
82 | {/if} | |
036aa39d | 83 | </div> |
6a488035 TO |
84 | {* Expand/Collapse *} |
85 | {literal} | |
86 | <script type="text/javascript"> | |
3cc60a06 | 87 | CRM.$(function($) { |
ae8f569f CW |
88 | $('.collapsed').click( function( ) { |
89 | var currentObj = $( this ); | |
6a488035 TO |
90 | if ( currentObj.hasClass( 'expanded') ) { |
91 | currentObj.removeClass( 'expanded' ); | |
92 | currentObj.parent( ).parent( ).next( ).hide( ); | |
93 | } else { | |
94 | currentObj.addClass( 'expanded' ); | |
95 | currentObj.parent( ).parent( ).next( ).show( ); | |
96 | } | |
97 | ||
98 | return false; | |
99 | }); | |
100 | }); | |
101 | </script> | |
102 | {/literal} | |
103 | ||
c1bd8375 | 104 | {include file="CRM/common/TabSelected.tpl" defaultTab="summary"} |
6a488035 TO |
105 | |
106 | {* Refresh buttons *} | |
107 | {literal} | |
108 | <script type="text/javascript"> | |
3cc60a06 | 109 | CRM.$(function($) { |
ae8f569f | 110 | $('.crm-extensions-refresh').click(function(event){ |
6a488035 TO |
111 | event.stopPropagation(); |
112 | CRM.alert('', '{/literal}{ts escape="js"}Refreshing...{/ts}{literal}', 'crm-msg-loading', {expires: 0}); | |
edc51caa | 113 | CRM.api('Extension', 'refresh', {}, { |
6a488035 TO |
114 | 'callBack' : function(result){ |
115 | if (result.is_error) { | |
116 | CRM.alert(result.error_message, '{/literal}{ts escape="js"}Refresh Error{/ts}{literal}', 'error'); | |
117 | } else { | |
118 | window.location.reload(); | |
119 | } | |
edc51caa | 120 | } |
6a488035 TO |
121 | }); |
122 | return false; | |
123 | }); // .click | |
124 | }); // onload | |
125 | </script> | |
126 | {/literal} | |
127 | {/if} |