Generated: Wed 2013-03-13 10:33 CET
Source file: /media/Envs/Envs/filer-gallery/lib/python2.7/site-packages/cms/plugins/video/cms_plugins.py
Stats: 0 executed, 14 missed, 6 excluded, 35 ignored
from cms.plugin_pool import plugin_poolfrom cms.plugin_base import CMSPluginBasefrom django.utils.translation import ugettext_lazy as _from cms.plugins.video import settingsfrom cms.plugins.video.models import Videofrom cms.plugins.video.forms import VideoFormclass VideoPlugin(CMSPluginBase): model = Video name = _("Video") form = VideoForm render_template = "cms/plugins/video.html" general_fields = [ ('movie', 'movie_url'), 'image', ('width', 'height'), 'auto_play', 'auto_hide', 'fullscreen', 'loop', ] color_fields = [ 'bgcolor', 'textcolor', 'seekbarcolor', 'seekbarbgcolor', 'loadingbarcolor', 'buttonoutcolor', 'buttonovercolor', 'buttonhighlightcolor', ] fieldsets = [ (None, { 'fields': general_fields, }), ] if settings.VIDEO_PLUGIN_ENABLE_ADVANCED_SETTINGS: fieldsets += [ (_('Color Settings'), { 'fields': color_fields, 'classes': ('collapse',), }), ] def render(self, context, instance, placeholder): context.update({ 'object': instance, 'placeholder':placeholder, }) return contextplugin_pool.register_plugin(VideoPlugin)