diff --git a/core/static/core/style.css b/core/static/core/style.css index ec23054d..6e5c8408 100644 --- a/core/static/core/style.css +++ b/core/static/core/style.css @@ -20,8 +20,15 @@ header { position: absolute; top : 0px; right : 8%; - left: 40%; background-color:#DDD; + margin: 0 10px; + padding: 0 10px; +} +header ul { + display: inline-block; + list-style-type: none; + margin: 0px; + vertical-align: middle; } header a { display: inline-block; diff --git a/core/templates/core/base.jinja b/core/templates/core/base.jinja index 94323740..a4a1b8e7 100644 --- a/core/templates/core/base.jinja +++ b/core/templates/core/base.jinja @@ -21,6 +21,18 @@ {% trans %}Login{% endtrans %} | {% trans %}Register{% endtrans %} {% else %} + {{ user.get_display_name() }} | {% trans %}Tools{% endtrans %} | {% trans %}Logout{% endtrans %} @@ -40,7 +52,7 @@
{% csrf_token %} - +
{% endfor %} diff --git a/counter/models.py b/counter/models.py index a08783b1..c45cd043 100644 --- a/counter/models.py +++ b/counter/models.py @@ -184,10 +184,7 @@ class Counter(models.Model): return bl[random.randrange(0, len(bl))] def is_open(self): - response = False - if len(self.get_barmen_list()) > 0: - response = True - return response + return len(self.get_barmen_list()) > 0: def barman_list(self): return [b.id for b in self.get_barmen_list()] diff --git a/sith/settings_sample.py b/sith/settings_sample.py index ebe15cdd..d02a2c62 100644 --- a/sith/settings_sample.py +++ b/sith/settings_sample.py @@ -111,6 +111,7 @@ TEMPLATES = [ "can_view": "core.views.can_view", "get_subscriber": "subscription.views.get_subscriber", "settings": "sith.settings", + "Counter": "counter.models.Counter", }, "bytecode_cache": { "name": "default",