diff options
author | Simon Rettberg | 2016-05-03 19:03:09 +0200 |
---|---|---|
committer | Simon Rettberg | 2016-05-03 19:03:09 +0200 |
commit | 50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66 (patch) | |
tree | 05e99fdffa696434960d7c77966c0bc36d6339e8 /modules-available/minilinux/templates/filelist.html | |
parent | Second half of merge.... (diff) | |
download | slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.gz slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.tar.xz slx-admin-50404f3b23b7fd6aeae4c9d2f6df0ea25e984e66.zip |
WIP
Diffstat (limited to 'modules-available/minilinux/templates/filelist.html')
-rw-r--r-- | modules-available/minilinux/templates/filelist.html | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/modules-available/minilinux/templates/filelist.html b/modules-available/minilinux/templates/filelist.html new file mode 100644 index 00000000..ca94f4d0 --- /dev/null +++ b/modules-available/minilinux/templates/filelist.html @@ -0,0 +1,77 @@ + {{#systems}} + <div class="panel panel-default"> + <div class="panel-heading"> + <h4>{{title}}</h4> + </div> + <div class="panel-body" id="download-{{id}}"> + <div class="input-group pull-right" style="max-width: 400px"> + <span class="input-group-addon slx-ga">{{lang_desiredVersion}}</span> + <select id="versionbox" class="form-control" onchange="loadSystemList($('#versionbox').val())"> + {{#versions}} + {{#selected}} + <option value="{{version}}" selected>{{version}}</option> + {{/selected}} + {{^selected}} + <option value="{{version}}">{{version}}</option> + {{/selected}} + {{/versions}} + </select> + </div> + {{#systemChanged}} + <p> + {{lang_canUpdate1}} <b>{{title}}</b> {{lang_canUpdate2}} + </p> + <p><span class="btn btn-primary" onclick="slxUpdateAll(this, 'download-{{id}}')">{{lang_update}}</span></p> + {{/systemChanged}} + {{^systemChanged}} + <p>{{lang_systemUpdated}}</p> + {{/systemChanged}} + <hr> + <p><b>{{lang_filesInVersion}} {{version}}</b></p> + <ul class="list-group"> + {{#files}} + <li class="list-group-item" id="{{uid}}"> + <div class="row"> + <div class="col-sm-2">{{name}}</div> + <div class="col-xs-2"> + {{^fileChanged}}<span class="glyphicon glyphicon-ok"></span> <b>{{lang_actual}}</b>{{/fileChanged}} + {{#fileChanged}}<span class="glyphicon glyphicon-exclamation-sign"></span> <b>{{lang_outdated}}</b>{{/fileChanged}} + </div> + <div class="col-xs-2"> + {{#fileChanged}}<span class="btn btn-primary btn-xs update-button" onclick="slxUpdate('{{uid}}', '{{id}}', '{{name}}')">{{lang_update}}</span>{{/fileChanged}} + {{^fileChanged}}<span class="btn btn-default btn-xs" onclick="slxUpdate('{{uid}}', '{{id}}', '{{name}}')">{{lang_redownload}}</span>{{/fileChanged}} + </div> + </div> + {{{download}}} + </li> + {{/files}} + </ul> + </div> + </div> + {{/systems}} + {{^systems}} + <div class="row well well-sm">{{lang_configurationPackageNotFound}}</div> + {{/systems}} + +<script type="text/javascript"> +function slxUpdate(uid, id, name) +{ + $('#' + uid).html(''); + $('#' + uid).load('?do=MiniLinux', + { action : "download", token : TOKEN, id : id, name : name, version : $('#versionbox').val() }, + function(response, status, xhr) { + if (status === "error") { + var msg = "Fehler beim Abruf: "; + $('#' + uid).html(msg + xhr.status + " " + xhr.statusText); + } else { + setTimeout(tmInit, 100); + } + }); +} +function slxUpdateAll(t, uid) +{ + $(t).hide(0); + $('#' + uid).find('.update-button').click(); +} +tmInit(); +</script> |