aboutsummaryrefslogtreecommitdiff
path: root/app/views/extension/index.phtml
blob: f5c5bf03278ee3fdc1efe5830a2747bf971117a6 (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
<?php $this->partial('aside_configure'); ?>

<div class="post">
	<a href="<?= _url('index', 'index') ?>"><?= _t('gen.action.back_to_rss_feeds') ?></a>

	<h1><?= _t('admin.extensions.title') ?></h1>

	<form id="form-extension" method="post">
	<input type="hidden" name="_csrf" value="<?= FreshRSS_Auth::csrfToken() ?>" />
	<?php if (!empty($this->extension_list['system'])) { ?>
	<h2><?= _t('admin.extensions.system') ?></h2>
	<?php
		foreach ($this->extension_list['system'] as $ext) {
			$this->ext_details = $ext;
			$this->renderHelper('extension/details');
		}
	?>
	<?php } ?>

	<?php if (!empty($this->extension_list['user'])) { ?>
	<h2><?= _t('admin.extensions.user') ?></h2>
	<?php
		foreach ($this->extension_list['user'] as $ext) {
			$this->ext_details = $ext;
			$this->renderHelper('extension/details');
		}
	?>
	<?php
	}

	if (empty($this->extension_list['system']) && empty($this->extension_list['user'])) {
	?>
	<p class="alert alert-warn"><?= _t('admin.extensions.empty_list') ?></p>
	<?php } ?>
	</form>

	<?php if (!empty($this->available_extensions)) { ?>
		<h2><?= _t('admin.extensions.community') ?></h2>
		<table>
			<tr>
				<th><?= _t('admin.extensions.name') ?></th>
				<th><?= _t('admin.extensions.version') ?></th>
				<th><?= _t('admin.extensions.author') ?></th>
				<th><?= _t('admin.extensions.description') ?></th>
			</tr>
			<?php foreach ($this->available_extensions as $ext) { ?>
				<tr>
					<td><a href="<?= $ext['url'] ?>" target="_blank"><?= $ext['name'] ?></a></td>
					<td><?= $ext['version'] ?></td>
					<td><?= $ext['author'] ?></td>
					<td>
						<?= $ext['description'] ?>
						<?php if (isset($this->extensions_installed[$ext['name']])) { ?>
							<?php if (version_compare($this->extensions_installed[$ext['name']], $ext['version']) >= 0) { ?>
								<span class="alert alert-success">
									<?= _t('admin.extensions.latest') ?>
								</span>
							<?php } else  if ($this->extensions_installed[$ext['name']] != $ext['version']) { ?>
								<span class="alert alert-warn">
									<?= _t('admin.extensions.update') ?>
								</span>
							<?php } ?>
						<?php } ?>
					</td>
				</tr>
			<?php } ?>
		</table>
	<?php } ?>
</div>

<?php $class = isset($this->extension) ? ' class="active"' : ''; ?>
<a href="#" id="close-slider"<?= $class ?>></a>
<div id="slider"<?= $class ?>>
<?php
	if (isset($this->extension)) {
		$this->renderHelper('extension/configure');
	}
?>
</div>