--- /dev/null
+gb.png
\ No newline at end of file
<table class="stats">
{% for k, v in items %}
<tr>
- <td class="key">{{ k }}</td>
+ <td class="key">
+ {% if flags %}
+ <img src="{{ static_url("images/flags/%s.png" % k) }}" />
+ {% end %}
+ {{ k }}
+ </td>
<td class="bar"><p style="{{ "width: %.2f%%" % v }}"> </p></td>
<td class="value">{{ "%.2f" % v }}%</td>
</tr>
This will give a short overview about what languages are configured
on the IPFire webinterface.
</p>
- {{ modules.StasyTable(languages, sortby="percentage") }}
+ {{ modules.StasyTable(languages, sortby="percentage", flags=True) }}
<h3>{{ _("Geo locations") }}</h3>
<p>
This chart shows us in which country IPFire is running.
</p>
- {{ modules.StasyTable(geo_locations, sortby="percentage") }}
+ {{ modules.StasyTable(geo_locations, sortby="percentage", flags=True) }}
{% end block %}
class StasyTableModule(UIModule):
- def render(self, items, sortby="key", reverse=False, percentage=False):
+ def render(self, items, sortby="key", reverse=False, percentage=False, flags=False):
hundred_percent = 0
for v in items.values():
hundred_percent += v
_items.append((k, v))
items = _items
- return self.render_string("modules/stasy-table.html", items=items)
+ return self.render_string("modules/stasy-table.html", items=items, flags=flags)
class StasyDeviceTableModule(UIModule):