mirror of
https://github.com/FreshRSS/FreshRSS.git
synced 2026-07-29 16:27:45 -04:00
Fix bug #33 : possibilité d'assigner directement la catégorie à un flux lors de son ajout + correction design
This commit is contained in:
@@ -61,6 +61,9 @@ class configureController extends ActionController {
|
||||
}
|
||||
|
||||
public function feedAction () {
|
||||
$catDAO = new CategoryDAO ();
|
||||
$this->view->categories = $catDAO->listCategories ();
|
||||
|
||||
$feedDAO = new FeedDAO ();
|
||||
$this->view->feeds = $feedDAO->listFeeds ();
|
||||
|
||||
|
||||
@@ -15,10 +15,12 @@ class feedController extends ActionController {
|
||||
} else {
|
||||
if (Request::isPost ()) {
|
||||
$url = Request::param ('url_rss');
|
||||
$cat = Request::param ('category');
|
||||
$params = array ();
|
||||
|
||||
try {
|
||||
$feed = new Feed ($url);
|
||||
$feed->_category ($cat);
|
||||
$feed->load ();
|
||||
|
||||
$feedDAO = new FeedDAO ();
|
||||
|
||||
@@ -1,9 +1,28 @@
|
||||
<ul class="nav nav-list aside">
|
||||
<ul class="nav nav-list aside aside_feed">
|
||||
<li class="nav-header">Vos flux RSS</li>
|
||||
|
||||
<li class="nav-form"><form id="add_rss" method="post" action="<?php echo Url::display (array ('c' => 'feed', 'a' => 'add')); ?>">
|
||||
<div class="stick">
|
||||
<input type="url" name="url_rss" placeholder="Ajouter un flux RSS" />
|
||||
<div class="dropdown">
|
||||
<div id="dropdown-cat" class="dropdown-target"></div>
|
||||
|
||||
<a class="dropdown-toggle btn" href="#dropdown-cat"><i class="icon i_down"></i></a>
|
||||
<ul class="dropdown-menu">
|
||||
<li class="dropdown-close"><a href="#close"><i class="icon i_close"></i></a></li>
|
||||
|
||||
<li class="dropdown-header">Catégorie</li>
|
||||
|
||||
<?php foreach ($this->categories as $cat) { ?>
|
||||
<li class="item">
|
||||
<label class="radio" for="radio_<?php echo $cat->id (); ?>">
|
||||
<input type="radio" name="category" id="radio_<?php echo $cat->id (); ?>" value="<?php echo $cat->id (); ?>"<?php echo $cat->id ()=='000000' ? ' checked="checked"' : ''; ?>/>
|
||||
<?php echo $cat->name (); ?>
|
||||
</label>
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<button class="btn" type="submit"><i class="icon i_add"></i></button>
|
||||
</div>
|
||||
</form></li>
|
||||
|
||||
@@ -65,6 +65,7 @@ label {
|
||||
padding: 5px 0;
|
||||
font-size: 14px;
|
||||
line-height: 25px;
|
||||
cursor: pointer;
|
||||
}
|
||||
input, select, textarea {
|
||||
display: inline-block;
|
||||
@@ -321,22 +322,25 @@ input, select, textarea {
|
||||
padding: 0 5px;
|
||||
color: #888;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.dropdown .dropdown-menu .item {
|
||||
display: block;
|
||||
height: 30px;
|
||||
padding: 0 25px;
|
||||
font-size: 90%;
|
||||
line-height: 30px;
|
||||
}
|
||||
.dropdown .dropdown-menu .item a {
|
||||
.dropdown .dropdown-menu .item > * {
|
||||
display: block;
|
||||
padding: 0 25px;
|
||||
line-height: 30px;
|
||||
}
|
||||
.dropdown .dropdown-menu .item:hover {
|
||||
background: #0062BE;
|
||||
color: #fff;
|
||||
}
|
||||
.dropdown .dropdown-menu .item:hover a {
|
||||
.dropdown .dropdown-menu .item:hover > * {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
}
|
||||
@@ -508,6 +512,12 @@ input, select, textarea {
|
||||
.aside.aside_flux {
|
||||
padding: 10px 0;
|
||||
}
|
||||
.aside.aside_feed .nav-form input {
|
||||
width: 140px;
|
||||
}
|
||||
.aside.aside_feed .nav-form .dropdown .dropdown-menu {
|
||||
right: -20px;
|
||||
}
|
||||
|
||||
.nav_menu {
|
||||
width: 100%;
|
||||
|
||||
Reference in New Issue
Block a user