| 1 |
<?php |
| 2 |
// phpcs:disable WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- View file, its variables are local to the include scope, not true globals. |
| 3 |
defined('ABSPATH') || die('Restricted Access'); |
| 4 |
?> |
| 5 |
<div class="cell grid-x acym__content" id="acym__plugin__installed"> |
| 6 |
<form id="acym_form" |
| 7 |
action="<?php echo esc_url(acym_completeLink(acym_getVar('cmd', 'ctrl'))); ?>" |
| 8 |
method="post" |
| 9 |
name="acyForm" |
| 10 |
class="cell grid-x acym__form__campaign__edit" |
| 11 |
data-abide> |
| 12 |
<input type="hidden" name="plugin__folder_name" value=""> |
| 13 |
<?php |
| 14 |
$workflow = $data['workflowHelper']; |
| 15 |
$workflow->display($data['tabs'], $data['tab'], false, true); |
| 16 |
?> |
| 17 |
<div id="acym__plugin__installed__application" class="cell grid-x"> |
| 18 |
<?php |
| 19 |
if (empty($data['plugins'])) { ?> |
| 20 |
<div class="cell grid-x align-center"> |
| 21 |
<h2 class="cell text-center acym__title__primary__color"><?php echo esc_html(acym_translation('ACYM_YOU_DONT_HAVE_ADD_ONS')); ?></h2> |
| 22 |
<a href="<?php echo esc_url(acym_completeLink('plugins&task=available')); ?>" |
| 23 |
class="cell shrink button text-center margin-top-1 margin-bottom-2"><?php echo esc_html(acym_translation('ACYM_DOWNLOAD_MY_FIRST_ONE')); ?></a> |
| 24 |
</div> |
| 25 |
<?php } else { ?> |
| 26 |
<div class="cell grid-x grid-margin-x margin-bottom-1"> |
| 27 |
<input type="text" class="cell medium-3 margin-bottom-0" v-model="search" placeholder="<?php echo esc_attr(acym_translation('ACYM_SEARCH')); ?>"> |
| 28 |
<div class="cell medium-4 large-2"> |
| 29 |
<select2 :name="'acym__plugins__type'" :options="<?php echo esc_attr(json_encode($data['types'])); ?>" v-model="type"></select2> |
| 30 |
</div> |
| 31 |
<div class="cell medium-4 large-2"> |
| 32 |
<select2 :name="'acym__plugins__level'" :options="<?php echo esc_attr(json_encode($data['level'])); ?>" v-model="level"></select2> |
| 33 |
</div> |
| 34 |
<div class="cell grid-x medium-5 align-right"> |
| 35 |
<div class="cell medium-2"></div> |
| 36 |
<button type="button" class="acy_button_submit button button-secondary acym_vcenter" data-task="checkUpdates"> |
| 37 |
<i class="acymicon-autorenew"></i><?php echo esc_html(acym_translation('ACYM_CHECK_FOR_UPDATES')); ?> |
| 38 |
</button> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
<div class="cell grid-x" v-show="noPluginTodisplay" style="display: none;"> |
| 42 |
<h2 class="cell text-center acym__title__primary__color"><?php echo esc_html(acym_translation('ACYM_NO_ADD_ONS_TO_DISPLAY')); ?></h2> |
| 43 |
</div> |
| 44 |
<div class="cell grid-x margin-bottom-2" v-show="!noPluginTodisplay"> |
| 45 |
<div class="cell grid-x align-center text-center acym__plugin__available__loader__page margin-top-3 margin-bottom-3" v-show="loading"> |
| 46 |
<?php acym_loaderLogo(); ?> |
| 47 |
</div> |
| 48 |
<div class="cell grid-x grid-margin-x grid-margin-y" |
| 49 |
v-show="!loading" |
| 50 |
style="display: none;" |
| 51 |
v-infinite-scroll="loadMorePlugins" |
| 52 |
:infinite-scroll-disabled="busy"> |
| 53 |
<div class="acym__plugins__card cell xlarge-3 large-4 medium-6 grid-y align-justify" |
| 54 |
:id="'acym__plugins__card__' + plugin.folder_name" |
| 55 |
v-for="(plugin, index) in displayedPlugins" |
| 56 |
:key="plugin"> |
| 57 |
<div v-show="!showSettings[plugin.id]" class="acym__plugins__info__container"> |
| 58 |
<button v-if="plugin.type == 'ADDON'" @click="deletePlugin(plugin.id)" type="button" class="acym__plugins__button__delete"> |
| 59 |
<i class="acymicon-delete"></i> |
| 60 |
</button> |
| 61 |
|
| 62 |
<div class="acym__plugins__card__params_type shrink cell">{{ plugin.category }}</div> |
| 63 |
|
| 64 |
<!-- PICTURE CARD --> |
| 65 |
<div class="acym__plugins__card__image margin-bottom-1 cell grid-x align-center"> |
| 66 |
<img :src="imageUrl(plugin.folder_name, plugin.type)" alt="plugin image" class="cell"> |
| 67 |
</div> |
| 68 |
|
| 69 |
<!-- MAIN CARD --> |
| 70 |
<div class="acym__plugins__card__params"> |
| 71 |
<div class="acym__plugins__card__params__title-line"> |
| 72 |
<h2 class="medium-9 acym__plugins__card__params__title acym_text_ellipsis" :title="plugin.title">{{ plugin.title }}</h2> |
| 73 |
<div class="acym__plugins__card__params__icons"> |
| 74 |
<button v-show="plugin.uptodate == '0'" data-acym-tooltip="<?php echo esc_attr(acym_translation('ACYM_UPDATE')); ?>" |
| 75 |
type="button" |
| 76 |
class="acym__plugins__button shrink acym__plugins__button__update cell text-center" |
| 77 |
@click="updatePlugin(plugin)"> |
| 78 |
<span v-show="!updating[plugin.id]"><i class="acymicon-exclamation-triangle"></i></span> |
| 79 |
<span v-show="updating[plugin.id]"><?php acym_loaderLogo(); ?></span> |
| 80 |
</button> |
| 81 |
<div v-if="plugin.settings && plugin.settings != 'not_installed'" class="acym__icon"> |
| 82 |
<i @click="toggleSettings(plugin.folder_name)" |
| 83 |
class="acymicon-cog cell shrink acym__plugins__settings__toggle cursor-pointer"></i> |
| 84 |
</div> |
| 85 |
<div v-if="plugin.settings && plugin.settings == 'not_installed'" class="acym__icon"> |
| 86 |
<i class="acymicon-cog cell shrink acym__plugins__settings__toggle__blocked cursor-pointer acym__color__medium-gray acym__tooltip"> |
| 87 |
<span class="acym__tooltip__text"><?php echo esc_html( |
| 88 |
acym_translation('ACYM_SETTINGS_AVAILABLE_INSTALLED_EXTENSION') |
| 89 |
); ?></span> |
| 90 |
</i> |
| 91 |
</div> |
| 92 |
<a class="acym__icon" target="_blank" |
| 93 |
:href="documentationUrl(plugin.folder_name, plugin.type)" |
| 94 |
class="acym__icon acym__plugins__documentation cell medium-1"> |
| 95 |
<i class="acymicon-book"></i> |
| 96 |
</a> |
| 97 |
</div> |
| 98 |
</div> |
| 99 |
|
| 100 |
<div ref="plugins" :class="isOverflown(index)" class="acym__plugins__card__params_desc cell" v-html="plugin.description"></div> |
| 101 |
|
| 102 |
<div v-if="plugin.type == 'ADDON'" class="acym__plugins__card__actions cell grid-x acym_vcenter" v-show="rightLevel(plugin.level)"> |
| 103 |
<div class="cell grid-x acym_vcenter medium-8"> |
| 104 |
<span class="cell shrink"><?php echo esc_html(acym_translation('ACYM_ENABLED')); ?>:</span> |
| 105 |
<vue-switch :plugin="plugin" :ischecked="isActivated(plugin.active)"></vue-switch> |
| 106 |
</div> |
| 107 |
</div> |
| 108 |
</div> |
| 109 |
</div> |
| 110 |
<div class="cell grid-x acym__plugins__settings__container" v-if="plugin.settings"> |
| 111 |
<h3 class="cell acym__title__primary__color text-center">{{ plugin.title }}</h3> |
| 112 |
<div class="acym__plugins__settings__options__container cell"> |
| 113 |
<div class="cell grid-x acym_vcenter acym__plugins__settings-one" v-for="(settings, index) in plugin.settings" :key="index" v-html="settings"> |
| 114 |
</div> |
| 115 |
</div> |
| 116 |
<div class="cell grid-x align-center"> |
| 117 |
<button type="button" |
| 118 |
@click="toggleSettings(plugin.folder_name)" |
| 119 |
class="cell medium-5 button acym__button__cancel"><?php echo esc_html(acym_translation('ACYM_CANCEL')); ?></button> |
| 120 |
<div class="cell medium-1 hide-for-small-only"></div> |
| 121 |
<button type="button" class="cell medium-5 button acy_button_submit" data-task="saveSettings"> |
| 122 |
<?php echo esc_html(acym_translation('ACYM_SAVE')); ?> |
| 123 |
</button> |
| 124 |
</div> |
| 125 |
</div> |
| 126 |
</div> |
| 127 |
</div> |
| 128 |
</div> |
| 129 |
<?php |
| 130 |
} ?> |
| 131 |
</div> |
| 132 |
<?php acym_formOptions(); ?> |
| 133 |
</form> |
| 134 |
</div> |
| 135 |
|