diff --git a/airtime_mvc/application/configs/ACL.php b/airtime_mvc/application/configs/ACL.php index c41f00a47..243e105d3 100644 --- a/airtime_mvc/application/configs/ACL.php +++ b/airtime_mvc/application/configs/ACL.php @@ -36,7 +36,8 @@ $ccAcl->add(new Zend_Acl_Resource('library')) ->add(new Zend_Acl_Resource('rest:media')) ->add(new Zend_Acl_Resource('rest:show-image')) ->add(new Zend_Acl_Resource('billing')) - ->add(new Zend_Acl_Resource('provisioning')); + ->add(new Zend_Acl_Resource('provisioning')) + ->add(new Zend_Acl_Resource('embeddableplayer')); /** Creating permissions */ $ccAcl->allow('G', 'index') @@ -68,6 +69,7 @@ $ccAcl->allow('G', 'index') ->allow('A', 'user') ->allow('A', 'systemstatus') ->allow('A', 'preference') + ->allow('A', 'embeddableplayer') ->allow('S', 'billing'); diff --git a/airtime_mvc/application/configs/navigation.php b/airtime_mvc/application/configs/navigation.php index 14438bdfe..01c8aa385 100644 --- a/airtime_mvc/application/configs/navigation.php +++ b/airtime_mvc/application/configs/navigation.php @@ -85,6 +85,13 @@ $pages = array( 'controller' => 'listenerstat', 'action' => 'index', 'resource' => 'listenerstat' + ), + array( + 'label' => _('Embeddable Player'), + 'module' => 'default', + 'controller' => 'embeddableplayer', + 'action' => 'index', + 'resource' => 'embeddableplayer' ) ) ), diff --git a/airtime_mvc/application/controllers/EmbeddableplayerController.php b/airtime_mvc/application/controllers/EmbeddableplayerController.php new file mode 100644 index 000000000..3cd0e3af4 --- /dev/null +++ b/airtime_mvc/application/controllers/EmbeddableplayerController.php @@ -0,0 +1,31 @@ +getRequest(); + + if ($request->isPost()) { + $formValues = $request->getPost(); + if ($form->isValid($formValues)) { + + $this->view->statusMsg = "
". _("Preferences updated.")."
"; + + } else { + + } + + $this->view->form = $form; + } + + $this->view->form = $form; + } +} \ No newline at end of file diff --git a/airtime_mvc/application/forms/EmbeddablePlayer.php b/airtime_mvc/application/forms/EmbeddablePlayer.php new file mode 100644 index 000000000..e9dd6b151 --- /dev/null +++ b/airtime_mvc/application/forms/EmbeddablePlayer.php @@ -0,0 +1,20 @@ +setDecorators(array( + array('ViewScript', array('viewScript' => 'form/embeddableplayer.html')) + )); + + + $displayTrackMetadata = new Zend_Form_Element_Checkbox('display_track_metadata'); + $displayTrackMetadata->setValue(true); + $displayTrackMetadata->setLabel(_('Display track metadata?')); + $this->addElement($displayTrackMetadata); + + $submit = new Zend_Form_Element_Submit('submit'); + $this->addElement($submit); + } +} \ No newline at end of file diff --git a/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml b/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml new file mode 100644 index 000000000..df666df29 --- /dev/null +++ b/airtime_mvc/application/views/scripts/embeddableplayer/index.phtml @@ -0,0 +1,15 @@ +
+

+ +
+ + form->getElement('submit')->render() ?> +
+ statusMsg; + echo $this->form; + ?> +
+
+
diff --git a/airtime_mvc/application/views/scripts/form/embeddableplayer.html b/airtime_mvc/application/views/scripts/form/embeddableplayer.html new file mode 100644 index 000000000..4a8844f58 --- /dev/null +++ b/airtime_mvc/application/views/scripts/form/embeddableplayer.html @@ -0,0 +1,6 @@ +
+
+ element->getElement('display_track_metadata'); ?> + +
+
\ No newline at end of file