Author: KRavEN
Date: 2010-04-15 18:00:01 +0200 (Thu, 15 Apr 2010)
New Revision: 29163
Modified:
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
Log:
added credentials for formpanel buttons
Modified:
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
===================================================================
---
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
2010-04-15 15:48:53 UTC (rev 29162)
+++
plugins/sfExtjsThemePlugin/branches/1_2/ExtjsGeneratorPlugin/data/generator/DbFinderAdmin/extjs/template/templates/__edit_form_inner.php
2010-04-15 16:00:01 UTC (rev 29163)
@@ -224,8 +224,15 @@
if (count($editActions) > 0): ?>
$formpanel->config_array['tbar'] = array();
-<?php foreach ($editActions as $actionName => $params): ?>
- //TODO: add credential check
+<?php foreach ($editActions as $actionName => $params):
+ $buttoncreds = (isset($params['credentials'])) ? $params['credentials'] :
false;
+ if($buttoncreds)
+ {
+ $buttoncreds = str_replace("\n", ' ', var_export($buttoncreds, true));
+ echo "if(\$sf_user->hasCredential($buttoncreds)):";
+ }
+?>
$formpanel->config_array['tbar'][] = <?php
var_export($this->DbFinderAdminGenerator->getEditAjaxActionToButton($actionName,
$params, $edit_ns, true)) ?>;
+<?php if($buttoncreds) echo 'endif;' ?>
<?php endforeach ?>
<?php endif ?>
--
You received this message because you are subscribed to the Google Groups
"symfony SVN" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/symfony-svn?hl=en.