{*<!--

+---------------------------------------------------------------------------+
| OpenX v2.8                                                                |
| ==========                                                                |
|                                                                           |
| Copyright (c) 2003-2009 OpenX Limited                                     |
| For contact details, see: http://www.openx.org/                           |
|                                                                           |
| This program is free software; you can redistribute it and/or modify      |
| it under the terms of the GNU General Public License as published by      |
| the Free Software Foundation; either version 2 of the License, or         |
| (at your option) any later version.                                       |
|                                                                           |
| This program is distributed in the hope that it will be useful,           |
| but WITHOUT ANY WARRANTY; without even the implied warranty of            |
| MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the             |
| GNU General Public License for more details.                              |
|                                                                           |
| You should have received a copy of the GNU General Public License         |
| along with this program; if not, write to the Free Software               |
| Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA |
+---------------------------------------------------------------------------+
$Id: plugin-index.html 82775 2013-08-06 23:40:26Z chris.nutting $

-->*}

{if $configLocked}
    <div class='errormessage'><img class='errormessage' src='{$assetPath|escape}/images/padlock-{$image}.gif' width='16' height='16' border='0' align='absmiddle'>
        {t str=EditConfigNotPossible}
    </div>
{/if}

{include file=plugin-group-switcher.html}

<div class="control-panel">
    <form name="packageform" id="packageform" method="post" action="plugin-index.php" enctype="multipart/form-data">
    <div class="control-set left">
        <input name="package" value="1" type="hidden">
        <input name="token"   value="{$token}" type="hidden" />
    <span class='corner bottom-left'></span>
    <span class='corner bottom-right'></span>
      <h2>Install new plugin</h2>
      Select file
      <input name="filename" tabindex="1" type="file" {if $configLocked}disabled='true'{/if}>
      <input value="Install" name="install" tabindex="2" type="submit" {if $configLocked}disabled='true'{/if}>
      <input value="Import (code only)" name="import" tabindex="3" type="submit" {if $configLocked}disabled='true'{/if}>
    </div>
    </form>
</div>


{if $formError && $formError.id > 0 && $formError.message}
<div class="error-box" style="margin-bottom: 10px">
    {$formError.message|escape}
</div>
{/if}

{if $aWarnings}
    <div class="error-box" style="margin-bottom: 10px">
        {foreach from=$aWarnings key=idx item=warning}
            {$warning|escape}
            <br />
        {/foreach}
    </div>
{/if}
{if $aErrors}
    <div class="error-box" style="margin-bottom: 10px">
        {foreach from=$aErrors key=idx item=error}
            {$error|escape}
            <br />
        {/foreach}
    </div>
{/if}
{if $aMessages}
    <div class="infomessage" style="margin-bottom: 10px">
        {foreach from=$aMessages key=idx item=message}
            {$message}
            <br />
        {/foreach}
    </div>
{/if}

<table class="data" >
    <thead>
        <tr>
            <td>Name</td>
            <td>Author</td>
            <td>Status</td>
            <td colspan="3">Actions</td>
        </tr>
    </thead>

    <tbody>
      {if !$aPackages|@count}
        <tr class="even">
            <td colspan="6">
             <p>No plugins installed.</p>
            </td>
        </tr>
      {else}
      {cycle name=bgclass values="odd,even" assign=bgClass reset=1}
      {foreach from=$aPackages key=name item=aitem}
          {if !$configLocked || $aitem.enabled}
          {cycle name=bgclass assign=bgClass}
              <tr class="{$bgClass}">
                  <td width="40%">
                     <div class="item-info">
                         <p><span class="name">{$name}</span><span class="version">{$aitem.version}</span></p>
                         <p>{$aitem.description}</p>
                     </div>
                  </td>
                  <td>{if {$aitem.authoremail}<a href="mailto:{$aitem.authoremail}">{/if}{$aitem.author}{if {$aitem.authoremail}</a>{/if}</td>
                  <td>{if $aitem.enabled > 0}Enabled{else}Disabled{/if}</td>
                  <td><a href='plugin-index.php?action=info&package={$name}' ><span class="action icon details">Details</span></a></td>
                  <td>
                    {if $configLocked}&nbsp;{else}
                        {if $aitem.enabled > 0}
                           <a href='plugin-index.php?action=disable&package={$name}' ><span class="action icon disable">Disable</span></a>
                        {else}
                           <a href='plugin-index.php?action=enable&package={$name}' ><span class="action icon enable">Enable</span></a>
                        {/if}
                    {/if}
                  </td>
                  {if $configLocked}&nbsp;{else}<td><a href='plugin-index.php?action=uninstall&package={$name}' ><span class="action icon uninstall">Uninstall</span></a></td>{/if}
              </tr>
          {/if}
        {/foreach}
       {/if}
    </tbody>
</table>



