Skip to content

Instantly share code, notes, and snippets.

@jippi
Forked from sebbdk/gist:1827515
Created February 14, 2012 15:21
Show Gist options
  • Save jippi/1827525 to your computer and use it in GitHub Desktop.
Save jippi/1827525 to your computer and use it in GitHub Desktop.
<?php
echo $this->element('Crud/form', array(
'model' => 'FaxekondiVideo',
'columns' => array(
'name',
'description' => array('type' => 'textarea'),
1) 'video_asset_file_id' => array('element' => array('admin_form_selector', array('settings' => array('image' => false)), array('plugin' => 'Hest')))
if ($config['element']) {
echo call_user_func_array(array($this, 'element'), $config['element']);
}
2) 'video_asset_file_id' => array('element' => 'Assets.admin_form_selector', 'settings' => array('image' => false))
//'image_asset_file_id' => array('element' => 'Assets.admin_form_selector')
),
'top_actions' => array(
'10_view' => function($View, $baseUrl, $model) { return $View->Html->link(__d('common', 'Back to overview'), array('action' => 'index') + $baseUrl, array('class' => 'btn info')); },
'20_delete' => function($View, $baseUrl, $model) {
if ($View->Form->value('Project.id')) {
return $View->Form->postLink(__d('common', 'Delete'), array('action' => 'delete', $View->Form->value('Project.id')) + $baseUrl, array('class' => 'btn danger'));
}
},
)
), array(
'plugin' => 'TwitterBootstrap'
));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment