aboutsummaryrefslogtreecommitdiff
path: root/app/views/tag/index.phtml
blob: f5a8de7eecd29e99df541fa5ea592d21cff39a05 (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
<?php
	declare(strict_types=1);
	/** @var FreshRSS_View $this */
	$this->partial('aside_subscription');
?>
<main class="post">
	<h1><?= _t('sub.menu.label_management') ?></h1>

	<h2><?= _t('sub.title.add_label') ?></h2>
	<form id="add_tag" method="post" action="<?= _url('tag', 'add') ?>" autocomplete="off" data-auto-leave-validation="1">
		<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
		<div class="form-group">
			<label class="group-name" for="new_label_name"><?= _t('sub.tag.name') ?></label>
			<div class="group-controls">
				<input id="new_label_name" name="name" type="text" autocomplete="off" required="required" />
			</div>
		</div>

		<div class="form-group form-actions">
			<div class="group-controls">
				<button type="submit" class="btn btn-important"><?= _t('gen.action.add') ?></button>
			</div>
		</div>
	</form>

	<?php if (count($this->tags) > 0): ?>
	<h2><?= _t('gen.action.manage') ?></h2>
	<ul id="tagsList" <?= (count($this->tags) > 11) ? 'class="listInColumns"' : '' ?>>
	<?php foreach ($this->tags as $tag): ?>
		<li>
			<a href="<?= _url('tag', 'update', 'id', $tag->id()) ?>" class="configure open-slider" title="<?= _t('gen.action.manage') ?>"><?= _i('configure') ?></a>
			<span class="item-name"><?= $tag->name() ?></span>
		</li>
	<?php endforeach; ?>
	</ul>
	<?php endif; ?>
</main>

<?php $class = isset($this->tag) ? ' active' : ''; ?>
<aside id="slider" class="<?= $class ?>">
	<a class="toggle_aside" href="#close"><?= _i('close') ?></a>
	<div id="slider-content">
		<?php
			if (isset($this->tag)) {
				$this->renderHelper('tag/update');
			}
		?>
	</div>
</aside>
<a href="#close" id="close-slider">
	<?= _i('close') ?>
</a>