2 +--------------------------------------------------------------------+
3 | Copyright CiviCRM LLC. All rights reserved. |
5 | This work is published under the GNU AGPLv3 license with some |
6 | permitted exceptions and without any warranty. For full license |
7 | and copyright information, see https://civicrm.org/licensing |
8 +--------------------------------------------------------------------+
11 {if $action eq 1 or $action eq 2 or $action eq 8 or $action eq 32 or $action eq 64}
12 {include file="CRM/Admin/Form/Extensions.tpl"}
14 <div class="crm-content-block crm-block">
15 {if $action ne 1 and $action ne 2}
16 {include file="CRM/Admin/Page/Extensions/Refresh.tpl"}
20 <div class="messages warning">
21 <p>{ts 1=$extDbUpgradeUrl}Your extensions require database updates. Please <a href="%1">execute the updates</a>.{/ts}</p>
25 {include file="CRM/Admin/Page/Extensions/About.tpl"}
27 {include file="CRM/common/enableDisableApi.tpl"}
28 {include file="CRM/common/jsortable.tpl"}
30 <div id="mainTabContainer" class="ui-tabs ui-widget ui-widget-content ui-corner-all">
31 <ul class="crm-extensions-tabs-list">
32 <li id="tab_summary" class="crm-tab-button">
33 <a href="#extensions-main" title="{ts}Extensions{/ts}">
34 <span> </span> {ts}Extensions{/ts}
38 <li id="tab_addnew" class="crm-tab-button">
39 <a href="#extensions-addnew" title="{ts}Add New{/ts}">
40 <span> </span> {ts}Add New{/ts}
46 <div id="extensions-main" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
47 {include file="CRM/Admin/Page/Extensions/Main.tpl"}
49 <div id="extensions-addnew" class="ui-tabs-panel ui-widget-content ui-corner-bottom">
50 {if $extAddNewEnabled}
52 {include file="CRM/Admin/Page/Extensions/AddNewReq.tpl"}
54 {include file="CRM/Admin/Page/Extensions/AddNew.tpl"}
57 {ts}The system administrator has disabled this feature.{/ts}
61 <div class="clear"></div>
64 {if $action ne 1 and $action ne 2}
65 {include file="CRM/Admin/Page/Extensions/Refresh.tpl"}
70 <script type="text/javascript">
72 $('.collapsed').click( function( ) {
73 var currentObj = $( this );
74 if ( currentObj.hasClass( 'expanded') ) {
75 currentObj.removeClass( 'expanded' );
76 currentObj.parent( ).parent( ).next( ).hide( );
78 currentObj.addClass( 'expanded' );
79 currentObj.parent( ).parent( ).next( ).show( );
88 {include file="CRM/common/TabSelected.tpl" defaultTab="summary"}
92 <script type="text/javascript">
94 $('.crm-extensions-refresh').click(function(event){
95 event.stopPropagation();
96 CRM.alert('', '{/literal}{ts escape="js"}Refreshing...{/ts}{literal}', 'crm-msg-loading', {expires: 0});
97 CRM.api('Extension', 'refresh', {}, {
98 'callBack' : function(result){
99 if (result.is_error) {
100 CRM.alert(result.error_message, '{/literal}{ts escape="js"}Refresh Error{/ts}{literal}', 'error');
102 window.location.reload();