-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathconfigure.phtml
133 lines (116 loc) · 4.5 KB
/
configure.phtml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<form action="<?php echo _url('extension', 'configure', 'e', urlencode($this->getName())); ?>" method="post">
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
<div class="form-group form-fix">
<p> Configure the following values according to the <a href="https://github.com/printfuck/xExtension-Readable#setup" target="_blank">instructions</a> </p>
<div>
<label class="group-name" for="read_fivefilters_host">Five Filters Host</label>
<div class="group-controls">
<input type="text" id="read_fivefilters_host" name="read_fivefilters_host" value="<?php echo $this->getFiveHost(); ?>" min="50" data-leave-validation="1">
</div>
</div>
<div>
<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">
</div>
</div>
<div>
<label class="group-name" for="read_mercury_host">Mercury Host</label>
<div class="group-controls">
<input type="text" id="read_mercury_host" name="read_mercury_host" value="<?php echo $this->getMercHost(); ?>" min="100" data-leave-validation="1">
</div>
</div>
</div>
<div>
<p>Shown below are the feeds, to which this addon will apply either Mercury, Readability or Five-Filters 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 class="rotate"><div><span>Five Filters</span></div></td>
<td class="rotate"><div><span>Mercury</span></div></td>
<td class="rotate"><div><span>Readability</span></div></td>
<td class="rotatelast"><div><span>Feed</span></div></td>
</tr>
<tr>
<td class="chckbx"> <input type="checkbox"
id="ff_cat_<?php echo $c->id() ?>"
name="ff_cat_<?php echo $c->id() ?>"
value="1" <?php echo $this->getConfStoreCat("ff", $c->id()) ? 'checked' : ''; ?> >
</td>
<td class="chckbx"> <input type="checkbox"
id="merc_cat_<?php echo $c->id() ?>"
name="merc_cat_<?php echo $c->id() ?>"
value="1" <?php echo $this->getConfStoreCat("merc", $c->id()) ? 'checked' : ''; ?> >
</td>
<td class="chckbx"> <input type="checkbox"
id="read_cat_<?php echo $c->id() ?>"
name="read_cat_<?php echo $c->id() ?>"
value="1" <?php echo $this->getConfStoreCat("read", $c->id()) ? 'checked' : ''; ?> >
</td>
<td class="boldtd" >Whole Category: <?php echo $c->name()?></td>
</tr>
<?php
foreach ( $c->feeds() as $f) {
$catffchecked = $this->getConfStoreCat("ff", $c->id());
$catmercchecked = $this->getConfStoreCat("merc", $c->id());
$catreadchecked = $this->getConfStoreCat("read", $c->id());
$allcatcheck = $catffchecked || $catmercchecked || $catreadchecked
?>
<tr>
<td class="chckbx"> <input type="checkbox"
id="ff_<?php echo $f->id() ?>"
name="ff_<?php echo $f->id() ?>"
value="1"
<?php
echo $this->getConfStoreF($f->id()) ? 'checked' : '';
echo $catffchecked ? "checked" : '';
echo $allcatcheck ? " disabled" : '';
?>
>
</td>
<td class="chckbx"> <input type="checkbox"
id="merc_<?php echo $f->id() ?>"
name="merc_<?php echo $f->id() ?>"
value="1"
<?php
echo $this->getConfStoreM($f->id()) ? 'checked' : '';
//echo $this->getConfStoreCat("merc", $c->id()) ? "checked disabled" : '';
echo $catmercchecked ? "checked" : '';
echo $allcatcheck ? " disabled" : '';
?>
>
</td>
<td class="chckbx"> <input type="checkbox"
id="read_<?php echo $f->id() ?>"
name="read_<?php echo $f->id() ?>"
value="1"
<?php
echo $this->getConfStoreR($f->id()) ? 'checked' : '';
//echo $this->getConfStoreCat("read", $c->id()) ? "checked disabled" : '';
echo $catreadchecked ? "checked" : '';
echo $allcatcheck ? " disabled" : '';
?>
>
</td>
<td><?php echo $f->name() ?></td>
</tr>
<?php
}
?>
</table>
<?php
}
?>
<br>
</div>
<div class="form-group form-actions">
<div class="group-controls">
<button type="submit" class="btn btn-important"><?php echo _t('gen.action.submit'); ?></button>
<button type="reset" class="btn"><?php echo _t('gen.action.cancel'); ?></button>
</div>
</div>
</form>
<!-- vim: ts=4 sts=4 sw=4 et: -->