aboutsummaryrefslogtreecommitdiff
path: root/app/views/helpers/pagination.phtml
blob: 893451af9fca57eb34b1ed3afd2093448a485a0f (plain)
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
<?php
	$url_next = Minz_Request::currentRequest();
	$url_next['params']['next'] = FreshRSS_Context::$next_id;
	$url_next['params']['state'] = FreshRSS_Context::$state;
	$url_next['params']['ajax'] = 1;

	$url_mark_read = array(
		'c' => 'entry',
		'a' => 'read',
		'params' => array(
			'get' => FreshRSS_Context::currentGet(),
			'nextGet' => FreshRSS_Context::$next_get,
			'idMax' => FreshRSS_Context::$id_max,
			'search' => FreshRSS_Context::$search,
			'state' => FreshRSS_Context::$state,
		)
	);
?>

<form id="mark-read-pagination" method="post">
<input type="hidden" name="_csrf" value="<?php echo FreshRSS_Auth::csrfToken(); ?>" />
<ul class="pagination">
	<li class="item pager-next">
	<?php if (FreshRSS_Context::$next_id) { ?>
		<a id="load_more" href="<?php echo Minz_Url::display($url_next); ?>">
			<?php echo _t('gen.pagination.load_more'); ?>
		</a>
	<?php } elseif ($url_mark_read) { ?>
		<button id="bigMarkAsRead"
		        class="as-link <?php echo FreshRSS_Context::$user_conf->reading_confirm ? 'confirm" disabled="disabled' : ''; ?>"
		        form="mark-read-pagination"
		        formaction="<?php echo Minz_Url::display($url_mark_read); ?>"
		        type="submit">
			<?php echo _t('gen.pagination.nothing_to_load'); ?><br />
			<span class="bigTick">✓</span><br />
			<?php echo _t('gen.pagination.mark_all_read'); ?>
		</button>
	<?php } else { ?>
		<a id="bigMarkAsRead" href=".">
			<?php echo _t('gen.pagination.nothing_to_load'); ?><br />
		</a>
	<?php } ?>
	</li>
</ul>
</form>