<?php
/* Smarty version 3.1.33, created on 2022-10-31 23:43:04
  from '/home/responsi/writers19.com/content/themes/dashboard/modules/modules.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_63605d8825ecf8_84935806',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    'f29ec55d52c2f7042f92437fe4fdaa26f393bc30' => 
    array (
      0 => '/home/responsi/writers19.com/content/themes/dashboard/modules/modules.tpl',
      1 => 1656689818,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
  ),
),false)) {
function content_63605d8825ecf8_84935806 (Smarty_Internal_Template $_smarty_tpl) {
$_smarty_tpl->_loadInheritance();
$_smarty_tpl->inheritance->init($_smarty_tpl, true);
?>
 

<?php 
$_smarty_tpl->inheritance->instanceBlock($_smarty_tpl, 'Block_164584199663605d88242d92_83084283', 'content_wrapper');
$_smarty_tpl->inheritance->endChild($_smarty_tpl, 'dashboard/layout.tpl');
}
/* {block 'content_wrapper'} */
class Block_164584199663605d88242d92_83084283 extends Smarty_Internal_Block
{
public $subBlocks = array (
  'content_wrapper' => 
  array (
    0 => 'Block_164584199663605d88242d92_83084283',
  ),
);
public function callBlock(Smarty_Internal_Template $_smarty_tpl) {
?>

    <div class="card">
        <div class="card-header with-icon with-nav">
            <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "add-new") {?>
                <div class="pull-right flip">
                    <button data-toggle="modal" data-url="#modalUploadPlugin" type="button" class="btn btn-success">
                        <i class="fa fa-plus"></i> Upload Plugin
                    </button>
                </div>
            <?php }?>

            <div class="mb20"> 
                <i class="fa fa-plug mr10"></i> <strong>Modules</strong> 
            </div>
            <ul class="nav nav-tabs">
                <li <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "installed") {?>class="active"<?php }?>>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/modules"> 
                        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "installed") {?><strong class="pr5">Installed</strong><?php } else { ?>Installed<?php }?> 
                    </a>
                </li>

                <li <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "add-new") {?>class="active"<?php }?>>
                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/modules/install"> 
                        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "add-new") {?><strong class="pr5">Add New</strong><?php } else { ?>Add New<?php }?> 
                    </a>
                </li>

            </ul>
        </div>

        <?php if ($_smarty_tpl->tpl_vars['sub_view']->value == "installed") {?>

            <div class="card-body"> 

                <?php if (count($_smarty_tpl->tpl_vars['modules_list']->value)) {?> 
                    <div class="row"> 
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules_list']->value, 'activeModule');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['activeModule']->value) {
?>
                            <div class="col-md-6 mb10">
                                <div class="card">
                                    <div class="card-body pt10 pl10 pb10 pr10">
                                        <div class="row align-items-center">
                                            <div class="col-md-3">
                                                <div class="card-img module_image" style="background-image: url(<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['activeModule']->value->logo, ENT_QUOTES, 'UTF-8');?>
);"></div>
                                            </div>
                                            <div class="col-md-9">
                                                <h4 class="card-title mt0 pt0 mb5"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['activeModule']->value->displayName, ENT_QUOTES, 'UTF-8');?>
</h4>
                                                <p class="card-text"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['activeModule']->value->description, ENT_QUOTES, 'UTF-8');?>
</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="card-footer clearfix">
                                        <?php if ($_smarty_tpl->tpl_vars['activeModule']->value->configure) {?>
                                            <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['base_uri']->value, ENT_QUOTES, 'UTF-8');?>
/<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['activeModule']->value->name, ENT_QUOTES, 'UTF-8');?>
/configure" class="btn btn-sm btn-success">Configure</a>
                                        <?php }?>

                                        <?php if ($_smarty_tpl->tpl_vars['activeModule']->value->installed) {?>
                                            <button data-module="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['activeModule']->value->name, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-secondary pull-right js_uninstall-module">Uninstall</button>
                                        <?php } else { ?>
                                            <button data-module="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['activeModule']->value->name, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-success pull-right js_install-module">Install</button>
                                        <?php }?>
                                    </div>
                                </div>
                            </div>
                        <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    </div>
                <?php } else { ?>
                    <div class="text-center x-muted"> 
                        <img class="mb20" width="15%" src="/static/images/no_results.png">
                        <p class="mb10"><strong>No modules to show</strong></p>
                    </div>
                <?php }?>

            </div>

        <?php } elseif ($_smarty_tpl->tpl_vars['sub_view']->value == "add-new") {?>

            <div class="card-body">  

                <?php if (count($_smarty_tpl->tpl_vars['modules_list']->value)) {?> 
                    <div class="row"> 
                        <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['modules_list']->value, 'module');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['module']->value) {
?>
                            <div class="col-md-6 mb10">
                                <div class="card">
                                    <div class="card-body pt10 pl10 pb10 pr10">
                                        <div class="row align-items-center">
                                            <div class="col-md-3">
                                                <div class="card-img module_image" style="background-image: url(<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->logo, ENT_QUOTES, 'UTF-8');?>
);"></div>
                                            </div>
                                            <div class="col-md-9">
                                                <h4 class="card-title mt0 pt0 mb5"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->displayName, ENT_QUOTES, 'UTF-8');?>
</h4>
                                                <p class="card-text"><?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->description, ENT_QUOTES, 'UTF-8');?>
</p>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="card-footer clearfix">
                                        <?php if ($_smarty_tpl->tpl_vars['module']->value->not_on_disk) {?>
                                            <?php if (isset($_smarty_tpl->tpl_vars['module']->value->price)) {?>
                                                <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->buylink, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-success pull-right">Buy <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['module']->value->price), ENT_QUOTES, 'UTF-8');?>
</a>
                                            <?php } else { ?>
                                                <button data-module="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->name, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-success pull-right js_download-module">Install</button>
                                            <?php }?>
                                        <?php } else { ?>
                                            <?php if (!$_smarty_tpl->tpl_vars['module']->value->installed) {?>
                                                <?php if (isset($_smarty_tpl->tpl_vars['module']->value->price)) {?>
                                                    <a href="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->buylink, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-primary">Buy <?php echo htmlspecialchars(formatPrice($_smarty_tpl->tpl_vars['module']->value->price), ENT_QUOTES, 'UTF-8');?>
</a>
                                                    <button data-options='{"module_name":"<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->name, ENT_QUOTES, 'UTF-8');?>
"}' data-toggle="modal" data-url="#activateModule" data-title="Activate Module" class="btn btn-sm btn-success pull-right js_activate-module">Activate</button>
                                                <?php } else { ?>
                                                    <button data-module="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->name, ENT_QUOTES, 'UTF-8');?>
" data-title="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->displayName, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-success pull-right js_install-module">Install</button>
                                                <?php }?>
                                            <?php } else { ?>
                                                <button data-module="<?php echo htmlspecialchars($_smarty_tpl->tpl_vars['module']->value->name, ENT_QUOTES, 'UTF-8');?>
" class="btn btn-sm btn-secondary pull-right js_uninstall-module">Uninstall</button>
                                            <?php }?>
                                        <?php }?>
                                        
                                    </div>
                                </div>
                            </div>
                        <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
                    </div>
                <?php } else { ?>
                    <div class="text-center x-muted"> 
                        <img class="mb20" width="15%" src="/static/images/no_results.png">
                        <p class="mb10"><strong>No modules to show</strong></p>
                    </div>
                <?php }?>

            </div>

        <?php }?>
    </div>
</div>
<?php
}
}
/* {/block 'content_wrapper'} */
}
