Ignore:
Timestamp:
Oct 1, 2008, 2:31:22 PM (16 years ago)
Author:
patdenice
Message:

Add icons for plugins actions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/admin/plugins_list.php

    r2530 r2631  
    9090    array('NAME' => $display_name,
    9191          'VERSION' => $fs_plugin['version'],
    92           'DESCRIPTION' => $desc);
    93 
    94   $action_url = $base_url.'&plugin='.$plugin_id;
     92          'DESCRIPTION' => $desc,
     93          'U_ACTION' => $base_url.'&plugin='.$plugin_id);
    9594
    9695  if (isset($plugins->db_plugins_by_id[$plugin_id]))
    9796  {
    9897    $tpl_plugin['STATE'] = $plugins->db_plugins_by_id[$plugin_id]['state'];
    99     switch ($plugins->db_plugins_by_id[$plugin_id]['state'])
    100     {
    101       case 'active':
    102         $tpl_plugin['actions'][] =
    103             array('U_ACTION' => $action_url . '&action=deactivate',
    104                   'L_ACTION' => l10n('Deactivate'));
    105         break;
    106 
    107       case 'inactive':
    108         $tpl_plugin['actions'][] =
    109             array('U_ACTION' => $action_url . '&action=activate',
    110                   'L_ACTION' => l10n('Activate'));
    111         $tpl_plugin['actions'][] =
    112             array('U_ACTION' => $action_url . '&action=uninstall',
    113                   'L_ACTION' => l10n('Uninstall'),
    114                   'CONFIRM' => l10n('Are you sure?'));
    115         break;
    116     }
    11798  }
    11899  else
    119100  {
    120     $tpl_plugin['actions'][] =
    121         array('U_ACTION' => $action_url . '&action=install',
    122               'L_ACTION' => l10n('Install'),
    123               'CONFIRM' => l10n('Are you sure?'));
    124     $tpl_plugin['actions'][] =
    125         array('U_ACTION' => $action_url . '&action=delete',
    126               'L_ACTION' => l10n('plugins_delete'),
    127               'CONFIRM' => l10n('plugins_confirm_delete'));
     101    $tpl_plugin['STATE'] = 'uninstalled';
    128102  }
    129103  $template->append('plugins', $tpl_plugin);
     
    143117        'VERSION' => $plugins->db_plugins_by_id[$plugin_id]['version'],
    144118        'DESCRIPTION' => "ERROR: THIS PLUGIN IS MISSING BUT IT IS INSTALLED! UNINSTALL IT NOW !",
    145         'actions' => array ( array (
    146               'U_ACTION' => $action_url . '&action=uninstall',
    147               'L_ACTION' => l10n('Uninstall'),
    148           ) )
    149         )
    150      );
     119        'U_ACTION' => $base_url.'&plugin='.$plugin_id,
     120        'STATE' => 'missing'
     121      )
     122    );
    151123}
    152124
Note: See TracChangeset for help on using the changeset viewer.