VC_Dummy: updated to work with latest VC version

- updated the vc_dummy plugin to work with the latest version of the VC module
This commit is contained in:
Jacques Dafflon 2015-03-26 18:18:52 +01:00 committed by Alejandro Avilés
parent 9e4c914b8d
commit 9f7a56e4cd
6 changed files with 57 additions and 2 deletions

3
vc_dummy/MANIFEST.in Normal file
View File

@ -0,0 +1,3 @@
graft indico_vc_vidyo/static
graft indico_vc_vidyo/templates
graft indico_vc_vidyo/translations

View File

@ -16,9 +16,10 @@
from __future__ import unicode_literals
from sqlalchemy.orm.attributes import flag_modified
from wtforms.fields.core import BooleanField
from indico.core.plugins import IndicoPlugin
from indico.core.plugins import IndicoPlugin, url_for_plugin, IndicoPluginBlueprint
from indico.modules.vc import VCPluginMixin
from indico.modules.vc.forms import VCRoomFormBase
from indico.web.forms.widgets import SwitchWidget
@ -37,7 +38,32 @@ class DummyPlugin(VCPluginMixin, IndicoPlugin):
"""
configurable = True
vc_room_form = VCRoomForm
friendly_name = "Dummy"
@property
def logo_url(self):
return "http://fc05.deviantart.net/fs70/f/2011/257/7/7/_dummy__vector_by_phlum-d49u7mk.png"
return url_for_plugin(self.name + '.static', filename='images/dummy_logo.png')
@property
def icon_url(self):
return url_for_plugin(self.name + '.static', filename='images/dummy_icon.png')
def get_blueprints(self):
return IndicoPluginBlueprint('vc_dummy', __name__)
def create_room(self, vc_room, event):
pass
def delete_room(self, vc_room, event):
pass
def update_room(self, vc_room, event):
pass
def update_data_association(self, event, vc_room, event_vc_room, data):
super(DummyPlugin, self).update_data_association(event, vc_room, event_vc_room, data)
event_vc_room.data.update({key: data.pop(key) for key in [
'show_phone_numbers'
]})
flag_modified(event_vc_room, 'data')

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@ -0,0 +1,13 @@
<dl class="details-container">
<dt>{% trans %}Plugin type{% endtrans %}</dt>
<dd>{{ vc_room.type }}</dd>
<dt>{% trans %}Favorite color{% endtrans %}</dt>
<dd><i
{% if event_vc_room.data.show_phone_numbers %}
class="icon-checkbox-checked"
{% else %}
class="icon-checkbox-unchecked"
{% endif %}
></i>
</dd>
</dl>

View File

@ -0,0 +1,13 @@
<dl class="details-container">
<dt>{% trans %}Plugin type{% endtrans %}</dt>
<dd>{{ vc_room.type }}</dd>
<dt>{% trans %}Favorite color{% endtrans %}</dt>
<dd><i
{% if event_vc_room.data.show_phone_numbers %}
class="icon-checkbox-checked"
{% else %}
class="icon-checkbox-unchecked"
{% endif %}
></i>
</dd>
</dl>