diff options
| author | 2019-06-21 08:42:06 +0200 | |
|---|---|---|
| committer | 2019-06-21 08:42:06 +0200 | |
| commit | 2decc82c3eaeaf205295667e836087f309156822 (patch) | |
| tree | 7a93066acdb15e57b695a4627b1278b771e8417c /app | |
| 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')
| -rw-r--r-- | app/Controllers/subscriptionController.php | 46 | ||||
| -rw-r--r-- | app/Models/Category.php | 7 | ||||
| -rw-r--r-- | app/Models/CategoryDAO.php | 1 | ||||
| -rw-r--r-- | app/i18n/cz/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/de/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/en/sub.php | 4 | ||||
| -rwxr-xr-x | app/i18n/es/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/fr/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/he/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/it/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/kr/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/nl/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/oc/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/pt-br/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/ru/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/tr/sub.php | 4 | ||||
| -rw-r--r-- | app/i18n/zh-cn/sub.php | 4 | ||||
| -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 |
22 files changed, 139 insertions, 63 deletions
diff --git a/app/Controllers/subscriptionController.php b/app/Controllers/subscriptionController.php index 9cf41ed0b..79da39751 100644 --- a/app/Controllers/subscriptionController.php +++ b/app/Controllers/subscriptionController.php @@ -35,9 +35,20 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { $this->view->onlyFeedsWithError = Minz_Request::paramTernary('error'); $id = Minz_Request::param('id'); - if ($id !== false) { - $feedDAO = FreshRSS_Factory::createFeedDao(); - $this->view->feed = $feedDAO->searchById($id); + $this->view->displaySlider = false; + if (false !== $id) { + $type = Minz_Request::param('type'); + $this->view->displaySlider = true; + switch ($type) { + case 'category': + $categoryDAO = FreshRSS_Factory::createCategoryDao(); + $this->view->category = $categoryDAO->searchById($id); + break; + default: + $feedDAO = FreshRSS_Factory::createFeedDao(); + $this->view->feed = $feedDAO->searchById($id); + break; + } } } @@ -140,6 +151,35 @@ class FreshRSS_subscription_Controller extends Minz_ActionController { } } + public function categoryAction() { + $this->view->_useLayout(false); + + $categoryDAO = FreshRSS_Factory::createCategoryDao(); + + $id = Minz_Request::param('id'); + $category = $categoryDAO->searchById($id); + if ($id === false || null === $category) { + Minz_Error::error(404); + return; + } + $this->view->category = $category; + + if (Minz_Request::isPost()) { + $values = array( + 'name' => Minz_Request::param('name', ''), + ); + + invalidateHttpCache(); + + $url_redirect = array('c' => 'subscription', 'params' => array('id' => $id, 'type' => 'category')); + if (false !== $categoryDAO->updateCategory($id, $values)) { + Minz_Request::good(_t('feedback.sub.category.updated'), $url_redirect); + } else { + Minz_Request::bad(_t('feedback.sub.category.error'), $url_redirect); + } + } + } + /** * This action displays the bookmarklet page. */ diff --git a/app/Models/Category.php b/app/Models/Category.php index 240dbca73..fa711aa66 100644 --- a/app/Models/Category.php +++ b/app/Models/Category.php @@ -7,6 +7,7 @@ class FreshRSS_Category extends Minz_Model { private $nbNotRead = -1; private $feeds = null; private $hasFeedsWithError = false; + private $isDefault = false; public function __construct($name = '', $feeds = null) { $this->_name($name); @@ -28,6 +29,9 @@ class FreshRSS_Category extends Minz_Model { public function name() { return $this->name; } + public function isDefault() { + return $this->isDefault; + } public function nbFeed() { if ($this->nbFeed < 0) { $catDAO = FreshRSS_Factory::createCategoryDao(); @@ -70,6 +74,9 @@ class FreshRSS_Category extends Minz_Model { public function _name($value) { $this->name = trim($value); } + public function _isDefault($value) { + $this->isDefault = $value; + } public function _feeds($values) { if (!is_array($values)) { $values = array($values); diff --git a/app/Models/CategoryDAO.php b/app/Models/CategoryDAO.php index ba7eb765e..6535adae7 100644 --- a/app/Models/CategoryDAO.php +++ b/app/Models/CategoryDAO.php @@ -282,6 +282,7 @@ class FreshRSS_CategoryDAO extends Minz_ModelPdo implements FreshRSS_Searchable $dao['name'] ); $cat->_id($dao['id']); + $cat->_isDefault(static::DEFAULTCATEGORYID === intval($dao['id'])); $list[$key] = $cat; } diff --git a/app/i18n/cz/sub.php b/app/i18n/cz/sub.php index 2e81c928d..b2bdf416b 100644 --- a/app/i18n/cz/sub.php +++ b/app/i18n/cz/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Kategorie', 'add' => 'Přidat kategorii', 'empty' => 'Vyprázdit kategorii', + 'information' => 'Informace', 'new' => 'Nová kategorie', + 'title' => 'Název', ), 'feed' => array( 'add' => 'Přidat RSS kanál', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Informace', + 'information' => 'Informace', 'keep_history' => 'Zachovat tento minimální počet článků', 'moved_category_deleted' => 'Po smazání kategorie budou v ní obsažené kanály automaticky přesunuty do <em>%s</em>.', 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/de/sub.php b/app/i18n/de/sub.php index bd050671e..abc01b954 100644 --- a/app/i18n/de/sub.php +++ b/app/i18n/de/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Kategorie', 'add' => 'Eine Kategorie hinzufügen', 'empty' => 'Leere Kategorie', + 'information' => 'Information', 'new' => 'Neue Kategorie', + 'title' => 'Titel', ), 'feed' => array( 'add' => 'Einen RSS-Feed hinzufügen', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Information', + 'information' => 'Information', 'keep_history' => 'Minimale Anzahl an Artikeln, die behalten wird', 'moved_category_deleted' => 'Wenn Sie eine Kategorie entfernen, werden deren Feeds automatisch in die Kategorie <em>%s</em> eingefügt.', 'mute' => 'Stumm schalten', diff --git a/app/i18n/en/sub.php b/app/i18n/en/sub.php index f11eb9b99..fde01f9df 100644 --- a/app/i18n/en/sub.php +++ b/app/i18n/en/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Category', 'add' => 'Add a category', 'empty' => 'Empty category', + 'information' => 'Information', 'new' => 'New category', + 'title' => 'Title', ), 'feed' => array( 'add' => 'Add a RSS feed', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', 'help' => 'Write one search filter per line.', ), - 'informations' => 'Information', + 'information' => 'Information', 'keep_history' => 'Minimum number of articles to keep', 'moved_category_deleted' => 'When you delete a category, its feeds are automatically classified under <em>%s</em>.', 'mute' => 'mute', diff --git a/app/i18n/es/sub.php b/app/i18n/es/sub.php index c0526106f..7d33c59fa 100755 --- a/app/i18n/es/sub.php +++ b/app/i18n/es/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Categoría', 'add' => 'Añadir a la categoría', 'empty' => 'Vaciar categoría', + 'information' => 'Información', 'new' => 'Nueva categoría', + 'title' => 'Título', ), 'feed' => array( 'add' => 'Añadir fuente RSS', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Información', + 'information' => 'Información', 'keep_history' => 'Número mínimo de artículos a conservar', 'moved_category_deleted' => 'Al borrar una categoría todas sus fuentes pasan automáticamente a la categoría <em>%s</em>.', 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/fr/sub.php b/app/i18n/fr/sub.php index b71019faa..df44150c2 100644 --- a/app/i18n/fr/sub.php +++ b/app/i18n/fr/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Catégorie', 'add' => 'Ajouter une catégorie', 'empty' => 'Catégorie vide', + 'information' => 'Informations', 'new' => 'Nouvelle catégorie', + 'title' => 'Titre', ), 'feed' => array( 'add' => 'Ajouter un flux RSS', @@ -37,7 +39,7 @@ return array( '_' => 'Filtres d’action', 'help' => 'Écrivez une recherche par ligne.', ), - 'informations' => 'Informations', + 'information' => 'Informations', 'keep_history' => 'Nombre minimum d’articles à conserver', 'moved_category_deleted' => 'Lors de la suppression d’une catégorie, ses flux seront automatiquement classés dans <em>%s</em>.', 'mute' => 'muet', diff --git a/app/i18n/he/sub.php b/app/i18n/he/sub.php index bb2025bc3..8a629defb 100644 --- a/app/i18n/he/sub.php +++ b/app/i18n/he/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'קטגוריה', 'add' => 'הוספת קטגוריה', 'empty' => 'Empty category', //TODO - Translation + 'information' => 'מידע', 'new' => 'קטגוריה חדשה', + 'title' => 'כותרת', ), 'feed' => array( 'add' => 'הוספת הזנה', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'מידע', + 'information' => 'מידע', 'keep_history' => 'מסםר מינימלי של מאמרים לשמור', 'moved_category_deleted' => 'כאשר הקטגוריה נמחקת ההזנות שבתוכה אוטומטית מקוטלגות תחת <em>%s</em>.', 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/it/sub.php b/app/i18n/it/sub.php index bf279e059..50738d9e3 100644 --- a/app/i18n/it/sub.php +++ b/app/i18n/it/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Categoria', 'add' => 'Aggiungi una categoria', 'empty' => 'Categoria vuota', + 'information' => 'Informazioni', 'new' => 'Nuova categoria', + 'title' => 'Titolo', ), 'feed' => array( 'add' => 'Aggiungi un Feed RSS', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Informazioni', + 'information' => 'Informazioni', 'keep_history' => 'Numero minimo di articoli da mantenere', 'moved_category_deleted' => 'Cancellando una categoria i feed al suo interno verranno classificati automaticamente come <em>%s</em>.', 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/kr/sub.php b/app/i18n/kr/sub.php index 151775c1c..f8eccfa27 100644 --- a/app/i18n/kr/sub.php +++ b/app/i18n/kr/sub.php @@ -14,7 +14,9 @@ return array( '_' => '카테고리', 'add' => '카테고리 추가', 'empty' => '빈 카테고리', + 'information' => '정보', 'new' => '새 카테고리', + 'title' => '제목', ), 'feed' => array( 'add' => 'RSS 피드 추가', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => '정보', + 'information' => '정보', 'keep_history' => '최소 유지 글 개수', 'moved_category_deleted' => '카테고리를 삭제하면, 해당 카테고리 아래에 있던 피드들은 자동적으로 <em>%s</em> 아래로 분류됩니다.', 'mute' => '무기한 새로고침 금지', diff --git a/app/i18n/nl/sub.php b/app/i18n/nl/sub.php index 8ba9c020d..b59515f42 100644 --- a/app/i18n/nl/sub.php +++ b/app/i18n/nl/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Categorie', 'add' => 'Voeg categorie toe', 'empty' => 'Lege categorie', + 'information' => 'Informatie', 'new' => 'Nieuwe categorie', + 'title' => 'Titel', ), 'feed' => array( 'add' => 'Voeg een RSS feed toe', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Informatie', + 'information' => 'Informatie', 'keep_history' => 'Minimum aantal artikelen om te houden', 'moved_category_deleted' => 'Als u een categorie verwijderd, worden de feeds automatisch geclassificeerd onder <em>%s</em>.', 'mute' => 'demp', diff --git a/app/i18n/oc/sub.php b/app/i18n/oc/sub.php index 5a7bb2b57..eae9dff29 100644 --- a/app/i18n/oc/sub.php +++ b/app/i18n/oc/sub.php @@ -13,7 +13,9 @@ return array( '_' => 'Categoria', 'add' => 'Ajustar una categoria', 'empty' => 'Categoria voida', + 'information' => 'Informacions', 'new' => 'Nòva categoria', + 'title' => 'Títol', ), 'feed' => array( 'add' => 'Ajustar un flux RSS', @@ -36,7 +38,7 @@ return array( '_' => 'Filtre d’accion', 'help' => 'Escrivètz una recèrca per linha.', ), - 'informations' => 'Informacions', + 'information' => 'Informacions', 'keep_history' => 'Nombre minimum d’articles de servar', 'moved_category_deleted' => 'Quand escafatz una categoria, sos fluxes son automaticament classats dins <em>%s</em>.', 'mute' => 'mut', diff --git a/app/i18n/pt-br/sub.php b/app/i18n/pt-br/sub.php index fc26e89e7..d4bea33c4 100644 --- a/app/i18n/pt-br/sub.php +++ b/app/i18n/pt-br/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Categoria', 'add' => 'Adicionar uma categoria', 'empty' => 'Categoria vazia', + 'information' => 'Informações', 'new' => 'Nova categoria', + 'title' => 'Título', ), 'feed' => array( 'add' => 'Adicionar um RSS feed', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Informações', + 'information' => 'Informações', 'keep_history' => 'Número mínimo de artigos para manter', 'moved_category_deleted' => 'Quando você deleta uma categoria, seus feeds são automaticamente classificados como <em>%s</em>.', 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/ru/sub.php b/app/i18n/ru/sub.php index e125d549e..a2c4e4690 100644 --- a/app/i18n/ru/sub.php +++ b/app/i18n/ru/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Category', //TODO - Translation 'add' => 'Add a category', //TODO - Translation 'empty' => 'Empty category', //TODO - Translation + 'information' => 'Information', //TODO - Translation 'new' => 'New category', //TODO - Translation + 'title' => 'Title', //TODO - Translation ), 'feed' => array( 'add' => 'Add a RSS feed', //TODO - Translation @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Information', //TODO - Translation + 'information' => 'Information', //TODO - Translation 'keep_history' => 'Minimum number of articles to keep', //TODO - Translation 'moved_category_deleted' => 'When you delete a category, its feeds are automatically classified under <em>%s</em>.', //TODO - Translation 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/tr/sub.php b/app/i18n/tr/sub.php index 9f4945c0a..858d15758 100644 --- a/app/i18n/tr/sub.php +++ b/app/i18n/tr/sub.php @@ -14,7 +14,9 @@ return array( '_' => 'Kategori', 'add' => 'Kategori ekle', 'empty' => 'Boş kategori', + 'information' => 'Bilgi', 'new' => 'Yeni kategori', + 'title' => 'Başlık', ), 'feed' => array( 'add' => 'RSS akışı ekle', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => 'Bilgi', + 'information' => 'Bilgi', 'keep_history' => 'En az tutulacak makale sayısı', 'moved_category_deleted' => 'Bir kategoriyi silerseniz, içerisindeki akışlar <em>%s</em> içerisine yerleşir.', 'mute' => 'mute', //TODO - Translation diff --git a/app/i18n/zh-cn/sub.php b/app/i18n/zh-cn/sub.php index 90f9fd942..bf517756b 100644 --- a/app/i18n/zh-cn/sub.php +++ b/app/i18n/zh-cn/sub.php @@ -14,7 +14,9 @@ return array( '_' => '分类', 'add' => '添加分类', 'empty' => '空分类', + 'information' => '信息', 'new' => '新分类', + 'title' => '标题', ), 'feed' => array( 'add' => '添加 RSS 源', @@ -37,7 +39,7 @@ return array( '_' => 'Filter actions', //TODO - Translation 'help' => 'Write one search filter per line.', //TODO - Translation ), - 'informations' => '信息', + 'information' => '信息', 'keep_history' => '至少保存的文章数', 'moved_category_deleted' => '删除分类时,其中的 RSS 源会自动归类到 <em>%s</em>', 'mute' => '暂停', 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> |
