3
1

index.php 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <div class="page-header">
  2. <h2><?= $title ?></h2>
  3. </div>
  4. <p style="margin-bottom:1em;">
  5. <span style="color:red;font-weight:bold;">*</span><i>Indicates a template that has been modified from the core version.</i>
  6. </p>
  7. <?php /* Display notices about missing/extra templates */ ?>
  8. <?php if (!empty($missing_templates)): ?>
  9. <div class="alert alert-info">
  10. <h4 style="margin-top: 0;"><?= t("Missing Templates") ?></h4>
  11. <p><?= t('The following core notification templates are not available in your plugin. To use them, copy the files from "%s" to "%s".', 'app/Template/notification/', 'plugins/OMITemplateModder/Template/notification/') ?></p>
  12. <ul style="list-style-type: disc; margin-left: 20px;">
  13. <?php foreach ($missing_templates as $template): ?><li><?= $template ?>.php</li><?php endforeach ?>
  14. </ul>
  15. </div>
  16. <?php endif ?>
  17. <?php if (!empty($extra_templates)): ?>
  18. <div class="alert alert-warning">
  19. <h4 style="margin-top: 0;"><?= t("Extra Templates") ?></h4>
  20. <p><?= t('The following templates exist in your plugin but not in the core application. They will be ignored during the override process.') ?></p>
  21. <ul style="list-style-type: disc; margin-left: 20px;">
  22. <?php foreach ($extra_templates as $template): ?><li><?= $template ?>.php</li><?php endforeach ?>
  23. </ul>
  24. </div>
  25. <?php endif ?>
  26. <ul class="listing"><?php foreach ($templates as $index => $template): ?>
  27. <li>
  28. <?php
  29. $templateName = basename($template);
  30. $isModified = isset($modified_status[$templateName . ".php"]);
  31. ?><?= $this->url->link($template, 'TemplateController', 'edit', ['plugin' => 'OMITemplateModder', 'template_index' => $index]) ?>
  32. <?php if ($isModified): ?><span style="color:red;font-weight:bold;">*</span><?php endif ?>
  33. </li>
  34. <?php endforeach ?></ul>
  35. <p style="margin-top:2em;">
  36. <i>To add or remove templates, simply copy or delete the corresponding files from this plugin's Templates/notification directory. They will automatically be registered for use.</i>
  37. </p>