PageRenderTime 47ms CodeModel.GetById 20ms RepoModel.GetById 1ms app.codeStats 0ms

/wp-content/plugins/sitepress-multilingual-cms/inc/installer/templates/downloads-list-compact.php

https://bitbucket.org/acipriani/madeinapulia.com
PHP | 58 lines | 53 code | 5 blank | 0 comment | 7 complexity | b8730980f9d022cf371030c528925a71 MD5 | raw file
Possible License(s): GPL-3.0, MIT, BSD-3-Clause, LGPL-2.1, GPL-2.0, Apache-2.0
  1. <form method="post" class="otgsi_downloads_form">
  2. <table class="installer-plugins-list-compact">
  3. <thead>
  4. <tr>
  5. <th>&nbsp;</th>
  6. <th><?php _e('Plugin', 'installer') ?></th>
  7. <th><img src="<?php echo $this->plugin_url() ?>/res/img/globe.png" alt="<?php esc_attr_e('Available', 'installer') ?>" width="16" height="16"></th>
  8. <th><img src="<?php echo $this->plugin_url() ?>/res/img/computer.png" alt="<?php esc_attr_e('Installed', 'installer') ?>" width="16" height="16"></th>
  9. <th><img src="<?php echo $this->plugin_url() ?>/res/img/dn2.gif" alt="<?php esc_attr_e('Downloading', 'installer') ?>" width="16" height="16"></th>
  10. <th><img src="<?php echo $this->plugin_url() ?>/res/img/on.png" alt="<?php esc_attr_e('Activate', 'installer') ?>" width="16" height="16"></th>
  11. </tr>
  12. </thead>
  13. <tbody>
  14. <?php foreach($product['downloads'] as $download): ?>
  15. <?php if(empty($tr_oddeven) || $tr_oddeven == 'even') $tr_oddeven = 'odd'; else $tr_oddeven = 'even'; ?>
  16. <tr class="<?php echo $tr_oddeven ?>">
  17. <td>
  18. <label>
  19. <?php
  20. $url = $this->append_site_key_to_download_url($download['url'], $site_key);
  21. ?>
  22. <input type="checkbox" name="downloads[]" value="<?php echo base64_encode(json_encode(array('url' => $url,
  23. 'basename' => $download['basename'], 'nonce' => wp_create_nonce('install_plugin_' . $url)))); ?>" <?php
  24. if($expired || $this->plugin_is_installed($download['name'], $download['basename'], $download['version'])): ?>disabled="disabled"<?php endif; ?> />&nbsp;
  25. </label>
  26. </td>
  27. <td><?php echo $download['name'] ?></td>
  28. <td><?php echo $download['version'] ?></td>
  29. <td>
  30. <?php if($v = $this->plugin_is_installed($download['name'], $download['basename'])): $class = version_compare($v, $download['version'], '>=') ? 'installer-green-text' : 'installer-red-text'; ?>
  31. <span class="<?php echo $class ?>"><?php echo $v; ?></span>
  32. <?php endif; ?>
  33. </td>
  34. <td class="twelve">
  35. <div class="installer-status-downloading"><?php _e('downloading...', 'installer') ?></div>
  36. <div class="installer-status-downloaded" data-fail="<?php _e('failed!', 'installer') ?>"><?php _e('downloaded', 'installer') ?></div>
  37. </td>
  38. <td class="twelve">
  39. <div class="installer-status-activating"><?php _e('activating', 'installer') ?></div>
  40. <div class="installer-status-activated"><?php _e('activated', 'installer') ?></div>
  41. </td>
  42. </tr>
  43. <?php endforeach; ?>
  44. </tbody>
  45. </table>
  46. <br />
  47. <input type="submit" class="button-secondary" value="<?php esc_attr_e('Download', 'installer') ?>" disabled="disabled" />
  48. &nbsp;
  49. <label><input name="activate" type="checkbox" value="1" disabled="disabled" />&nbsp;<?php _e('Activate after download', 'installer') ?></label>
  50. <div class="installer-status-success"><p><?php _e('Operation complete!', 'installer') ?></p></div>
  51. <div class="installer-status-fail"><p><?php _e('Operation failed!', 'installer') ?></p></div>
  52. <span class="installer-revalidate-message hidden"><?php _e("Download failed!\n\nClick OK to revalidate your subscription or CANCEL to try again.", 'installer') ?></span>
  53. </form>