src/templates/modules/menus/sidebar.html \
src/templates/modules/menus/topbar.html
+dist_templates_system_DATA = \
+ src/templates/system/about.html
+
+templates_systemdir = $(templatesdir)/system
+
ui_modulesdir = $(datadir)/westferry/templates/modules
ui_modules_DATA =
--- /dev/null
+{% extends "../base.html" %}
+
+{% block main %}
+ <h3>{{ _("About") }}</h3>
+
+ {% for header in tables %}
+ <table>
+ <thead>
+ <tr>
+ <th colspan="2">{{ header }}</th>
+ </tr>
+ </thead>
+
+ <tbody>
+ {% for key in tables[header] %}
+ <tr>
+ <td>{{ key }}</td>
+ <td>{{ tables[header][key] }}</td>
+ </tr>
+ {% end %}
+ </tbody>
+ </table>
+ {% end %}
+{% end block %}
from . import base
from .. import ui
+from ..constants import PACKAGE_NAME, PACKAGE_VERSION
from ..i18n import N_
class BaseHandler(base.BaseHandler):
# Settings
menu.add_handler(SettingsHandler)
+ # About
+ menu.add_handler(AboutHandler)
+
return menu
form = tab.add_form()
form.add_text_input("hostname", _("Hostname"), object=self.backend.system)
+
+
+class AboutHandler(BaseHandler):
+ title = N_("About")
+ url = r"/system/about"
+
+ def get(self):
+ _ = self.locale.translate
+
+ tables = {
+ _("Software Versions") : {
+ PACKAGE_NAME : PACKAGE_VERSION,
+ _("systemd") : self.backend.system.systemd.Version,
+ }
+ }
+
+ self.render("system/about.html", tables=tables)