aboutsummaryrefslogtreecommitdiff
path: root/app/layout/aside_flux.phtml
blob: e572e9d48a9a8a63e71c35c1e56ec3e8420b1bc9 (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
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
<div class="aside aside-flux" id="aside-flux">
	<a class="toggle_aside" href="#close"><?php echo _i('close'); ?></a>

	<?php if (FreshRSS_Auth::hasAccess()) { ?>
	<div class="stick configure-feeds">
		<a class="btn btn-important" href="<?php echo _url('subscription', 'index'); ?>"><?php echo _t('subscription_management'); ?></a>
		<a class="btn btn-important" href="<?php echo _url('importExport', 'index'); ?>"><?php echo _i('import'); ?></a>
	</div>
	<?php } elseif (Minz_Configuration::needsLogin()) { ?>
	<a href="<?php echo _url('index', 'about'); ?>"><?php echo _t('about_freshrss'); ?></a>
	<?php } ?>

	<form id="mark-read-aside" method="post" style="display: none"></form>

	<ul class="tree">
		<li class="tree-folder<?php echo FreshRSS_Context::isCurrentGet('a') ? ' active' : ''; ?>">
			<a class="tree-folder-title" data-unread="<?php echo format_number(FreshRSS_Context::$total_unread); ?>" href="<?php echo _url('index', 'index'); ?>"><?php echo _i('all'), ' ', _t('main_stream'); ?></a>
		</li>

		<li class="tree-folder<?php echo FreshRSS_Context::isCurrentGet('s') ? ' active' : ''; ?>">
			<a class="tree-folder-title" data-unread="<?php echo format_number(FreshRSS_Context::$total_starred['unread']); ?>" href="<?php echo _url('index', 'index', 'get', 's'); ?>"><?php echo _i('bookmark'), ' ', _t('favorite_feeds', format_number(FreshRSS_Context::$total_starred['all'])); ?></a>
		</li>

		<?php
			foreach ($this->categories as $cat) {
				$feeds = $cat->feeds();
				if (!empty($feeds)) {
		?>
		<li class="tree-folder<?php echo FreshRSS_Context::isCurrentGet('c_' . $cat->id()) ? ' active' : ''; ?>">
			<a class="tree-folder-title" data-unread="<?php echo format_number($cat->nbNotRead()); ?>" href="<?php echo _url('index', 'index', 'get', 'c_' . $cat->id()); ?>"><?php echo _i('category'), ' ', $cat->name(); ?></a>

			<ul class="items">
				<?php foreach ($feeds as $feed) { ?>
				<li class="item<?php echo FreshRSS_Context::isCurrentGet('f_' . $feed->id()) ? ' active' : ''; ?>">
					<div class="dropdown">
						<div class="dropdown-target"></div>
						<a class="dropdown-toggle" data-fweb="<?php echo $feed->website(); ?>"><?php echo _i('configure'); ?></a>
						<?php /* feed_config_template */ ?>
					</div>
					<img class="favicon" src="<?php echo $feed->favicon(); ?>" alt="✇" />
					<a data-unread="<?php echo format_number($feed->nbNotRead()); ?>" data-priority="<?php echo $feed->priority(); ?>" href="<?php echo _url('index', 'index', 'get', 'f_' . $feed->id()); ?>"><?php echo $feed->name(); ?></a>
				</li>
				<?php } ?>
			</ul>
		</li>
		<?php
				}
			}
		?>
	</ul>
</div>

<script id="feed_config_template" type="text/html">
	<ul class="dropdown-menu">
		<li class="dropdown-close"><a href="#close">❌</a></li>
		<li class="item"><a href="<?php echo _url('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo _t('filter'); ?></a></li>
		<?php if (FreshRSS_Auth::hasAccess()) { ?>
		<li class="item"><a href="<?php echo _url('stats', 'repartition', 'id', '!!!!!!'); ?>"><?php echo _t('stats'); ?></a></li>
		<?php } ?>
		<li class="item"><a target="_blank" href="http://example.net/"><?php echo _t('see_website'); ?></a></li>
		<?php if (FreshRSS_Auth::hasAccess()) { ?>
		<li class="separator"></li>
		<li class="item"><a href="<?php echo _url('subscription', 'index', 'id', '!!!!!!'); ?>"><?php echo _t('administration'); ?></a></li>
		<li class="item"><a href="<?php echo _url('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo _t('actualize'); ?></a></li>
		<li class="item">
			<?php $confirm = FreshRSS_Context::$conf->reading_confirm ? 'confirm' : ''; ?>
			<button class="read_all as-link <?php echo $confirm; ?>"
			        form="mark-read-aside"
			        formaction="<?php echo _url('entry', 'read', 'get', 'f_!!!!!!'); ?>"
			        type="submit"><?php echo _t('mark_read'); ?></button>
		</li>
		<?php } ?>
	</ul>
</script>