diff --git a/playlist/models/profile.py b/playlist/models/profile.py index 12a203e..81ae35a 100644 --- a/playlist/models/profile.py +++ b/playlist/models/profile.py @@ -23,6 +23,11 @@ class Profile(models.Model): quota = models.FloatField(default=10.0) quota_last_updated = models.DateTimeField(default=timezone.now, null=False) + + @property + def quota_display(self): + return int(self.quota) + def update_quota(self): elapsed = timezone.now() - self.quota_last_updated if elapsed.seconds > 300: diff --git a/playlist/static/img/gears.png b/playlist/static/img/gears.png new file mode 100644 index 0000000..6600aa9 Binary files /dev/null and b/playlist/static/img/gears.png differ diff --git a/playlist/static/style.css b/playlist/static/style.css index 9d983ee..8cb8ff5 100644 --- a/playlist/static/style.css +++ b/playlist/static/style.css @@ -203,7 +203,7 @@ iframe { } .clippy .body { - background: lightyellow; + background: #ffffe0; color: black; padding: 10px; border-radius: 10px; @@ -328,8 +328,19 @@ iframe { width: 360px; } -.progress-indicator.segmented > .progress-indicator-bar { +.field-row.settings label { + width: 200px; } -.status-bar-field { +.field-row.settings { + margin-bottom: 8px; +} + +.settings .admin-panel { + background-image: url(img/gears.png); + height: 40px; + background-repeat: no-repeat; + background-position: 50% 50%; + width: 40px; + min-width: 0; } \ No newline at end of file diff --git a/playlist/templates/Nominate.html b/playlist/templates/Nominate.html index 69e391e..35b580e 100644 --- a/playlist/templates/Nominate.html +++ b/playlist/templates/Nominate.html @@ -57,6 +57,6 @@ Nomineren > -

{{user.profile.quota|floatformat:0}} nominaties over.

+

{{user.profile.quota_display}} nominaties over.

{% endblock %} diff --git a/playlist/templates/Settings.html b/playlist/templates/Settings.html index 9b2618e..2654aa1 100644 --- a/playlist/templates/Settings.html +++ b/playlist/templates/Settings.html @@ -5,19 +5,19 @@ Instellingen {% endblock %} {% block main-content %} -

Hoi {{ user.first_name }}!

+

Je bent ingelogd als {{ user.email }}.

{% if user.is_staff %}
-
+
- +
{% endif %}
{% csrf_token %} {% if backgrounds %} -
+