diff options
| author | 2019-10-26 13:16:15 +0200 | |
|---|---|---|
| committer | 2019-10-26 13:16:15 +0200 | |
| commit | f6e10579f2e78dc6403141351e41e2db9a2b6e97 (patch) | |
| tree | 0dd0421974262942e76c3bf4ce404a31aa2d7f2a /app/layout/aside_feed.phtml | |
| parent | 3c49986ec895595edc632da0f14419199ce47667 (diff) | |
Add category order (#2592)
* Add category order
Each category has a new 'priority' attribute. It is used to sort categories in
views. Categories with the same priority are sorted alphabetically. Categories
with no priority are displayed after those with one.
For example, if we have the following categories:
- A (priority: 2)
- B (no priority)
- C (priority: 1)
- D (priority: 2)
- E (no priority)
- F (priority: 1)
They will be displayed in the following order:
- C
- F
- A
- D
- B
- E
See #190
* Shorten help text
It took too much room and will not be so necessary once we have drag &
drop
Diffstat (limited to 'app/layout/aside_feed.phtml')
| -rw-r--r-- | app/layout/aside_feed.phtml | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/layout/aside_feed.phtml b/app/layout/aside_feed.phtml index 4d5682001..e0c90282f 100644 --- a/app/layout/aside_feed.phtml +++ b/app/layout/aside_feed.phtml @@ -63,11 +63,12 @@ <?php foreach ($this->categories as $cat) { $feeds = $cat->feeds(); + $position = $cat->attributes('position'); if (!empty($feeds)) { $c_active = FreshRSS_Context::isCurrentGet('c_' . $cat->id()); $c_show = $c_active || FreshRSS_Context::$user_conf->display_categories; ?> - <li class="tree-folder category<?= $c_active ? ' active' : '' ?>" data-unread="<?= $cat->nbNotRead() ?>"> + <li class="tree-folder category<?= $c_active ? ' active' : '' ?>"<?= null === $position ? '' : "data-position='$position'" ?> data-unread="<?= $cat->nbNotRead() ?>"> <div class="tree-folder-title"> <a class="dropdown-toggle" href="#"><?= _i($c_show ? 'up' : 'down') ?></a> <a class="title<?= $cat->hasFeedsWithError() ? ' error' : '' ?>" data-unread="<?= format_number($cat->nbNotRead()) ?>" href="<?= _url('index', $actual_view, 'get', 'c_' . $cat->id()) ?>"><?= $cat->name() ?></a> |
