<?php
/* Smarty version 3.1.33, created on 2025-10-17 08:01:32
  from 'C:\php5.6\htdocs\testlink-1.9.20\gui\templates\tl-classic\plugins\pluginView.tpl' */

/* @var Smarty_Internal_Template $_smarty_tpl */
if ($_smarty_tpl->_decodeProperties($_smarty_tpl, array (
  'version' => '3.1.33',
  'unifunc' => 'content_68f1dbbc061a87_97753180',
  'has_nocache_code' => false,
  'file_dependency' => 
  array (
    '27fc01dc292578cb73d1f89d62da2c2812009875' => 
    array (
      0 => 'C:\\php5.6\\htdocs\\testlink-1.9.20\\gui\\templates\\tl-classic\\plugins\\pluginView.tpl',
      1 => 1579460696,
      2 => 'file',
    ),
  ),
  'includes' => 
  array (
    'file:inc_head.tpl' => 1,
    'file:bootstrap.inc.tpl' => 1,
    'file:inc_ext_js.tpl' => 1,
    'file:inc_update.tpl' => 1,
  ),
),false)) {
function content_68f1dbbc061a87_97753180 (Smarty_Internal_Template $_smarty_tpl) {
echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('var'=>"labels",'s'=>"btn_create,title_plugin_mgmt,th_plugin,th_plugin_description,th_plugin_version,
             installed_plugins,available_plugins,actions"),$_smarty_tpl ) );?>


<?php $_smarty_tpl->_subTemplateRender("file:inc_head.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array('openHead'=>"yes",'jsValidate'=>"yes",'enableTableSorting'=>"yes"), 0, false);
$_smarty_tpl->_subTemplateRender("file:bootstrap.inc.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
$_smarty_tpl->_subTemplateRender("file:inc_ext_js.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('s'=>'confirm_install_header','var'=>"install_header"),$_smarty_tpl ) );?>

<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('s'=>'confirm_install_text','var'=>"install_text"),$_smarty_tpl ) );?>

<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('s'=>'confirm_uninstall_header','var'=>"uninstall_header"),$_smarty_tpl ) );?>

<?php echo call_user_func_array( $_smarty_tpl->smarty->registered_plugins[Smarty::PLUGIN_FUNCTION]['lang_get'][0], array( array('s'=>'confirm_uninstall_text','var'=>"uninstall_text"),$_smarty_tpl ) );?>


</head>

<body <?php echo $_smarty_tpl->tpl_vars['body_onload']->value;?>
>

<?php $_smarty_tpl->_subTemplateRender("file:inc_update.tpl", $_smarty_tpl->cache_id, $_smarty_tpl->compile_id, 0, $_smarty_tpl->cache_lifetime, array(), 0, false);
?>

<form name="pluginForm" action="lib/plugins/pluginView.php" method="POST">
  <input type="hidden" name="pluginId" />
  <input type="hidden" name="pluginName" />
  <input type="hidden" name="operation" />
</form>

<?php if (count($_smarty_tpl->tpl_vars['gui']->value->installed_plugins) != 0) {?>
  <h1 class="title"><?php echo $_smarty_tpl->tpl_vars['labels']->value['installed_plugins'];?>
</h1>
  <div class="workBack">
    <table class="common sortable" width="100%">
      <tr>
        <th width="30%"><?php echo $_smarty_tpl->tpl_vars['tlImages']->value['sort_hint'];
echo $_smarty_tpl->tpl_vars['labels']->value['th_plugin'];?>
</th>
        <th width="40%" class="<?php echo $_smarty_tpl->tpl_vars['noSortableColumnClass']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_plugin_description'];?>
</th>
        <th width="20%" class="icon_cell"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_plugin_version'];?>
</th>
        <th class="icon_cell"><?php echo $_smarty_tpl->tpl_vars['labels']->value['actions'];?>
</th>
      </tr>
      <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->installed_plugins, 'plugin');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['plugin']->value) {
?>
      <tr>
        <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['name'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['description'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['version'];?>
</td>
        <td align="center">[<a href="#" onClick="return uninstallPlugin(<?php echo $_smarty_tpl->tpl_vars['plugin']->value['id'];?>
)">Uninstall</a>]</td>
      </tr>
    <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
  </table>
</div>
<?php }?>

<?php if (count($_smarty_tpl->tpl_vars['gui']->value->available_plugins) != 0) {?>
  <br>
  <h1 class="title"><?php echo $_smarty_tpl->tpl_vars['labels']->value['available_plugins'];?>
</h1>
  <div class="workBack">
    <table class="common sortable" width="100%">
      <tr>
        <th width="30%"><?php echo $_smarty_tpl->tpl_vars['tlImages']->value['sort_hint'];
echo $_smarty_tpl->tpl_vars['labels']->value['th_plugin'];?>
</th>
        <th width="40%" class="<?php echo $_smarty_tpl->tpl_vars['noSortableColumnClass']->value;?>
"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_plugin_description'];?>
</th>
        <th width="20%" class="icon_cell"><?php echo $_smarty_tpl->tpl_vars['labels']->value['th_plugin_version'];?>
</th>
        <th class="icon_cell"><?php echo $_smarty_tpl->tpl_vars['labels']->value['actions'];?>
</th>
      </tr>
      <?php
$_from = $_smarty_tpl->smarty->ext->_foreach->init($_smarty_tpl, $_smarty_tpl->tpl_vars['gui']->value->available_plugins, 'plugin');
if ($_from !== null) {
foreach ($_from as $_smarty_tpl->tpl_vars['plugin']->value) {
?>
      <tr>
        <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['name'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['description'];?>
</td>
        <td><?php echo $_smarty_tpl->tpl_vars['plugin']->value['version'];?>
</td>
        <td align="center">[<a href="#" onClick="return installPlugin('<?php echo $_smarty_tpl->tpl_vars['plugin']->value['name'];?>
')">Install</a>]</td>
      </tr>
      <?php
}
}
$_smarty_tpl->smarty->ext->_foreach->restore($_smarty_tpl, 1);?>
    </table>
  </div>
<?php }?>

<?php echo '<script'; ?>
 type="text/javascript">
  function uninstallPlugin(id)
  {
    Ext.Msg.confirm("<?php echo $_smarty_tpl->tpl_vars['uninstall_header']->value;?>
", "<?php echo $_smarty_tpl->tpl_vars['uninstall_text']->value;?>
",
            function(btn, text)
            {
              if( btn == 'yes' )
              {
                document.forms['pluginForm'].elements['pluginId'].value = id;
                document.forms['pluginForm'].elements['operation'].value = 'uninstall';
                document.forms['pluginForm'].submit();
              }
            }
    );
    return false;
  }
  function installPlugin(name)
  {
    Ext.Msg.confirm("<?php echo $_smarty_tpl->tpl_vars['install_header']->value;?>
", "<?php echo $_smarty_tpl->tpl_vars['install_text']->value;?>
",
            function(btn, text)
            {
              if (btn == 'yes')
              {
                document.forms['pluginForm'].elements['pluginName'].value = name;
                document.forms['pluginForm'].elements['operation'].value = 'install';
                document.forms['pluginForm'].submit();
              }
            }
    );
    return false;
  }
<?php echo '</script'; ?>
>
</body><?php }
}
