2014-11-05 17:45:27 +02:00
|
|
|
{**
|
|
|
|
* Список плагинов
|
|
|
|
*
|
|
|
|
* @param array $plugins Список плагинов
|
|
|
|
*}
|
2014-10-22 17:54:58 +03:00
|
|
|
|
2016-01-19 04:34:44 +02:00
|
|
|
{component_define_params params=[ 'plugins' ]}
|
|
|
|
|
2015-04-29 10:08:20 +03:00
|
|
|
<table class="ls-table admin-plugins">
|
2014-10-22 17:54:58 +03:00
|
|
|
<tbody>
|
2016-01-19 04:34:44 +02:00
|
|
|
{foreach $plugins as $plugin}
|
2014-10-22 17:54:58 +03:00
|
|
|
<tr {if $plugin.is_active}class="active"{/if}>
|
2014-11-05 17:45:27 +02:00
|
|
|
{* Название и описание плагина *}
|
2014-10-22 17:54:58 +03:00
|
|
|
<td>
|
|
|
|
<h3>{$plugin.property->name->data}</h3>
|
2014-11-05 17:45:27 +02:00
|
|
|
<p>{$plugin.property->description->data}</p>
|
|
|
|
|
2015-01-03 10:19:49 +02:00
|
|
|
{component 'info-list' list=[
|
2014-11-05 17:45:27 +02:00
|
|
|
[ 'label' => {lang 'admin.plugins.plugin.version'}, 'content' => $plugin.property->version|escape ],
|
|
|
|
[ 'label' => {lang 'admin.plugins.plugin.author'}, 'content' => $plugin.property->author->data ],
|
|
|
|
[ 'label' => {lang 'admin.plugins.plugin.url'}, 'content' => $plugin.property->homepage ]
|
|
|
|
]}
|
2014-10-22 17:54:58 +03:00
|
|
|
</td>
|
2014-11-05 17:45:27 +02:00
|
|
|
|
|
|
|
{* Действия *}
|
2014-10-22 17:54:58 +03:00
|
|
|
<td>
|
2014-11-05 17:45:27 +02:00
|
|
|
<ul class="admin-plugins-actions">
|
|
|
|
{* Активировать/деактивировать *}
|
|
|
|
<li>
|
|
|
|
{if $plugin.is_active}
|
2014-12-30 15:52:27 +02:00
|
|
|
{component 'button'
|
2014-11-05 17:45:27 +02:00
|
|
|
url = "{router page='admin'}plugins/?plugin={$plugin.code}&action=deactivate&security_ls_key={$LIVESTREET_SECURITY_KEY}"
|
|
|
|
text = {lang 'admin.plugins.plugin.deactivate'}}
|
|
|
|
{else}
|
2014-12-30 15:52:27 +02:00
|
|
|
{component 'button'
|
2014-11-11 10:54:56 +02:00
|
|
|
url = "{router page='admin'}plugins/?plugin={$plugin.code}&action=activate&security_ls_key={$LIVESTREET_SECURITY_KEY}"
|
2014-11-05 17:45:27 +02:00
|
|
|
mods = 'primary'
|
|
|
|
text = {lang 'admin.plugins.plugin.activate'}}
|
|
|
|
{/if}
|
|
|
|
</li>
|
|
|
|
|
|
|
|
{* Применить обновление *}
|
|
|
|
{if $plugin.apply_update && $plugin.is_active}
|
|
|
|
<li>
|
2014-12-30 15:52:27 +02:00
|
|
|
{component 'button'
|
2014-11-12 15:38:10 +02:00
|
|
|
url = "{router page='admin'}plugins/?plugin={$plugin.code}&action=apply_update&security_ls_key={$LIVESTREET_SECURITY_KEY}"
|
|
|
|
text = {lang 'admin.plugins.plugin.apply_update'}}
|
2014-11-05 17:45:27 +02:00
|
|
|
</li>
|
|
|
|
{/if}
|
2014-10-22 17:54:58 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{* Ссылка на страницу настроек *}
|
|
|
|
{if $plugin.property->settings != "" && $plugin.is_active}
|
|
|
|
<li>
|
2014-12-30 15:52:27 +02:00
|
|
|
{component 'button'
|
2014-11-05 17:45:27 +02:00
|
|
|
url = $plugin.property->settings
|
|
|
|
text = {lang 'admin.plugins.plugin.settings'}}
|
|
|
|
</li>
|
|
|
|
{/if}
|
2014-10-22 17:54:58 +03:00
|
|
|
|
2014-11-05 17:45:27 +02:00
|
|
|
{* Удалить *}
|
|
|
|
<li>
|
2014-12-30 15:52:27 +02:00
|
|
|
{component 'button'
|
|
|
|
url = "{router page='admin'}plugins/?plugin={$plugin.code}&action=remove&security_ls_key={$LIVESTREET_SECURITY_KEY}"
|
2014-11-25 10:12:44 +02:00
|
|
|
attributes = [ 'onclick' => "return confirm('{lang 'common.remove_confirm'}');" ]
|
2014-12-30 15:52:27 +02:00
|
|
|
text = {lang 'admin.plugins.plugin.remove'}}
|
2014-11-05 17:45:27 +02:00
|
|
|
</li>
|
|
|
|
</ul>
|
2014-10-22 17:54:58 +03:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{/foreach}
|
|
|
|
</tbody>
|
|
|
|
</table>
|