aboutsummaryrefslogtreecommitdiff
path: root/app/layout/aside_flux.phtml
blob: ea2ea04ecc4c9a0b981db6ebcd3eb85389dc2a9a (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
75
76
77
78
79
80
81
<div class="aside aside_flux" id="aside_flux">
	<a class="toggle_aside" href="#close"><i class="icon i_close"></i></a>

	<ul class="categories">
		<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
		<li>
			<div class="stick">
				<a class="btn btn-important" href="<?php echo _url ('configure', 'feed'); ?>"><?php echo Translate::t ('subscription_management'); ?></a>
				<a class="btn btn-important" href="<?php echo _url ('configure', 'categorize'); ?>"><i class="icon i_category"></i></a>
			</div>
		</li>
		<?php } elseif (login_is_conf ($this->conf)) { ?>
		<li><a href="<?php echo _url ('index', 'about'); ?>"><?php echo Translate::t ('about_freshrss'); ?></a></li>
		<?php } ?>

		<li>
			<div class="category all">
				<a data-unread="<?php echo $this->nb_not_read; ?>" class="btn<?php echo $this->get_c == 'all' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index'); ?>">
					<i class="icon i_all"></i>
					<?php echo Translate::t ('all_feeds', $this->nb_total); ?>
				</a>
			</div>
		</li>

		<li>
			<div class="category favorites">
				<a data-unread="<?php echo $this->nb_favorites['unread']; ?>" class="btn<?php echo $this->get_c == 'favoris' ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'favoris'); ?>">
					<i class="icon i_bookmark"></i>
					<?php echo Translate::t ('favorite_feeds', $this->nb_favorites['read'] + $this->nb_favorites['unread']); ?>
				</a>
			</div>
		</li>

		<?php foreach ($this->cat_aside as $cat) { ?>
		<?php $feeds = $cat->feeds (); ?>
		<?php if (!empty ($feeds)) { ?>
		<li>
			<?php $c_active = false; if ($this->get_c == $cat->id ()) { $c_active = true; } ?>
			<div class="category stick<?php echo $c_active ? ' active' : ''; ?>">
				<a data-unread="<?php echo $cat->nbNotRead (); ?>" class="btn<?php echo $c_active ? ' active' : ''; ?>" href="<?php echo _url ('index', 'index', 'get', 'c_' . $cat->id ()); ?>">
					<?php echo htmlspecialchars($cat->name (), ENT_NOQUOTES, 'UTF-8'); ?>
				</a>
				<a class="btn dropdown-toggle" href="#"><i class="icon <?php echo $c_active ? 'i_up' : 'i_down'; ?>"></i></a>
			</div>

			<ul class="feeds<?php echo $c_active ? ' active' : ''; ?>">
				<?php foreach ($feeds as $feed) {
						$feed_id = $feed->id (); $nbEntries = $feed->nbEntries ();
						$f_active = ($this->get_f == $feed_id);
				?>
				<li id="f_<?php echo $feed_id; ?>" class="item<?php echo $f_active ? ' active' : ''; ?><?php echo $feed->inError () ? ' error' : ''; ?><?php echo $nbEntries == 0 ? ' empty' : ''; ?>">
					<div class="dropdown">
						<div class="dropdown-target"></div>
						<a class="dropdown-toggle" data-fweb="<?php echo $feed->website (); ?>"><i class="icon i_configure"></i></a>
<?php /* feed_config_template */ ?>
					</div>
					<img class="favicon" src="<?php echo $feed->favicon (); ?>" alt="✇" />
					<a class="feed" data-unread="<?php echo $feed->nbNotRead (); ?>" data-priority="<?php echo $feed->priority (); ?>" href="<?php echo _url ('index', 'index', 'get', 'f_' . $feed_id); ?>"><?php echo htmlspecialchars($feed->name(), ENT_NOQUOTES, 'UTF-8'); ?></a>
				</li>
				<?php } ?>
			</ul>
		</li>
		<?php } } ?>
	</ul>

	<span class="aside_flux_ender"><!-- For fixed menu --></span>
</div>

<script id="feed_config_template" type="text/html">
	<ul class="dropdown-menu">
		<li class="dropdown-close"><a href="#close">&nbsp;</a></li>
		<li class="item"><a href="<?php echo _url ('index', 'index', 'get', 'f_!!!!!!'); ?>"><?php echo Translate::t ('filter'); ?></a></li>
		<li class="item"><a target="_blank" href="http://example.net/"><?php echo Translate::t ('see_website'); ?></a></li>
		<?php if (!login_is_conf ($this->conf) || is_logged ()) { ?>
		<li class="separator"></li>
		<li class="item"><a href="<?php echo _url ('configure', 'feed', 'id', '!!!!!!'); ?>"><?php echo Translate::t ('administration'); ?></a></li>
		<li class="item"><a href="<?php echo _url ('feed', 'actualize', 'id', '!!!!!!'); ?>"><?php echo Translate::t ('actualize'); ?></a></li>
		<li class="item"><a href="<?php echo _url ('entry', 'read', 'is_read', 1, 'get', 'f_!!!!!!'); ?>"><?php echo Translate::t ('mark_read'); ?></a></li>
		<?php } ?>
	</ul>
</script>