diff options
Diffstat (limited to 'templates/show_localplay_controllers.inc.php')
-rw-r--r-- | templates/show_localplay_controllers.inc.php | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/templates/show_localplay_controllers.inc.php b/templates/show_localplay_controllers.inc.php index 3a45b481..cfbe7e30 100644 --- a/templates/show_localplay_controllers.inc.php +++ b/templates/show_localplay_controllers.inc.php @@ -31,13 +31,22 @@ $web_path = Config::get('web_path'); <?php foreach ($controllers as $controller) { $localplay = new Localplay($controller); + if (!$localplay->player_loaded()) { continue; } $localplay->format(); + if ($localplay->is_enabled()) { + $action = 'confirm_uninstall_localplay'; + $action_txt = _('Disable'); + } + else { + $action = 'install_localplay'; + $action_txt = _('Activate'); + } ?> <tr class="<?php echo flip_class(); ?>"> <td><?php echo scrub_out($localplay->f_name); ?></td> <td><?php echo scrub_out($localplay->f_description); ?></td> <td><?php echo scrub_out($localplay->f_version); ?></td> - <td><?php echo $action; ?></td> + <td><a href="<?php echo $web_path; ?>/admin/modules.php?action=<?php echo $action; ?>&type="<?php urlencode($localplay->type); ?>"><?php echo $action_txt; ?></a></td> </tr> <?php } if (!count($controllers)) { ?> <tr class="<?php echo flip_class(); ?>"> |