3
1

index.php 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <div class="page-header">
  2. <h2><?= $title ?></h2>
  3. </div>
  4. <?php /* Display notices about missing/extra templates */ ?>
  5. <?php if (!empty($missing_templates)): ?>
  6. <div class="alert alert-info">
  7. <h4 style="margin-top: 0;"><?= t("Missing Templates") ?></h4>
  8. <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>
  9. <ul style="list-style-type: disc; margin-left: 20px;">
  10. <?php foreach ($missing_templates as $template): ?><li><?= $template ?>.php</li><?php endforeach ?>
  11. </ul>
  12. </div>
  13. <?php endif ?>
  14. <?php if (!empty($extra_templates)): ?>
  15. <div class="alert alert-warning">
  16. <h4 style="margin-top: 0;"><?= t("Extra Templates") ?></h4>
  17. <p><?= t('The following templates exist in your plugin but not in the core application. They will be ignored during the override process.') ?></p>
  18. <ul style="list-style-type: disc; margin-left: 20px;">
  19. <?php foreach ($extra_templates as $template): ?><li><?= $template ?>.php</li><?php endforeach ?>
  20. </ul>
  21. </div>
  22. <?php endif ?>
  23. <ul class="listing"><?php foreach ($templates as $index => $template): ?>
  24. <li>
  25. <?php
  26. $templateName = basename($template);
  27. $isModified = isset($modified_status[$templateName . ".php"]);
  28. ?><?= $this->url->link($template, 'TemplateController', 'edit', ['plugin' => 'OMITemplateModder', 'template_index' => $index]) ?>
  29. <?php if ($isModified): ?><span style="color:red;font-weight:bold;">*</span><?php endif ?>
  30. </li>
  31. <?php endforeach ?></ul>
  32. <p style="margin-top:2em;">
  33. <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>
  34. </p>