diff options
| author | 2018-01-01 20:34:06 +0100 | |
|---|---|---|
| committer | 2018-01-01 20:34:06 +0100 | |
| commit | 8c2113f9e6eb86b630a4e861513229d7abf219b8 (patch) | |
| tree | 6e9ca68cf291a21d573f82ff7818c66e40a7ec30 /app/views | |
| parent | e73fae159168b1ed9c0469e1d5bce55a3ef1f911 (diff) | |
Add mute strategy configuration (#1750)
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 19 | ||||
| -rw-r--r-- | app/views/index/global.phtml | 2 | ||||
| -rw-r--r-- | app/views/subscription/index.phtml | 2 |
3 files changed, 14 insertions, 9 deletions
diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index bf87a255a..595309f49 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -65,12 +65,13 @@ </div> </div> <div class="form-group"> - <label class="group-name" for="priority"><?php echo _t('sub.feed.in_main_stream'); ?></label> + <label class="group-name" for="priority"><?php echo _t('sub.feed.priority'); ?></label> <div class="group-controls"> - <label class="checkbox" for="priority"> - <input type="checkbox" name="priority" id="priority" value="10"<?php echo $this->feed->priority() > 0 ? ' checked="checked"' : ''; ?> /> - <?php echo _t('gen.short.yes'); ?> - </label> + <select name="priority" id="priority"> + <option value='<?php echo FreshRSS_Feed::PRIORITY_MAIN_STREAM;?>' <?php if (FreshRSS_Feed::PRIORITY_MAIN_STREAM === $this->feed->priority()) {echo 'selected="selected"';}?>><?php echo _t('sub.feed.priority.main_stream'); ?></option> + <option value='<?php echo FreshRSS_Feed::PRIORITY_NORMAL;?>' <?php if (FreshRSS_Feed::PRIORITY_NORMAL === $this->feed->priority()) {echo 'selected="selected"';}?>><?php echo _t('sub.feed.priority.normal'); ?></option> + <option value='<?php echo FreshRSS_Feed::PRIORITY_ARCHIVED;?>' <?php if (FreshRSS_Feed::PRIORITY_ARCHIVED === $this->feed->priority()) {echo 'selected="selected"';}?>><?php echo _t('sub.feed.priority.archived'); ?></option> + </select> </div> </div> @@ -111,11 +112,11 @@ <div class="group-controls"> <select class="number" name="ttl" id="ttl" required="required"><?php $found = false; - foreach (array(-2 => _t('gen.short.by_default'), 900 => '15min', 1200 => '20min', 1500 => '25min', 1800 => '30min', 2700 => '45min', + foreach (array(FreshRSS_Feed::TTL_DEFAULT => _t('gen.short.by_default'), 900 => '15min', 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', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo', -1 => '∞') as $v => $t) { + 604800 => '1wk', 1209600 => '2wk', 1814400 => '3wk', 2419200 => '4wk', 2629744 => '1mo') as $v => $t) { echo '<option value="' . $v . ($this->feed->ttl() === $v ? '" selected="selected' : '') . '">' . $t . '</option>'; if ($this->feed->ttl() == $v) { $found = true; @@ -125,6 +126,10 @@ echo '<option value="' . intval($this->feed->ttl()) . '" selected="selected">' . intval($this->feed->ttl()) . 's</option>'; } ?></select> + <label for="mute"> + <input type="checkbox" name="mute" id="mute" value="1"<?php echo $this->feed->mute() ? ' checked="checked"' : ''; ?> /> + <?php echo _t('sub.feed.mute'); ?> + </label> </div> </div> <div class="form-group"> diff --git a/app/views/index/global.phtml b/app/views/index/global.phtml index f35732c8f..2f25b6dc2 100644 --- a/app/views/index/global.phtml +++ b/app/views/index/global.phtml @@ -37,7 +37,7 @@ $empty = $feed->nbEntries() === 0 ? ' empty' : ''; $url_base['params']['get'] = 'f_' . $feed->id(); ?> - <li id="f_<?php echo $feed->id(); ?>" class="item feed<?php echo $error, $empty; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>" data-priority="<?php echo $feed->priority(); ?>"> + <li id="f_<?php echo $feed->id(); ?>" class="item feed<?php echo $error, $empty, $feed->mute() ? ' mute' : ''; ?>" data-unread="<?php echo $feed->nbNotRead(); ?>" data-priority="<?php echo $feed->priority(); ?>"> <img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" /> <a class="item-title" data-unread="<?php echo format_number($feed->nbNotRead()); ?>" href="<?php echo Minz_Url::display($url_base); ?>"><?php echo $feed->name(); ?></a> </li> diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index 48f760d3e..26af0bd7c 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -125,7 +125,7 @@ $error = $feed->inError() ? ' error' : ''; $empty = $feed->nbEntries() == 0 ? ' empty' : ''; ?> - <li class="item feed<?php echo $error, $empty; ?>" + <li class="item feed<?php echo $error, $empty, $feed->mute() ? ' mute': ''; ?>" draggable="true" data-feed-id="<?php echo $feed->id(); ?>" dropzone="move"> |
