categorize.phtml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php $this->partial ('aside_feed'); ?>
  2. <div class="post">
  3. <a href="<?php echo _url ('index', 'index'); ?>"><?php echo Minz_Translate::t ('back_to_rss_feeds'); ?></a>
  4. <form method="post" action="<?php echo _url ('configure', 'categorize'); ?>">
  5. <legend><?php echo Minz_Translate::t ('categories_management'); ?></legend>
  6. <p class="alert alert-warn"><?php echo Minz_Translate::t ('feeds_moved_category_deleted', $this->defaultCategory->name ()); ?></p>
  7. <?php $i = 0; foreach ($this->categories as $cat) { $i++; ?>
  8. <div class="form-group">
  9. <label class="group-name" for="cat_<?php echo $cat->id (); ?>">
  10. <?php echo Minz_Translate::t ('category_number', $i); ?>
  11. </label>
  12. <div class="group-controls">
  13. <div class="stick">
  14. <input type="text" id="cat_<?php echo $cat->id (); ?>" name="categories[]" value="<?php echo $cat->name (); ?>" />
  15. <?php if ($cat->nbFeed () > 0) { ?>
  16. <a class="btn" href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id ()); ?>">
  17. <?php echo _i('link'); ?>
  18. </a>
  19. <button formaction="<?php echo _url('feed', 'delete', 'id', $cat->id (), 'type', 'category'); ?>"
  20. class="btn btn-attention confirm"
  21. data-str-confirm="<?php echo _t('confirm_action_feed_cat'); ?>"
  22. type="submit"><?php echo _t('ask_empty'); ?></button>
  23. <?php } ?>
  24. </div>
  25. (<?php echo Minz_Translate::t ('number_feeds', $cat->nbFeed ()); ?>)
  26. <?php if ($cat->id () === $this->defaultCategory->id ()) { ?>
  27. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t ('can_not_be_deleted'); ?>
  28. <?php } ?>
  29. <input type="hidden" name="ids[]" value="<?php echo $cat->id (); ?>" />
  30. </div>
  31. </div>
  32. <?php } ?>
  33. <div class="form-group">
  34. <label class="group-name" for="new_category"><?php echo Minz_Translate::t ('add_category'); ?></label>
  35. <div class="group-controls">
  36. <input type="text" id="new_category" name="new_category" placeholder="<?php echo Minz_Translate::t ('new_category'); ?>" />
  37. </div>
  38. </div>
  39. <div class="form-group form-actions">
  40. <div class="group-controls">
  41. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t ('save'); ?></button>
  42. <button type="reset" class="btn"><?php echo Minz_Translate::t ('cancel'); ?></button>
  43. </div>
  44. </div>
  45. </form>
  46. </div>