diff --git a/planning/forms.py b/planning/forms.py index 831748d..3f4c12f 100644 --- a/planning/forms.py +++ b/planning/forms.py @@ -10,7 +10,7 @@ class RoomForm(forms.ModelForm): class Meta: model = Room - fields = ['name', 'label', 'capacity'] + fields = ['name', 'label', 'capacity', 'sound'] def clean_name(self): name = self.cleaned_data['name'] diff --git a/planning/migrations/0002_room_sound.py b/planning/migrations/0002_room_sound.py new file mode 100644 index 0000000..c6106dd --- /dev/null +++ b/planning/migrations/0002_room_sound.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-05-26 11:18 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('planning', '0001_initial'), + ] + + operations = [ + migrations.AddField( + model_name='room', + name='sound', + field=models.BooleanField(default=False), + ), + ] diff --git a/planning/models.py b/planning/models.py index 4454805..4cebb46 100644 --- a/planning/models.py +++ b/planning/models.py @@ -14,6 +14,7 @@ class Room(models.Model): name = models.CharField(max_length=256, blank=True, default="") label = models.CharField(max_length=256, blank=True, default="") capacity = models.IntegerField(default=0) + sound = models.BooleanField(default=False) class Meta: unique_together = ['site', 'name'] diff --git a/planning/templates/planning/room_detail.html b/planning/templates/planning/room_detail.html index b3d2690..15af3c0 100644 --- a/planning/templates/planning/room_detail.html +++ b/planning/templates/planning/room_detail.html @@ -8,6 +8,7 @@

{{ room.name }} {{ room.label }} +

{% trans "Scheduled talks" %}

diff --git a/planning/templates/planning/room_list.html b/planning/templates/planning/room_list.html index 3e47a90..001a9d5 100644 --- a/planning/templates/planning/room_list.html +++ b/planning/templates/planning/room_list.html @@ -15,7 +15,10 @@
{% for room in room_list %}
-

{{ room }}

+

+ {{ room }} + +

{% if room.label %}

{{ room.label }}

{% endif %}

{{ room.capacity }} {% trans "place" %}{{ room.capacity|pluralize }}