SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/page_delete.php

  1. <?php
  2. /*
  3.  * kate: tab-width 4; indent-width 4; space-indent on; word-wrap off; word-wrap-column 120;
  4.  * :tabSize=4:indentSize=4:noTabs=true:wrap=false:maxLineLen=120:mode=php:
  5.  *
  6.  * Copyright (C) 2015 Karmabunny Pty Ltd.
  7.  *
  8.  * This file is a part of SproutCMS.
  9.  *
  10.  * SproutCMS is free software: you can redistribute it and/or modify it under the terms
  11.  * of the GNU General Public License as published by the Free Software Foundation, either
  12.  * version 3 of the License, or (at your option) any later version.
  13.  *
  14.  * For more information, visit <http://getsproutcms.com>.
  15.  */
  16.  
  17. use Sprout\Helpers\Enc;
  18.  
  19.  
  20. if (empty($child_pages)) {
  21. $a = 'this page';
  22. $b = 'Delete page';
  23.  
  24. } else {
  25. $count = count($child_pages) + 1;
  26.  
  27. $a = "these {$count} pages";
  28. $b = "Delete {$count} pages";
  29. }
  30. ?>
  31.  
  32.  
  33.  
  34. <p>You are about to delete <?= $a; ?>:</p>
  35.  
  36. <ul style="margin: 10px 0;">
  37. <li><?= Enc::html($page['name']); ?></li>
  38.  
  39. <?php foreach ($child_pages as $child): ?>
  40. <li>
  41. <?= Enc::html($child['name']); ?>
  42. </li>
  43. <?php endforeach; ?>
  44. </ul>
  45.  
  46. <p>Are you sure you want to do this?</p>
  47.  
  48.  
  49. <p>&nbsp;</p>
  50. <div class="message-bar-warning">
  51. <p>Are you sure you want to delete <?= $a; ?>?</p>
  52. <p>Deleting a page is an irreversible action.</p>
  53. </div>
  54.  
  55.