add category automatically (#4333)

* Update index.phtml

Added "cat_id" query string to the "Add an RSS feed" link (in div: box)

* Update add.phtml

Function: Select category by query string 'cat_id'

* Update index.phtml

add query string "cat_id"

* Update index.phtml
pull/4334/head
bluewhale235 2 years ago committed by GitHub
parent 347290aae6
commit 20ee2a8470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      app/views/subscription/add.phtml
  2. 2
      app/views/subscription/index.phtml

@ -46,7 +46,7 @@
<div class="group-controls">
<select name="category" id="category">
<?php foreach ($this->categories as $cat) { ?>
<option value="<?= $cat->id() ?>"<?= $cat->id() == 1 ? ' selected="selected"' : '' ?>>
<option value="<?= $cat->id() ?>"<?= $cat->id() == ( Minz_Request::param('cat_id') ?: 1 ) ? ' selected="selected"' : '' ?>>
<?= $cat->name() ?>
</option>
<?php } ?>

@ -60,7 +60,7 @@
?>
<li class="item feed disabled"><div class="alert-warn"><?= _t('sub.category.empty') ?></div></li>
<?php } ?>
<li class="item feed"><a href="<?= _url('subscription', 'add') ?>"><?= _t('sub.feed.add') ?></a></li>
<li class="item feed"><a href="<?= _url('subscription', 'add', 'cat_id', $cat->id()) ?>"><?= _t('sub.feed.add') ?></a></li>
</ul>
</div>
<?php } ?>

Loading…
Cancel
Save