SproutCMS

This is the code documentation for the SproutCMS project

source of /sprout/views/admin/main_tags.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. use Sprout\Helpers\Needs;
  19.  
  20. Needs::fileGroup('tags_ui');
  21. ?>
  22.  
  23. <script type="text/javascript">
  24. var table = '<?php echo Enc::js($table); ?>';
  25. </script>
  26.  
  27.  
  28. <div id="tags-wrapper" class="page-edit-tab">
  29. <div class="heading-with-buttons">
  30. <button class="button button-small button-grey icon-close icon-after page-edit-tab-close" type="button" data-target="tags-wrapper">Close</button>
  31. <h3 class="h2 icon-before icon-local_offer">Tags</h3>
  32. </div>
  33.  
  34. <div class="white-box">
  35. <div class="field-element field-element--white field-element--text">
  36. <div class="field-label">
  37. <label for="tags-text">Tags</label>
  38. <div class="field-helper">
  39. Lowercase comma-separated words, can contain letters, numbers and dashes
  40. </div>
  41. </div>
  42. <div class="field-input">
  43. <input type="text" name="tags" class="textbox" value="<?php echo Enc::html($current_tags); ?>" id="tags-text" autocomplete="off">
  44. </div>
  45. </div>
  46.  
  47.  
  48.  
  49. <p class="tags-suggest">
  50. <?php
  51. foreach ($suggestions as $tag) {
  52. if (strpos($current_tags, $tag) === false) {
  53. echo " <a href=\"#\">{$tag}</a>";
  54. } else {
  55. echo " <a href=\"#\" class=\"selected\">{$tag}</a>";
  56. }
  57. }
  58. ?>
  59. </p>
  60. </div>
  61. </div>
  62.