diff --git a/openslides/core/migrations/0007_manage_chat_permission.py b/openslides/core/migrations/0007_manage_chat_permission.py new file mode 100644 index 000000000..704fd4db1 --- /dev/null +++ b/openslides/core/migrations/0007_manage_chat_permission.py @@ -0,0 +1,19 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.1 on 2016-10-17 09:50 +from __future__ import unicode_literals + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('core', '0006_multiprojector'), + ] + + operations = [ + migrations.AlterModelOptions( + name='chatmessage', + options={'default_permissions': (), 'permissions': (('can_use_chat', 'Can use the chat'), ('can_manage_chat', 'Can manage the chat'))}, + ), + ] diff --git a/openslides/core/models.py b/openslides/core/models.py index cffa04d76..583071f35 100644 --- a/openslides/core/models.py +++ b/openslides/core/models.py @@ -287,7 +287,8 @@ class ChatMessage(RESTModelMixin, models.Model): class Meta: default_permissions = () permissions = ( - ('can_use_chat', 'Can use the chat'),) + ('can_use_chat', 'Can use the chat'), + ('can_manage_chat', 'Can manage the chat'),) def __str__(self): return 'Message {}'.format(self.timestamp) diff --git a/openslides/core/static/css/app.css b/openslides/core/static/css/app.css index 02ce19333..92dbc1504 100644 --- a/openslides/core/static/css/app.css +++ b/openslides/core/static/css/app.css @@ -1223,7 +1223,7 @@ img { border-color: #dddddd; border-width: 1px; box-shadow: -5px 5px 5px rgba(0, 0, 0, 0.2); - height: 200px; + height: 234px; padding: 0 10px 10px 10px; z-index: 5; } diff --git a/openslides/core/static/js/core/site.js b/openslides/core/static/js/core/site.js index ea3c85529..c66b9ed41 100644 --- a/openslides/core/static/js/core/site.js +++ b/openslides/core/static/js/core/site.js @@ -1296,6 +1296,10 @@ angular.module('OpenSlidesApp.core.site', [ } } }); + + $scope.clearChatHistory = function () { + console.log("Clear"); + }; } ]) diff --git a/openslides/core/static/templates/index.html b/openslides/core/static/templates/index.html index 9a4939fd6..2a58195da 100644 --- a/openslides/core/static/templates/index.html +++ b/openslides/core/static/templates/index.html @@ -63,6 +63,12 @@ + diff --git a/openslides/users/signals.py b/openslides/users/signals.py index d2d4eb58c..c546f9daa 100644 --- a/openslides/users/signals.py +++ b/openslides/users/signals.py @@ -27,6 +27,7 @@ def create_builtin_groups_and_admin(**kwargs): 'core.can_manage_config', 'core.can_manage_projector', 'core.can_manage_tags', + 'core.can_manage_chat', 'core.can_see_frontpage', 'core.can_see_projector', 'core.can_use_chat', @@ -102,6 +103,7 @@ def create_builtin_groups_and_admin(**kwargs): permission_dict['core.can_manage_projector'], permission_dict['core.can_manage_tags'], permission_dict['core.can_use_chat'], + permission_dict['core.can_manage_chat'], permission_dict['mediafiles.can_see'], permission_dict['mediafiles.can_manage'], permission_dict['mediafiles.can_upload'],