Skip to content
Snippets Groups Projects
Commit 56b43c12 authored by Aeris's avatar Aeris
Browse files

sorted by categories

parent 74a67c13
Branches
No related tags found
No related merge requests found
......@@ -2,6 +2,7 @@
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
<div class="form-group">
<p> Configure the following values according to the <a href="https://github.com/printfuck/xExtension-Readable#setup" target="_blank">instructions</a> </p>
<label class="group-name" for="read_readability_host">Readbility Host</label>
<div class="group-controls">
<input type="text" id="read_readability_host" name="read_readability_host" value="<?php echo $this->getReadHost(); ?>" min="50" data-leave-validation="1">
......@@ -14,12 +15,18 @@
</div>
<div>
<p> Shown below are the feeds, to which this addon will apply either Mercury or Readability Parsing </p>
<p>Shown below are the feeds, to which this addon will apply either Mercury or Readability Parsing. Remember to hit <b>Submit</b> at the bottom after making changes.</p>
<?php
foreach ($this->getCategories() as $c) {
?>
<h3><?php echo $c->name()?></h3>
<table>
<tr><td>Mercury</td><td>Readability</td><td>Feed</td></tr>
<?php
foreach ($this->getFeeds() as $f) {
foreach ( $c->feeds() as $f) {
?>
<tr>
<td> <input type="checkbox" id="merc_<?php echo $f->id() ?>" name="merc_<?php echo $f->id() ?>" value="1" <?php echo $this->getConfStoreM($f->id()) ? 'checked' : ''; ?>> </td>
<td> <input type="checkbox" id="read_<?php echo $f->id() ?>" name="read_<?php echo $f->id() ?>" value="1" <?php echo $this->getConfStoreR($f->id()) ? 'checked' : ''; ?>> </td>
......@@ -30,6 +37,10 @@
}
?>
</table>
<?php
}
?>
<br>
</div>
<div class="form-group form-actions">
......
......@@ -5,6 +5,7 @@ class ReadableExtension extends Minz_Extension {
private $readHost;
private $mercHost;
private $feeds;
private $cats;
private $mStore;
private $rStore;
......@@ -66,6 +67,10 @@ class ReadableExtension extends Minz_Extension {
return $this->feeds;
}
public function getCategories() {
return $this->cats;
}
/*
Loading basic variables from user storage
*/
......@@ -107,7 +112,9 @@ class ReadableExtension extends Minz_Extension {
public function handleConfigureAction()
{
$feedDAO = FreshRSS_Factory::createFeedDao();
$catDAO = FreshRSS_Factory::createCategoryDao();
$this->feeds = $feedDAO->listFeeds();
$this->cats = $catDAO->listCategories(true,false);
if (Minz_Request::isPost()) {
$mstore = [];
......
......@@ -2,7 +2,7 @@
"name": "Readable",
"author": "printfuck",
"description": "Fetch article content for selected feeds with readability or mercury",
"version": "0.1",
"version": "0.2",
"entrypoint": "Readable",
"type": "user"
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment