diff options
author | Simon Rettberg | 2020-01-14 17:04:03 +0100 |
---|---|---|
committer | Simon Rettberg | 2020-01-14 17:04:03 +0100 |
commit | 60bded48aa265879cb518f2d6d8821d5301f3179 (patch) | |
tree | 444f0e52510087c4e5dd9b8054ff6619e002928e /modules-available/minilinux | |
parent | [permissionmanager] Update translations (diff) | |
download | slx-admin-60bded48aa265879cb518f2d6d8821d5301f3179.tar.gz slx-admin-60bded48aa265879cb518f2d6d8821d5301f3179.tar.xz slx-admin-60bded48aa265879cb518f2d6d8821d5301f3179.zip |
[minilinux] Remove duplicate DL button; hide it for orphaned versions
Diffstat (limited to 'modules-available/minilinux')
-rw-r--r-- | modules-available/minilinux/page.inc.php | 3 | ||||
-rw-r--r-- | modules-available/minilinux/templates/filelist.html | 6 | ||||
-rw-r--r-- | modules-available/minilinux/templates/versionlist.html | 4 |
3 files changed, 4 insertions, 9 deletions
diff --git a/modules-available/minilinux/page.inc.php b/modules-available/minilinux/page.inc.php index 575177a8..0ad6cefc 100644 --- a/modules-available/minilinux/page.inc.php +++ b/modules-available/minilinux/page.inc.php @@ -88,7 +88,7 @@ class Page_MiniLinux extends Page $eff = Property::get(MiniLinux::PROPERTY_DEFAULT_BOOT_EFFECTIVE); foreach ($versions as &$version) { $version['dateline_s'] = Util::prettyTime($version['dateline']); - $version['orphan'] = ($version['orphan'] > 2); + $version['orphan'] = ($version['orphan'] > 0 && !$version['installed']) || ($version['orphan'] > 1); $version['downloading'] = $version['taskid'] && Taskmanager::isRunning(Taskmanager::status($version['taskid'])); if ($version['installed'] && $version['versionid'] !== $def) { $version['showsetdefault'] = true; @@ -155,7 +155,6 @@ class Page_MiniLinux extends Page array_multisort($sort, SORT_ASC, $data['files']); if (!$valid) { $data['verify_button'] = false; - $data['download_button'] = !$data['dltask']; if ($ver['installed']) { MiniLinux::setInstalledState($versionid, false); } diff --git a/modules-available/minilinux/templates/filelist.html b/modules-available/minilinux/templates/filelist.html index 0d8b9901..b006fd1e 100644 --- a/modules-available/minilinux/templates/filelist.html +++ b/modules-available/minilinux/templates/filelist.html @@ -8,12 +8,6 @@ {{lang_verify}} </button> {{/verify_button}} - {{#download_button}} - <button type="button" class="btn btn-xs btn-success btn-download" data-version="{{versionid}}"> - <span class="glyphicon glyphicon-download"></span> - {{lang_download}} - </button> - {{/download_button}} {{#delete_button}} <button type="submit" name="show" value="delete" class="btn btn-xs btn-danger" data-confirm="{{lang_confirmDeleteVersion}}"> diff --git a/modules-available/minilinux/templates/versionlist.html b/modules-available/minilinux/templates/versionlist.html index 0acfecac..2dbca085 100644 --- a/modules-available/minilinux/templates/versionlist.html +++ b/modules-available/minilinux/templates/versionlist.html @@ -36,17 +36,19 @@ <span class="glyphicon glyphicon-ok" title="{{lang_isGlobalDefault}}"></span> {{/isdefault}} </td> - <td class="text-nowrap text-center"> + <td class="text-nowrap text-right"> {{#installed}} <span class="label label-info">{{lang_installed}}</span> {{/installed}} {{^installed}} + {{^orphan}} {{^downloading}} <button type="button" class="btn btn-xs btn-success btn-download" data-version="{{versionid}}"> <span class="glyphicon glyphicon-download"></span> {{lang_download}} </button> {{/downloading}} + {{/orphan}} {{/installed}} </td> </tr> |