Merge pull request #2793 from monishdeb/HR-322
[civicrm-core.git] / templates / CRM / Admin / Page / Extensions / Main.tpl
1 {*
2 Display a table of locally-available extensions.
3
4 Depends: CRM/common/enableDisableApi.tpl and CRM/common/jsortable.tpl
5 *}
6 {if $localExtensionRows}
7 <div id="extensions">
8 {strip}
9 {* handle enable/disable actions*}
10 <table id="extensions" class="display">
11 <thead>
12 <tr>
13 <th>{ts}Extension name (key){/ts}</th>
14 <th>{ts}Status{/ts}</th>
15 <th>{ts}Version{/ts}</th>
16 <th>{ts}Type{/ts}</th>
17 <th></th>
18 </tr>
19 </thead>
20 <tbody>
21 {foreach from=$localExtensionRows key=extKey item=row}
22 <tr id="extension-{$row.id}" class="crm-entity crm-extension_{$row.id}{if $row.status eq 'disabled'} disabled{/if}{if $row.status eq 'installed-missing' or $row.status eq 'disabled-missing'} extension-missing{/if}{if $row.upgradable} extension-upgradable{elseif $row.status eq 'installed'} extension-installed{/if}">
23 <td class="crm-extensions-label">
24 <a class="collapsed" href="#"></a>&nbsp;<strong>{$row.label}</strong><br/>({$row.key})
25 {if $extAddNewEnabled && $remoteExtensionRows[$extKey] && $remoteExtensionRows[$extKey].is_upgradeable}
26 {capture assign='upgradeURL'}{crmURL p='civicrm/admin/extensions' q="action=update&id=$extKey&key=$extKey"}{/capture}
27 <div class="crm-extensions-upgrade">{ts 1=$upgradeURL}Version {$remoteExtensionRows[$extKey].version} is available. <a href="%1">Upgrade</a>{/ts}</div>
28 {/if}
29 </td>
30 <td class="crm-extensions-label">{$row.statusLabel} {if $row.upgradable}<br/>({ts}Outdated{/ts}){/if}</td>
31 <td class="crm-extensions-label">{$row.version} {if $row.upgradable}<br/>({$row.upgradeVersion}){/if}</td>
32 <td class="crm-extensions-description">{$row.type|capitalize}</td>
33 <td>{$row.action|replace:'xx':$row.id}</td>
34 </tr>
35 <tr class="hiddenElement" id="crm-extensions-details-{$row.id}">
36 <td>
37 {include file="CRM/Admin/Page/ExtensionDetails.tpl" extension=$row}
38 </td>
39 <td></td><td></td><td></td><td></td>
40 </tr>
41 {/foreach}
42 </tbody>
43 </table>
44 {/strip}
45 </div>
46 {else}
47 <div class="messages status no-popup">
48 <div class="icon inform-icon"></div>
49 {ts 1="http://civicrm.org/extensions"}There are no extensions to display. Click the "Add New" tab to browse and install extensions posted on the <a href="%1">public CiviCRM Extensions Directory</a>. If you have downloaded extensions manually and don't see them here, try clicking the "Refresh" button.{/ts}
50 </div>
51 {/if}