summaryrefslogtreecommitdiffstats
path: root/templates/minilinux/filelist.html
blob: 38b709f62543a1f472eddc0b1320dc391bf1553a (plain) (blame)
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
<div class="container">

	{{#systems}}
	<div class="panel panel-default">
		<div class="panel-heading">
			<h4>{{title}}</h4>
		</div>
		<div class="panel-body" id="download-{{id}}">
			<ul class="list-group">
				{{#files}}
				<li class="list-group-item" id="{{uid}}">
					{{name}}
					{{#changed}}<span class="btn btn-primary btn-sm" onclick="slxUpdate('{{uid}}', '{{id}}', '{{name}}')">Aktualisieren</span>{{/changed}}
				</li>
				{{/files}}
			</ul>
		</div>
	</div>
	{{/systems}}
	{{^systems}}
	<div class="row well well-sm">Keine Konfigurationspakete gefunden!</div>
	{{/systems}}
</div>

<script type="text/javascript">
function slxUpdate(uid, id, name)
{
	$('#' + uid).load('?do=MiniLinux',
		{ action : "download", token : TOKEN, id : id, name : name },
		function(response, status, xhr) {
			if (status === "error") {
				var msg = "Fehler beim Abruf: ";
				$('#' + uid).html(msg + xhr.status + " " + xhr.statusText);
			} else {
				setTimeout(tmInit, 50);
			}
		});
}
</script>