archiving.phtml 2.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. <?php $this->partial('aside_configure'); ?>
  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', 'archiving'); ?>">
  5. <legend><?php echo Minz_Translate::t('archiving_configuration'); ?></legend>
  6. <p><?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('archiving_configuration_help'); ?></p>
  7. <div class="form-group">
  8. <label class="group-name" for="old_entries"><?php echo Minz_Translate::t('delete_articles_every'); ?></label>
  9. <div class="group-controls">
  10. <input type="number" id="old_entries" name="old_entries" min="1" max="1200" value="<?php echo $this->conf->old_entries; ?>" /> <?php echo Minz_Translate::t('month'); ?>
  11.   <a class="btn confirm" href="<?php echo _url('entry', 'purge'); ?>"><?php echo Minz_Translate::t('purge_now'); ?></a>
  12. </div>
  13. </div>
  14. <div class="form-group">
  15. <label class="group-name" for="keep_history_default"><?php echo Minz_Translate::t('keep_history'), ' ', Minz_Translate::t('by_feed'); ?></label>
  16. <div class="group-controls">
  17. <select class="number" name="keep_history_default" id="keep_history_default" required="required"><?php
  18. foreach (array('' => '', 0 => '0', 10 => '10', 50 => '50', 100 => '100', 500 => '500', 1000 => '1 000', 5000 => '5 000', 10000 => '10 000', -1 => '∞') as $v => $t) {
  19. echo '<option value="' . $v . ($this->conf->keep_history_default == $v ? '" selected="selected' : '') . '">' . $t . ' </option>';
  20. }
  21. ?></select> (<?php echo Minz_Translate::t('by_default'); ?>)
  22. </div>
  23. </div>
  24. <div class="form-group form-actions">
  25. <div class="group-controls">
  26. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
  27. <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
  28. </div>
  29. </div>
  30. </form>
  31. <form method="post" action="<?php echo _url('entry', 'optimize'); ?>">
  32. <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
  33. <div class="form-group">
  34. <p class="group-name"><?php echo Minz_Translate::t('current_user'); ?></p>
  35. <div class="group-controls">
  36. <p><?php echo formatNumber($this->nb_total), ' ', Minz_Translate::t('articles'), ', ', formatBytes($this->size_user); ?></p>
  37. <input type="hidden" name="optimiseDatabase" value="1" />
  38. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('optimize_bdd'); ?></button>
  39. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('optimize_todo_sometimes'); ?>
  40. </div>
  41. </div>
  42. <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?>
  43. <div class="form-group">
  44. <p class="group-name"><?php echo Minz_Translate::t('users'); ?></p>
  45. <div class="group-controls">
  46. <p><?php echo formatBytes($this->size_total); ?></p>
  47. </div>
  48. </div>
  49. <?php } ?>
  50. </form>
  51. </div>