From aaf5d6dbe12c5b564c709c107403dac505553591 Mon Sep 17 00:00:00 2001 From: Joseph Nuthalapati Date: Thu, 16 Nov 2017 15:46:00 +0530 Subject: [PATCH] Convert collapsible list to collapsible table Signed-off-by: Joseph Nuthalapati Reviewed-by: James Valleroy --- plinth/modules/syncthing/manifest.py | 12 +-- plinth/templates/clients.html | 136 +++++++++++++-------------- static/themes/default/css/plinth.css | 4 +- 3 files changed, 72 insertions(+), 80 deletions(-) diff --git a/plinth/modules/syncthing/manifest.py b/plinth/modules/syncthing/manifest.py index 837cad950..76977f86b 100644 --- a/plinth/modules/syncthing/manifest.py +++ b/plinth/modules/syncthing/manifest.py @@ -36,14 +36,6 @@ clients = [{ 'type': 'package', 'format': 'homebrew', 'name': 'syncthing', - }, { - 'type': - 'download', - 'os': - 'all', - 'url': - 'https://github.com/syncthing/syncthing/releases/tag/v{}' - .format(metadata['syncthing']['version']) }, { 'type': 'download', 'os': Desktop_OS.GNU_LINUX.value, @@ -73,7 +65,7 @@ clients = [{ 'store_name': Store.GOOGLE_PLAY.value, 'fully_qualified_name': - 'com.nutomic.syncthingandroid', + metadata['syncthing']['android-package-id'], 'url': 'https://play.google.com/store/apps/details?id={}' .format(metadata['syncthing']['android-package-id']) @@ -85,7 +77,7 @@ clients = [{ 'store_name': Store.F_DROID.value, 'fully_qualified_name': - 'com.nutomic.syncthingandroid', + metadata['syncthing']['android-package-id'], 'url': 'https://f-droid.org/packages/{}' .format(metadata['syncthing']['android-package-id']) diff --git a/plinth/templates/clients.html b/plinth/templates/clients.html index ad54c01e1..805c1da13 100644 --- a/plinth/templates/clients.html +++ b/plinth/templates/clients.html @@ -19,88 +19,88 @@ {% load i18n %} {% load plinth_extras %} +{% load static %} {% if clients %}

-

-
-{% if clients|has_web_clients %} -
-

{% trans "Web Clients" %}: -

    + + {% if clients|has_web_clients %} {% for client in clients %} {% if client|has_web_clients %} {% for platform in client.platforms %} {% if platform.type == 'web' %} -
  • - {{ client.name}} -
  • - {% endif %} - {% endfor %} + + + + + + {% endif %} + {% endfor %} + {% endif %} + {% endfor %} + {% endif %} + + {% if clients|has_desktop_clients %} + {% for client in clients %} + {% if client|has_desktop_clients %} + + + + + {% endif %} - {% endfor %} - - -{% endif %} - -{% if clients|has_desktop_clients %} -
    - {% load static %} -

    {% trans "Desktop Clients" %}: -

    -
    -{% endif %} - -{% if clients|has_mobile_clients %} -
    - {% load static %} -

    {% trans "Mobile Clients" %}:

    - -
    - {% endif %} - + {% if clients|has_mobile_clients %} + {% for client in clients %} + {% if client|has_mobile_clients %} + + + + + + {% endif %} + {% endfor %} + {% endif %} +
    Web {{ client.name }} + + + +
    Desktop {{ client.name }} +
    + {% for platform in client.platforms %} + {% if platform.type == 'download' %} + + {% endif %} + {% endfor %} +
    +
    Mobile {{ client.name }} +
    + {% for platform in client.platforms %} + {% if platform.type == 'store' and platform.os == 'android' %} + + {% endif %} + {% endfor %} +
    +
    + {% endif %} diff --git a/static/themes/default/css/plinth.css b/static/themes/default/css/plinth.css index cc467f9be..82b6c364a 100644 --- a/static/themes/default/css/plinth.css +++ b/static/themes/default/css/plinth.css @@ -152,14 +152,14 @@ footer license-info p{ /* Icon when collapsible content is shown */ -.btn:after { +#collapsible-button:after { font-family: "Glyphicons Halflings"; content: "\e114"; margin-left: 5px; } /* Icon when collapsible content is hidden */ -.btn.collapsed:after { +#collapsible-button.collapsed:after { content: "\e080"; }