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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
<?php
$actual_view = Minz_Request::param('output', 'normal');
?>
<div class="nav_menu">
<?php if ($actual_view === 'normal') { ?>
<a class="btn toggle_aside" href="#aside_flux"><?php echo FreshRSS_Themes::icon('category'); ?></a>
<?php } ?>
<?php if ($this->loginOk) { ?>
<a id="actualize" class="btn" href="<?php echo _url ('feed', 'actualize'); ?>"><?php echo FreshRSS_Themes::icon('refresh'); ?></a>
<?php
$get = false;
$string_mark = Minz_Translate::t ('mark_all_read');
if ($this->get_f) {
$get = 'f_' . $this->get_f;
$string_mark = Minz_Translate::t ('mark_feed_read');
} elseif ($this->get_c && $this->get_c != 'a') {
if ($this->get_c === 's') {
$get = 's';
} else {
$get = 'c_' . $this->get_c;
}
$string_mark = Minz_Translate::t ('mark_cat_read');
}
$nextGet = $get;
if ($this->conf->onread_jump_next && (strlen ($get) > 2)) {
$anotherUnreadId = '';
$foundCurrent = false;
switch ($get[0]) {
case 'c':
foreach ($this->cat_aside as $cat) {
if ($cat->id () == $this->get_c) {
$foundCurrent = true;
continue;
}
if ($cat->nbNotRead () <= 0) continue;
$anotherUnreadId = $cat->id ();
if ($foundCurrent) break;
}
$nextGet = empty ($anotherUnreadId) ? 'a' : 'c_' . $anotherUnreadId;
break;
case 'f':
foreach ($this->cat_aside as $cat) {
if ($cat->id () == $this->get_c) {
foreach ($cat->feeds () as $feed) {
if ($feed->id () == $this->get_f) {
$foundCurrent = true;
continue;
}
if ($feed->nbNotRead () <= 0) continue;
$anotherUnreadId = $feed->id ();
if ($foundCurrent) break;
}
break;
}
}
$nextGet = empty ($anotherUnreadId) ? 'c_' . $this->get_c : 'f_' . $anotherUnreadId;
break;
}
}
$p = isset($this->entries[0]) ? $this->entries[0] : null;
$idMax = $p === null ? '0' : $p->id();
$arUrl = array('c' => 'entry', 'a' => 'read', 'params' => array('get' => $get, 'nextGet' => $nextGet, 'idMax' => $idMax));
$output = Minz_Request::param('output', '');
if (($output != '') && ($this->conf->view_mode !== $output)) {
$arUrl['params']['output'] = $output;
}
$markReadUrl = Minz_Url::display($arUrl);
Minz_Session::_param ('markReadUrl', $markReadUrl);
?>
<div class="stick" id="nav_menu_read_all">
<a class="read_all btn" href="<?php echo $markReadUrl; ?>"><?php echo Minz_Translate::t ('mark_read'); ?></a>
<div class="dropdown">
<div id="dropdown-read" class="dropdown-target"></div>
<a class="dropdown-toggle btn" href="#dropdown-read"><?php echo FreshRSS_Themes::icon('down'); ?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
<li class="item"><a href="<?php echo $markReadUrl; ?>"><?php echo $string_mark; ?></a></li>
<li class="separator"></li>
<?php
$today = $this->today;
$one_week = $today - 604800;
?>
<li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $today . '000000'); ?>"><?php echo Minz_Translate::t ('before_one_day'); ?></a></li>
<li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', $get, 'idMax', $one_week . '000000'); ?>"><?php echo Minz_Translate::t ('before_one_week'); ?></a></li>
</ul>
</div>
</div>
<?php } ?>
<?php
$params = Minz_Request::params ();
if (isset ($params['search'])) {
$params['search'] = urlencode ($params['search']);
}
$url = array (
'c' => 'index',
'a' => 'index',
'params' => $params
);
?>
<div class="dropdown" id="nav_menu_views">
<div id="dropdown-views" class="dropdown-target"></div>
<a class="dropdown-toggle btn" href="#dropdown-views"><?php echo Minz_Translate::t ('display'); ?> <?php echo FreshRSS_Themes::icon('down'); ?></a>
<ul class="dropdown-menu">
<li class="dropdown-close"><a href="#close">❌</a></li>
<?php
$url_output = $url;
if ($actual_view !== 'normal') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'normal'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
<?php echo Minz_Translate::t ('normal_view'); ?>
</a>
</li>
<?php } if($actual_view !== 'reader') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'reader'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
<?php echo Minz_Translate::t ('reader_view'); ?>
</a>
</li>
<?php } if($actual_view !== 'global') { ?>
<li class="item">
<?php $url_output['params']['output'] = 'global'; ?>
<a class="view_normal" href="<?php echo Minz_Url::display ($url_output); ?>">
<?php echo Minz_Translate::t ('global_view'); ?>
</a>
</li>
<?php } ?>
<li class="separator"></li>
<?php
$url_state = $url;
$url_state['params']['state'] = 'all';
?>
<li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'all') ? 'true' :'false'; ?>">
<a class="print_all" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_all_articles'); ?>
</a>
</li>
<?php
$url_state['params']['state'] = 'not_read';
?>
<li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'not_read') ? 'true' :'false'; ?>">
<a class="print_non_read" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_not_reads'); ?>
</a>
</li>
<?php
$url_state['params']['state'] = 'read';
?>
<li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'read') ? 'true' :'false'; ?>">
<a class="print_read" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_read'); ?>
</a>
</li>
<?php
$url_state['params']['state'] = 'favorite';
?>
<li class="item" role="checkbox" aria-checked="<?php echo ($this->state === 'favorite') ? 'true' :'false'; ?>">
<a class="print_favorite" href="<?php echo Minz_Url::display ($url_state); ?>">
<?php echo Minz_Translate::t ('show_favorite'); ?>
</a>
</li>
<li class="separator"></li>
<li class="item">
<?php
$url_order = $url;
if ($this->order === 'DESC') {
$url_order['params']['order'] = 'ASC';
?>
<a href="<?php echo Minz_Url::display ($url_order); ?>">
<?php echo Minz_Translate::t ('older_first'); ?>
</a>
<?php
} else {
$url_order['params']['order'] = 'DESC';
?>
<a href="<?php echo Minz_Url::display ($url_order); ?>">
<?php echo Minz_Translate::t ('newer_first'); ?>
</a>
<?php } ?>
</li>
<li class="separator"></li>
<li class="item">
<a class="view_rss" target="_blank" href="<?php echo Minz_Url::display ($this->rss_url); ?>">
<?php echo Minz_Translate::t ('rss_view'); ?>
</a>
</li>
</ul>
</div>
<div class="item search">
<form action="<?php echo _url ('index', 'index'); ?>" method="get">
<?php $search = Minz_Request::param ('search', ''); ?>
<input type="search" name="search" class="extend" value="<?php echo $search; ?>" placeholder="<?php echo Minz_Translate::t ('search_short'); ?>" />
<?php $get = Minz_Request::param ('get', ''); ?>
<?php if($get != '') { ?>
<input type="hidden" name="get" value="<?php echo $get; ?>" />
<?php } ?>
<?php $order = Minz_Request::param ('order', ''); ?>
<?php if($order != '') { ?>
<input type="hidden" name="order" value="<?php echo $order; ?>" />
<?php } ?>
<?php $state = Minz_Request::param ('state', ''); ?>
<?php if($state != '') { ?>
<input type="hidden" name="state" value="<?php echo $state; ?>" />
<?php } ?>
</form>
</div>
</div>
|