diff --git a/plinth/menu.py b/plinth/menu.py index 074f040d9..10fb6c385 100644 --- a/plinth/menu.py +++ b/plinth/menu.py @@ -23,7 +23,7 @@ from plinth.utils import format_lazy class Menu(object): """One menu item.""" - def __init__(self, label="", icon="", url="#", order=50): + def __init__(self, name="",short_description="", label="", icon="", url="#", order=50): """label is the text that is displayed on the menu. icon is the icon to be displayed next to the label. @@ -41,6 +41,8 @@ class Menu(object): use fractional orders. """ + self.name = name + self.short_description = short_description self.label = label self.icon = icon self.url = url @@ -61,7 +63,7 @@ class Menu(object): def sorted_items(self): """Return menu items in sorted order according to current locale.""" - return sorted(self.items, key=lambda x: (x.order, x.label)) + return sorted(self.items, key=lambda x: (x.order, x.name.lower())) def add_urlname(self, name, icon, urlname, short_description="", order=50, url_args=None, url_kwargs=None): @@ -75,14 +77,14 @@ class Menu(object): else: label = name url = reverse_lazy(urlname, args=url_args, kwargs=url_kwargs) - return self.add_item(label, icon, url, order) + return self.add_item(name, short_description, label, icon, url, order) - def add_item(self, label, icon, url, order=50): + def add_item(self, name, short_description, label, icon, url, order=50): """Create a new menu item with given parameters, add it to this menu and return it. """ - item = Menu(label=label, icon=icon, url=url, order=order) + item = Menu(name=name, short_description=short_description, label=label, icon=icon, url=url, order=order) self.items.append(item) return item diff --git a/plinth/templates/apps.html b/plinth/templates/apps.html index 2bbc73d45..db6b26d84 100644 --- a/plinth/templates/apps.html +++ b/plinth/templates/apps.html @@ -1,4 +1,4 @@ -{% extends 'base.html' %} +{% extends 'cards.html' %} {% comment %} # # This file is part of FreedomBox. @@ -18,35 +18,13 @@ # {% endcomment %} +{% load static %} {% load i18n %} -{% block submenu %} - {% if submenu %} - - {% endif %} -{% endblock %} - -{% block content %} - -

{% trans "Services and Applications" %}

- -

- {% blocktrans trimmed %} - You can install and run various services and applications on - your {{ box_name }}. Click on any app page link on the left to - read a description of the application and choose to install it. - {% endblocktrans %} -

- -

- {% blocktrans trimmed %} - This box can be your photo sharing site, your instant messaging - site, your social networking site, your news site. Remember web - portals? We can be one of those too. Many of the services you - use on the web could soon be on site and under your control! - {% endblocktrans %} -

- +{% block page_head %} + {% endblock %} diff --git a/plinth/templates/base.html b/plinth/templates/base.html index f4e5810ee..8450f2d0a 100644 --- a/plinth/templates/base.html +++ b/plinth/templates/base.html @@ -77,7 +77,7 @@
-