diff options
| author | 2019-06-21 08:42:06 +0200 | |
|---|---|---|
| committer | 2019-06-21 08:42:06 +0200 | |
| commit | 2decc82c3eaeaf205295667e836087f309156822 (patch) | |
| tree | 7a93066acdb15e57b695a4627b1278b771e8417c /app/views | |
| parent | 6cc73d03c34214755d571faba9b3617776021c1c (diff) | |
Change category configuration (#2410)
* Change category configuration
Before, we had a drop-down list to interract on categories. It was not
working the same way as feeds.
Now, categories and feeds behave in a similar manner. At the moment,
there is no change in features but it will allow to expand them.
See #2369
* Minor whitespace
Diffstat (limited to 'app/views')
| -rw-r--r-- | app/views/feed/add.phtml | 2 | ||||
| -rw-r--r-- | app/views/helpers/category/update.phtml | 34 | ||||
| -rw-r--r-- | app/views/helpers/feed/update.phtml | 2 | ||||
| -rw-r--r-- | app/views/subscription/category.phtml | 5 | ||||
| -rw-r--r-- | app/views/subscription/index.phtml | 49 |
5 files changed, 46 insertions, 46 deletions
diff --git a/app/views/feed/add.phtml b/app/views/feed/add.phtml index 823cf1b2f..340970b25 100644 --- a/app/views/feed/add.phtml +++ b/app/views/feed/add.phtml @@ -8,7 +8,7 @@ <form method="post" action="<?php echo _url('feed', 'add'); ?>" autocomplete="off"> <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> - <legend><?php echo _t('sub.feed.informations'); ?></legend> + <legend><?php echo _t('sub.feed.information'); ?></legend> <?php if ($this->load_ok) { ?> <div class="form-group"> <label class="group-name"><?php echo _t('sub.feed.title'); ?></label> diff --git a/app/views/helpers/category/update.phtml b/app/views/helpers/category/update.phtml new file mode 100644 index 000000000..a2ee3e2ef --- /dev/null +++ b/app/views/helpers/category/update.phtml @@ -0,0 +1,34 @@ +<div class="post"> + <h1><?php echo $this->category->name(); ?></h1> + + <div> + <a href="<?php echo _url('index', 'index', 'get', 'c_' . $this->category->id()); ?>"><?php echo _i('link'); ?> <?php echo _t('gen.action.filter'); ?></a> + </div> + + <form method="post" action="<?php echo _url('subscription', 'category', 'id', $this->category->id()); ?>" autocomplete="off"> + <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> + <legend><?php echo _t('sub.category.information'); ?></legend> + <div class="form-group"> + <label class="group-name" for="name"><?php echo _t('sub.category.title'); ?></label> + <div class="group-controls"> + <input type="text" name="name" id="name" class="extend" value="<?php echo $this->category->name() ; ?>" /> + </div> + </div> + + <div class="form-group form-actions"> + <div class="group-controls"> + <button class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button> + <button class="btn btn-attention confirm" + data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>" + formaction="<?php echo _url('category', 'empty', 'id', $this->category->id()); ?>" + formmethod="post"><?php echo _t('gen.action.empty'); ?></button> + <?php if (!$this->category->isDefault()): ?> + <button class="btn btn-attention confirm" + data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>" + formaction="<?php echo _url('category', 'delete', 'id', $this->category->id()); ?>" + formmethod="post"><?php echo _t('gen.action.remove'); ?></button> + <?php endif;?> + </div> + </div> + </form> +</div> diff --git a/app/views/helpers/feed/update.phtml b/app/views/helpers/feed/update.phtml index d6b9885f5..620806d7b 100644 --- a/app/views/helpers/feed/update.phtml +++ b/app/views/helpers/feed/update.phtml @@ -19,7 +19,7 @@ <form method="post" action="<?php echo _url('subscription', 'feed', 'id', $this->feed->id()); ?>" autocomplete="off"> <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> - <legend><?php echo _t('sub.feed.informations'); ?></legend> + <legend><?php echo _t('sub.feed.information'); ?></legend> <div class="form-group"> <label class="group-name" for="name"><?php echo _t('sub.feed.title'); ?></label> <div class="group-controls"> diff --git a/app/views/subscription/category.phtml b/app/views/subscription/category.phtml new file mode 100644 index 000000000..38746f23c --- /dev/null +++ b/app/views/subscription/category.phtml @@ -0,0 +1,5 @@ +<?php + +if ($this->category) { + $this->renderHelper('category/update'); +} diff --git a/app/views/subscription/index.phtml b/app/views/subscription/index.phtml index 8b196cb00..20f72ad66 100644 --- a/app/views/subscription/index.phtml +++ b/app/views/subscription/index.phtml @@ -80,50 +80,9 @@ ?> <div class="box"> <div class="box-title"> - <form action="<?php echo _url('category', 'update', 'id', $cat->id()); ?>" method="post"> - <input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" /> - <input type="text" name="name" value="<?php echo $cat->name(); ?>" /> - - <div class="dropdown"> - <div id="dropdown-cat-<?php echo $cat->id(); ?>" class="dropdown-target"></div> - - <a class="dropdown-toggle btn" href="#dropdown-cat-<?php echo $cat->id(); ?>"><?php echo _i('down'); ?></a> - <ul class="dropdown-menu"> - <li class="dropdown-close"><a href="#close">❌</a></li> - - <li class="item"><a href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id()); ?>"><?php echo _t('gen.action.filter'); ?></a></li> - - <?php - $no_feed = empty($feeds); - $is_default = ($cat->id() === $this->default_category->id()); - - if (!$no_feed || !$is_default) { - ?> - <li class="separator"></li> - <?php } if (!$no_feed) { ?> - <li class="item"> - <button class="as-link confirm" - data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>" - type="submit" - form="controller-category" - formaction="<?php echo _url('category', 'empty', 'id', $cat->id()); ?>"> - <?php echo _t('gen.action.empty'); ?></button> - </li> - <?php } if (!$is_default) { ?> - <li class="item"> - <button class="as-link confirm" - data-str-confirm="<?php echo _t('gen.js.confirm_action_feed_cat'); ?>" - type="submit" - form="controller-category" - formaction="<?php echo _url('category', 'delete', 'id', $cat->id()); ?>"> - <?php echo _t('gen.action.remove'); ?></button> - </li> - <?php } ?> - </ul> - </div> - </form> + <a class="configure open-slider" href="<?php echo _url('subscription', 'category', 'id', $cat->id()); ?>"><?php echo _i('configure'); ?></a> + <?php echo $cat->name(); ?> </div> - <ul class="box-content" data-cat-id="<?php echo $cat->id(); ?>"> <?php if (!empty($feeds)) { ?> <?php @@ -159,12 +118,14 @@ </ul> </div> -<?php $class = isset($this->feed) ? ' class="active"' : ''; ?> +<?php $class = $this->displaySlider ? ' class="active"' : ''; ?> <a href="#" id="close-slider"<?php echo $class; ?>></a> <div id="slider"<?php echo $class; ?>> <?php if (isset($this->feed)) { $this->renderHelper('feed/update'); + } elseif (isset($this->category)) { + $this->renderHelper('category/update'); } ?> </div> |
