archiving.phtml 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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">
  25. <label class="group-name" for="ttl_default"><?php echo Minz_Translate::t('ttl'); ?></label>
  26. <div class="group-controls">
  27. <select class="number" name="ttl_default" id="ttl_default" required="required"><?php
  28. $found = false;
  29. foreach (array(1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
  30. 3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
  31. 36000 => '10h', 43200 => '12h', 64800 => '18h',
  32. 86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
  33. 604800 => '1wk', -1 => '∞') as $v => $t) {
  34. echo '<option value="' . $v . ($this->conf->ttl_default == $v ? '" selected="selected' : '') . '">' . $t . '</option>';
  35. if ($this->conf->ttl_default == $v) {
  36. $found = true;
  37. }
  38. }
  39. if (!$found) {
  40. echo '<option value="' . intval($this->conf->ttl_default) . '" selected="selected">' . intval($this->conf->ttl_default) . 's</option>';
  41. }
  42. ?></select> (<?php echo Minz_Translate::t('by_default'); ?>)
  43. </div>
  44. </div>
  45. <div class="form-group form-actions">
  46. <div class="group-controls">
  47. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('save'); ?></button>
  48. <button type="reset" class="btn"><?php echo Minz_Translate::t('cancel'); ?></button>
  49. </div>
  50. </div>
  51. </form>
  52. <form method="post" action="<?php echo _url('entry', 'optimize'); ?>">
  53. <legend><?php echo Minz_Translate::t ('advanced'); ?></legend>
  54. <div class="form-group">
  55. <p class="group-name"><?php echo Minz_Translate::t('current_user'); ?></p>
  56. <div class="group-controls">
  57. <p><?php echo formatNumber($this->nb_total), ' ', Minz_Translate::t('articles'), ', ', formatBytes($this->size_user); ?></p>
  58. <input type="hidden" name="optimiseDatabase" value="1" />
  59. <button type="submit" class="btn btn-important"><?php echo Minz_Translate::t('optimize_bdd'); ?></button>
  60. <?php echo FreshRSS_Themes::icon('help'); ?> <?php echo Minz_Translate::t('optimize_todo_sometimes'); ?>
  61. </div>
  62. </div>
  63. <?php if (Minz_Configuration::isAdmin(Minz_Session::param('currentUser', '_'))) { ?>
  64. <div class="form-group">
  65. <p class="group-name"><?php echo Minz_Translate::t('users'); ?></p>
  66. <div class="group-controls">
  67. <p><?php echo formatBytes($this->size_total); ?></p>
  68. </div>
  69. </div>
  70. <?php } ?>
  71. </form>
  72. </div>