2014-07-23 15:52:50 +02:00
|
|
|
|
<?php $this->partial('aside_configure'); ?>
|
|
|
|
|
|
|
|
|
|
<div class="post">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<a href="<?php echo _url('index', 'index'); ?>"><?php echo _t('gen.action.back_to_rss_feeds'); ?></a>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
|
|
|
|
|
<form method="post" action="<?php echo _url('configure', 'archiving'); ?>">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<legend><?php echo _t('conf.archiving'); ?></legend>
|
|
|
|
|
<p><?php echo _i('help'); ?> <?php echo _t('conf.archiving.help'); ?></p>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<label class="group-name" for="old_entries"><?php echo _t('conf.archiving.delete_after'); ?></label>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
<div class="group-controls">
|
2015-11-06 16:54:20 +01:00
|
|
|
|
<input type="number" id="old_entries" name="old_entries" min="1" max="1200" value="<?php echo FreshRSS_Context::$user_conf->old_entries; ?>" data-leave-validation="<?php echo FreshRSS_Context::$user_conf->old_entries; ?>"/> <?php echo _t('gen.date.month'); ?>
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<a class="btn confirm" href="<?php echo _url('entry', 'purge'); ?>"><?php echo _t('conf.archiving.purge_now'); ?></a>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<label class="group-name" for="keep_history_default"><?php echo _t('conf.archiving.keep_history_by_feed'); ?></label>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
<div class="group-controls">
|
2015-11-06 16:54:20 +01:00
|
|
|
|
<select class="number" name="keep_history_default" id="keep_history_default" required="required" data-leave-validation="<?php echo FreshRSS_Context::$user_conf->keep_history_default; ?>"><?php
|
2014-07-23 15:52:50 +02:00
|
|
|
|
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) {
|
2015-02-08 18:55:48 +01:00
|
|
|
|
echo '<option value="' . $v . (FreshRSS_Context::$user_conf->keep_history_default == $v ? '" selected="selected' : '') . '">' . $t . ' </option>';
|
2014-07-23 15:52:50 +02:00
|
|
|
|
}
|
2015-02-08 18:55:48 +01:00
|
|
|
|
?></select> (<?php echo _t('gen.short.by_default'); ?>)
|
2014-07-23 15:52:50 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="form-group">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<label class="group-name" for="ttl_default"><?php echo _t('conf.archiving.ttl'); ?></label>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
<div class="group-controls">
|
2015-11-06 16:54:20 +01:00
|
|
|
|
<select class="number" name="ttl_default" id="ttl_default" required="required" data-leave-validation="<?php echo FreshRSS_Context::$user_conf->ttl_default; ?>"><?php
|
2014-07-23 15:52:50 +02:00
|
|
|
|
$found = false;
|
|
|
|
|
foreach (array(1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min',
|
|
|
|
|
3600 => '1h', 5400 => '1.5h', 7200 => '2h', 10800 => '3h', 14400 => '4h', 18800 => '5h', 21600 => '6h', 25200 => '7h', 28800 => '8h',
|
|
|
|
|
36000 => '10h', 43200 => '12h', 64800 => '18h',
|
|
|
|
|
86400 => '1d', 129600 => '1.5d', 172800 => '2d', 259200 => '3d', 345600 => '4d', 432000 => '5d', 518400 => '6d',
|
|
|
|
|
604800 => '1wk', -1 => '∞') as $v => $t) {
|
2015-02-08 18:55:48 +01:00
|
|
|
|
echo '<option value="' . $v . (FreshRSS_Context::$user_conf->ttl_default == $v ? '" selected="selected' : '') . '">' . $t . '</option>';
|
|
|
|
|
if (FreshRSS_Context::$user_conf->ttl_default == $v) {
|
2014-07-23 15:52:50 +02:00
|
|
|
|
$found = true;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
if (!$found) {
|
2015-02-08 18:55:48 +01:00
|
|
|
|
echo '<option value="' . intval(FreshRSS_Context::$user_conf->ttl_default) . '" selected="selected">' . intval(FreshRSS_Context::$user_conf->ttl_default) . 's</option>';
|
2014-07-23 15:52:50 +02:00
|
|
|
|
}
|
2015-02-08 18:55:48 +01:00
|
|
|
|
?></select> (<?php echo _t('gen.short.by_default'); ?>)
|
2014-07-23 15:52:50 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group form-actions">
|
|
|
|
|
<div class="group-controls">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
|
|
|
|
|
<button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
<form method="post" action="<?php echo _url('entry', 'optimize'); ?>">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<legend><?php echo _t('conf.archiving.advanced'); ?></legend>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
|
|
|
|
|
<div class="form-group">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<label class="group-name"><?php echo _t('conf.user.current'); ?></label>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
<div class="group-controls">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<?php echo _t('conf.user.articles_and_size', format_number($this->nb_total), format_bytes($this->size_user)); ?>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<?php if (FreshRSS_Auth::hasAccess('admin')) { ?>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
<div class="form-group">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<label class="group-name"><?php echo _t('conf.user.users'); ?></label>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
<div class="group-controls">
|
2015-02-08 18:55:48 +01:00
|
|
|
|
<?php echo format_bytes($this->size_total); ?>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="form-group form-actions">
|
|
|
|
|
<div class="group-controls">
|
|
|
|
|
<input type="hidden" name="optimiseDatabase" value="1" />
|
|
|
|
|
<button type="submit" class="btn btn-important"><?php echo _t('conf.archiving.optimize'); ?></button>
|
|
|
|
|
<?php echo _i('help'); ?> <?php echo _t('conf.archiving.optimize_help'); ?>
|
2014-07-23 15:52:50 +02:00
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
<?php } ?>
|
|
|
|
|
</form>
|
|
|
|
|
</div>
|