mirror of
https://github.com/lucaspalomodevelop/indico-plugins.git
synced 2026-03-12 23:27:22 +00:00
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:
parent
9e4c914b8d
commit
9f7a56e4cd
3
vc_dummy/MANIFEST.in
Normal file
3
vc_dummy/MANIFEST.in
Normal file
@ -0,0 +1,3 @@
|
||||
graft indico_vc_vidyo/static
|
||||
graft indico_vc_vidyo/templates
|
||||
graft indico_vc_vidyo/translations
|
||||
@ -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')
|
||||
|
||||
BIN
vc_dummy/indico_vc_dummy/static/images/dummy_icon.png
Normal file
BIN
vc_dummy/indico_vc_dummy/static/images/dummy_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.3 KiB |
BIN
vc_dummy/indico_vc_dummy/static/images/dummy_logo.png
Normal file
BIN
vc_dummy/indico_vc_dummy/static/images/dummy_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 6.6 KiB |
13
vc_dummy/indico_vc_dummy/templates/info_box.html
Normal file
13
vc_dummy/indico_vc_dummy/templates/info_box.html
Normal 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>
|
||||
@ -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>
|
||||
Loading…
x
Reference in New Issue
Block a user