aboutsummaryrefslogtreecommitdiff
path: root/ratatoeskr/templates/src/systemtemplates/plugininstall.html
blob: 7b5c5861cd992a87058d9c393de6da41227a8dcd (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
<ste:load name="master.html" />
<ste:block name="content">
	<ste:default_error />
	<ste:default_success />
	
	<h2><ste:get_translation for="install_from_package" /></h2>
	<form action="$rel_path_to_root/backend/plugin/install" method="POST" accept-charset="UTF-8" enctype="multipart/form-data">
		<input type="file" name="pluginpackage" /> <input type="submit" name="installpackage" />
	</form>
	
	<h2><ste:get_translation for="install_from_repo" /></h2>
	<ste:set var="repos_n"><ste:arraylen array="repos" /></ste:set>
	<ste:if>
		~{$repos_n|gt|0}
		<ste:then>
			<form action="$rel_path_to_root/backend/plugin/install" method="POST" accept-charset="UTF-8">
				<ste:get_translation for="search" />: <input type="text" name="searchfor" />
				<ste:get_translation for="repo_plugin_search_in" />:
				<select name="searchin">
					<option value="*" selected="selected"><ste:get_translation for="search_in_all_repos" /></option>
					<option value="*">-----------</option>
					<ste:foreach array="repos" value="repo">
						<option value="$repo[id]"><ste:escape>$repo[name]</ste:escape></option>
					</ste:foreach>
				</select>
				<input type="submit" name="search_in_repos" />
			</form>
		</ste:then>
		<ste:else>
			<ste:l10n_replace URL="$rel_path_to_root/backend/admin/repos"><ste:get_translation for="no_repos_add_some" raw="y" /></ste:l10n_replace>
		</ste:else>
	</ste:if>
	
	<ste:if>
		$searchresults
		<ste:then>
			<table class="listtab fullwidth">
				<thead>
					<tr>
						<th><ste:get_translation for="plugin_name" /></th>
						<th><ste:get_translation for="plugin_description" /></th>
						<th><ste:get_translation for="repo" /></th>
						<th>&nbsp;</th>
					</tr>
				</thead>
				<tbody>
					<ste:foreach array="searchresults" value="searchresult">
						<tr>
							<td><ste:escape>$searchresult[name]</ste:escape></td>
							<td><ste:escape>$searchresult[description]</ste:escape></td>
							<td><ste:escape>$searchresult[reponame]</ste:escape></td>
							<td><a href="$rel_path_to_root/backend/plugin/repoinstall?repo=$searchresult[repoid]&pkg=$searchresult[name]"><ste:get_translation for="install" /></a></td>
						</tr>
					</ste:foreach>
				</tbody>
			</table>
		</ste:then>
	</ste:if>
</ste:block>