editcategories.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Insipid
  4. * Personal web-bookmark-system
  5. *
  6. * Copyright 2016-2021 Johannes Keßler
  7. *
  8. * Development starting from 2011: Johannes Keßler
  9. * https://www.bananas-playground.net/projekt/insipid/
  10. *
  11. * creator:
  12. * Luke Reeves <luke@neuro-tech.net>
  13. *
  14. * This program is free software: you can redistribute it and/or modify
  15. * it under the terms of the GNU General Public License as published by
  16. * the Free Software Foundation, either version 3 of the License, or
  17. * (at your option) any later version.
  18. *
  19. * This program is distributed in the hope that it will be useful,
  20. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  21. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  22. * GNU General Public License for more details.
  23. *
  24. * You should have received a copy of the GNU General Public License
  25. * along with this program. If not, see http://www.gnu.org/licenses/gpl-3.0.
  26. *
  27. */
  28. ?>
  29. <section class="section">
  30. <div class="columns">
  31. <?php require('_headNavIcons.inc.php'); ?>
  32. </div>
  33. <div class="columns">
  34. <div class="column">
  35. <?php if(!empty($subHeadline)) { ?>
  36. <h2 class="is-size-2"><?php echo $subHeadline; ?></h2>
  37. <?php } ?>
  38. <h3><a href="index.php?p=overview&m=tag"><i class="icon ion-md-return-left"></i></a></h3>
  39. </div>
  40. </div>
  41. <?php require('_displaySubmitStatus.inc.php'); ?>
  42. </section>
  43. <section class="section">
  44. <?php if(!empty($categoryCollection)) { ?>
  45. <div class="columns">
  46. <div class="column">
  47. <form method="post">
  48. <table class="table">
  49. <tr>
  50. <th><?php echo $T->t('view.name'); ?></th>
  51. <th><?php echo $T->t('view.new.name'); ?></th>
  52. <th><?php echo $T->t('view.deletion'); ?></th>
  53. </tr>
  54. <?php foreach ($categoryCollection as $k=>$v) { ?>
  55. <tr>
  56. <td>
  57. <a href="index.php?p=overview&m=category&id=<?php echo urlencode($k); ?>"
  58. target="_blank"><?php echo $v['name']; ?></a> <small>(#<?php echo $v['amount']; ?>)</small></td>
  59. <td>
  60. <input class="input" type="text" name="category[<?php echo urlencode($k); ?>]">
  61. </td>
  62. <td>
  63. <input type="checkbox" value="delete" name="deleteCategory[<?php echo urlencode($k); ?>]">
  64. </td>
  65. </tr>
  66. <?php } ?>
  67. <tr>
  68. <td><?php echo $T->t('edit.category.new'); ?></td>
  69. <td>
  70. <input class="input" type="text" name="newCategory">
  71. </td>
  72. <td>
  73. &nbsp;
  74. </td>
  75. </tr>
  76. <tr>
  77. <td colspan="3">
  78. <input type="submit" class="button is-success" name="updateCategories" value="<?php echo $T->t('edit.category.update'); ?>">
  79. </td>
  80. </tr>
  81. </table>
  82. </form>
  83. </div>
  84. </div>
  85. <?php } ?>
  86. </section>