invalid.php 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. * Displays an invalid plugin on the admin screen.
  4. *
  5. * An invalid plugin is a plugin whose isValid() method returns false.
  6. * This usually means there are required files missing, unreadable or in the
  7. * wrong format.
  8. *
  9. * @package Elgg.Core
  10. * @subpackage Plugins
  11. */
  12. /* @var ElggPlugin $plugin */
  13. $plugin = $vars['entity'];
  14. $id = $plugin->getID();
  15. $path = htmlspecialchars($plugin->getPath());
  16. $message = elgg_echo('admin:plugins:warning:invalid', array($plugin->getError()));
  17. $css_id = preg_replace('/[^a-z0-9-]/i', '-', $plugin->getID());
  18. ?>
  19. <div class="elgg-state-draggable elgg-plugin elgg-state-inactive elgg-state-error" id="elgg-plugin-<?php echo $plugin->guid; ?>">
  20. <div class="elgg-head"><h3><?php echo $id; ?></h3></div>
  21. <div class="elgg-body">
  22. <p class="elgg-state-error"><?php echo $message; ?></p>
  23. <p><?php echo elgg_echo('admin:plugins:warning:invalid:check_docs'); ?></p>
  24. <div class="pts">
  25. <?php
  26. echo elgg_view('output/url', array(
  27. 'href' => "#elgg-plugin-manifest-$css_id",
  28. 'text' => elgg_echo("admin:plugins:label:moreinfo"),
  29. 'rel' => 'toggle',
  30. ));
  31. ?>
  32. </div>
  33. <div class="hidden elgg-plugin-more" id="elgg-plugin-manifest-<?php echo $css_id; ?>">
  34. <p><?php echo elgg_echo('admin:plugins:label:location') . ": " . $path; ?></p>
  35. </div>
  36. </div>
  37. </div>