Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed admin generator (too unstable)

  • Loading branch information...
commit 1f5a96faae5fb7db73716c14e5a649f9a665ba8c 1 parent a52197a
@fruit authored
Showing with 0 additions and 1,087 deletions.
  1. +0 −41 data/generator/sfDoctrineModule/cachable/parts/actionsConfiguration.php
  2. +0 −62 data/generator/sfDoctrineModule/cachable/parts/batchAction.php
  3. +0 −59 data/generator/sfDoctrineModule/cachable/parts/configuration.php
  4. +0 −9 data/generator/sfDoctrineModule/cachable/parts/createAction.php
  5. +0 −13 data/generator/sfDoctrineModule/cachable/parts/deleteAction.php
  6. +0 −18 data/generator/sfDoctrineModule/cachable/parts/editAction.php
  7. +0 −86 data/generator/sfDoctrineModule/cachable/parts/fieldsConfiguration.php
  8. +0 −26 data/generator/sfDoctrineModule/cachable/parts/filterAction.php
  9. +0 −9 data/generator/sfDoctrineModule/cachable/parts/filtersAction.php
  10. +0 −19 data/generator/sfDoctrineModule/cachable/parts/indexAction.php
  11. +0 −5 data/generator/sfDoctrineModule/cachable/parts/newAction.php
  12. +0 −49 data/generator/sfDoctrineModule/cachable/parts/paginationAction.php
  13. +0 −11 data/generator/sfDoctrineModule/cachable/parts/paginationConfiguration.php
  14. +0 −43 data/generator/sfDoctrineModule/cachable/parts/processFormAction.php
  15. +0 −41 data/generator/sfDoctrineModule/cachable/parts/sortingAction.php
  16. +0 −10 data/generator/sfDoctrineModule/cachable/parts/sortingConfiguration.php
  17. +0 −7 data/generator/sfDoctrineModule/cachable/parts/updateAction.php
  18. +0 −16 data/generator/sfDoctrineModule/cachable/skeleton/actions/actions.class.php
  19. +0 −13 data/generator/sfDoctrineModule/cachable/skeleton/config/generator.yml
  20. +0 −13 data/generator/sfDoctrineModule/cachable/skeleton/lib/configuration.php
  21. +0 −13 data/generator/sfDoctrineModule/cachable/skeleton/lib/helper.php
  22. 0  data/generator/sfDoctrineModule/cachable/skeleton/templates/.sf
  23. +0 −61 data/generator/sfDoctrineModule/cachable/template/actions/actions.class.php
  24. +0 −17 data/generator/sfDoctrineModule/cachable/template/lib/helper.php
  25. +0 −6 data/generator/sfDoctrineModule/cachable/template/templates/_assets.php
  26. +0 −36 data/generator/sfDoctrineModule/cachable/template/templates/_filters.php
  27. +0 −20 data/generator/sfDoctrineModule/cachable/template/templates/_filters_field.php
  28. +0 −7 data/generator/sfDoctrineModule/cachable/template/templates/_flashes.php
  29. +0 −18 data/generator/sfDoctrineModule/cachable/template/templates/_form.php
  30. +0 −35 data/generator/sfDoctrineModule/cachable/template/templates/_form_actions.php
  31. +0 −20 data/generator/sfDoctrineModule/cachable/template/templates/_form_field.php
  32. +0 −18 data/generator/sfDoctrineModule/cachable/template/templates/_form_fieldset.php
  33. 0  data/generator/sfDoctrineModule/cachable/template/templates/_form_footer.php
  34. 0  data/generator/sfDoctrineModule/cachable/template/templates/_form_header.php
  35. +0 −54 data/generator/sfDoctrineModule/cachable/template/templates/_list.php
  36. +0 −11 data/generator/sfDoctrineModule/cachable/template/templates/_list_actions.php
  37. +0 −15 data/generator/sfDoctrineModule/cachable/template/templates/_list_batch_actions.php
  38. +0 −5 data/generator/sfDoctrineModule/cachable/template/templates/_list_field_boolean.php
  39. 0  data/generator/sfDoctrineModule/cachable/template/templates/_list_footer.php
  40. 0  data/generator/sfDoctrineModule/cachable/template/templates/_list_header.php
  41. +0 −18 data/generator/sfDoctrineModule/cachable/template/templates/_list_td_actions.php
  42. +0 −3  data/generator/sfDoctrineModule/cachable/template/templates/_list_td_batch_actions.php
  43. +0 −3  data/generator/sfDoctrineModule/cachable/template/templates/_list_td_stacked.php
  44. +0 −9 data/generator/sfDoctrineModule/cachable/template/templates/_list_td_tabular.php
  45. +0 −1  data/generator/sfDoctrineModule/cachable/template/templates/_list_th_stacked.php
  46. +0 −17 data/generator/sfDoctrineModule/cachable/template/templates/_list_th_tabular.php
  47. +0 −25 data/generator/sfDoctrineModule/cachable/template/templates/_pagination.php
  48. +0 −35 data/generator/sfDoctrineModule/cachable/template/templates/editSuccess.php
  49. +0 −50 data/generator/sfDoctrineModule/cachable/template/templates/indexSuccess.php
  50. +0 −20 data/generator/sfDoctrineModule/cachable/template/templates/newSuccess.php
  51. +0 −20 data/generator/sfDoctrineModule/cachable/template/templates/updateSuccess.php
View
41 data/generator/sfDoctrineModule/cachable/parts/actionsConfiguration.php
@@ -1,41 +0,0 @@
- public function getActionsDefault()
- {
- return <?php echo $this->asPhp(isset($this->config['actions']) ? $this->config['actions'] : array()) ?>;
-<?php unset($this->config['actions']) ?>
- }
-
- public function getFormActions()
- {
- return <?php echo $this->asPhp(isset($this->config['form']['actions']) ? $this->config['form']['actions'] : array('_delete' => null, '_list' => null, '_save' => null, '_save_and_add' => null)) ?>;
-<?php unset($this->config['form']['actions']) ?>
- }
-
- public function getNewActions()
- {
- return <?php echo $this->asPhp(isset($this->config['new']['actions']) ? $this->config['new']['actions'] : array()) ?>;
-<?php unset($this->config['new']['actions']) ?>
- }
-
- public function getEditActions()
- {
- return <?php echo $this->asPhp(isset($this->config['edit']['actions']) ? $this->config['edit']['actions'] : array()) ?>;
-<?php unset($this->config['edit']['actions']) ?>
- }
-
- public function getListObjectActions()
- {
- return <?php echo $this->asPhp(isset($this->config['list']['object_actions']) ? $this->config['list']['object_actions'] : array('_edit' => null, '_delete' => null)) ?>;
-<?php unset($this->config['list']['object_actions']) ?>
- }
-
- public function getListActions()
- {
- return <?php echo $this->asPhp(isset($this->config['list']['actions']) ? $this->config['list']['actions'] : array('_new' => null)) ?>;
-<?php unset($this->config['list']['actions']) ?>
- }
-
- public function getListBatchActions()
- {
- return <?php echo $this->asPhp(isset($this->config['list']['batch_actions']) ? $this->config['list']['batch_actions'] : array('_delete' => null)) ?>;
-<?php unset($this->config['list']['batch_actions']) ?>
- }
View
62 data/generator/sfDoctrineModule/cachable/parts/batchAction.php
@@ -1,62 +0,0 @@
- public function executeBatch(sfWebRequest $request)
- {
- $request->checkCSRFProtection();
-
- if (!$ids = $request->getParameter('ids'))
- {
- $this->getUser()->setFlash('error', 'You must at least select one item.');
-
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
-
- if (!$action = $request->getParameter('batch_action'))
- {
- $this->getUser()->setFlash('error', 'You must select an action to execute on the selected items.');
-
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
-
- if (!method_exists($this, $method = 'execute'.ucfirst($action)))
- {
- throw new InvalidArgumentException(sprintf('You must create a "%s" method for action "%s"', $method, $action));
- }
-
- if (!$this->getUser()->hasCredential($this->configuration->getCredentials($action)))
- {
- $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
- }
-
- $validator = new sfValidatorDoctrineChoice(array('multiple' => true, 'model' => '<?php echo $this->getModelClass() ?>'));
- try
- {
- // validate ids
- $ids = $validator->clean($ids);
-
- // execute batch
- $this->$method($request);
- }
- catch (sfValidatorError $e)
- {
- $this->getUser()->setFlash('error', 'A problem occurs when deleting the selected items as some items do not exist anymore.');
- }
-
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
-
- protected function executeBatchDelete(sfWebRequest $request)
- {
- $ids = $request->getParameter('ids');
-
- $records = Doctrine_Query::create()
- ->from('<?php echo $this->getModelClass() ?>')
- ->whereIn('<?php echo $this->getPrimaryKeys(true) ?>', $ids)
- ->execute();
-
- foreach ($records as $record)
- {
- $record->delete();
- }
-
- $this->getUser()->setFlash('notice', 'The selected items have been deleted successfully.');
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
View
59 data/generator/sfDoctrineModule/cachable/parts/configuration.php
@@ -1,59 +0,0 @@
-[?php
-
-/**
- * <?php echo $this->getModuleName() ?> module configuration.
- *
- * @package ##PROJECT_NAME##
- * @subpackage <?php echo $this->getModuleName()."\n" ?>
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: configuration.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
- */
-abstract class Base<?php echo ucfirst($this->getModuleName()) ?>GeneratorConfiguration extends sfModelGeneratorConfiguration
-{
-<?php include dirname(__FILE__).'/actionsConfiguration.php' ?>
-
-<?php include dirname(__FILE__).'/fieldsConfiguration.php' ?>
-
- /**
- * Gets the form class name.
- *
- * @return string The form class name
- */
- public function getFormClass()
- {
- return '<?php echo isset($this->config['form']['class']) ? $this->config['form']['class'] : $this->getModelClass().'Form' ?>';
-<?php unset($this->config['form']['class']) ?>
- }
-
- public function hasFilterForm()
- {
- return <?php echo !isset($this->config['filter']['class']) || false !== $this->config['filter']['class'] ? 'true' : 'false' ?>;
- }
-
- /**
- * Gets the filter form class name
- *
- * @return string The filter form class name associated with this generator
- */
- public function getFilterFormClass()
- {
- return '<?php echo isset($this->config['filter']['class']) && !in_array($this->config['filter']['class'], array(null, true, false), true) ? $this->config['filter']['class'] : $this->getModelClass().'FormFilter' ?>';
-<?php unset($this->config['filter']['class']) ?>
- }
-
-<?php include dirname(__FILE__).'/paginationConfiguration.php' ?>
-
-<?php include dirname(__FILE__).'/sortingConfiguration.php' ?>
-
- public function getTableMethod()
- {
- return '<?php echo isset($this->config['list']['table_method']) ? $this->config['list']['table_method'] : null ?>';
-<?php unset($this->config['list']['table_method']) ?>
- }
-
- public function getTableCountMethod()
- {
- return '<?php echo isset($this->config['list']['table_count_method']) ? $this->config['list']['table_count_method'] : null ?>';
-<?php unset($this->config['list']['table_count_method']) ?>
- }
-}
View
9 data/generator/sfDoctrineModule/cachable/parts/createAction.php
@@ -1,9 +0,0 @@
- public function executeCreate(sfWebRequest $request)
- {
- $this->form = $this->configuration->getForm();
- $this-><?php echo $this->getSingularName() ?> = $this->form->getObject();
-
- $this->processForm($request, $this->form);
-
- $this->setTemplate('new');
- }
View
13 data/generator/sfDoctrineModule/cachable/parts/deleteAction.php
@@ -1,13 +0,0 @@
- public function executeDelete(sfWebRequest $request)
- {
- $request->checkCSRFProtection();
-
- $this->dispatcher->notify(new sfEvent($this, 'admin.delete_object', array('object' => $this->getRoute()->getObject())));
-
- if ($this->getRoute()->getObject()->delete())
- {
- $this->getUser()->setFlash('notice', 'The item was deleted successfully.');
- }
-
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
View
18 data/generator/sfDoctrineModule/cachable/parts/editAction.php
@@ -1,18 +0,0 @@
- public function executeEdit(sfWebRequest $request)
- {
- $this-><?php echo $this->getSingularName() ?> = $this->getRoute()->getObject();
- $this->form = $this->configuration->getForm($this-><?php echo $this->getSingularName() ?>);
-
- $notice = $this->getUser()->getFlash('notice');
- $error = $this->getUser()->getFlash('error');
-
- /**
- * Do not cache flash messages
- */
- if (($notice || $error) && sfConfig::get('sf_cache'))
- {
- $this->disableCache(/*$this->getModuleName(), $this->getActionName()*/);
- }
-
- $this->setContentTags($this->form->getObject());
- }
View
86 data/generator/sfDoctrineModule/cachable/parts/fieldsConfiguration.php
@@ -1,86 +0,0 @@
- public function getListParams()
- {
- return <?php echo $this->asPhp(isset($this->config['list']['params']) ? $this->config['list']['params'] : '%%'.implode('%% - %%', isset($this->config['list']['display']) ? $this->config['list']['display'] : $this->getAllFieldNames(false)).'%%') ?>;
-<?php unset($this->config['list']['params']) ?>
- }
-
- public function getListLayout()
- {
- return '<?php echo isset($this->config['list']['layout']) ? $this->config['list']['layout'] : 'tabular' ?>';
-<?php unset($this->config['list']['layout']) ?>
- }
-
- public function getListTitle()
- {
- return '<?php echo $this->escapeString(isset($this->config['list']['title']) ? $this->config['list']['title'] : sfInflector::humanize($this->getModuleName()).' List') ?>';
-<?php unset($this->config['list']['title']) ?>
- }
-
- public function getEditTitle()
- {
- return '<?php echo $this->escapeString(isset($this->config['edit']['title']) ? $this->config['edit']['title'] : 'Edit '.sfInflector::humanize($this->getModuleName())) ?>';
-<?php unset($this->config['edit']['title']) ?>
- }
-
- public function getNewTitle()
- {
- return '<?php echo $this->escapeString(isset($this->config['new']['title']) ? $this->config['new']['title'] : 'New '.sfInflector::humanize($this->getModuleName())) ?>';
-<?php unset($this->config['new']['title']) ?>
- }
-
- public function getFilterDisplay()
- {
- return <?php echo $this->asPhp(isset($this->config['filter']['display']) ? $this->config['filter']['display'] : array()) ?>;
-<?php unset($this->config['filter']['display']) ?>
- }
-
- public function getFormDisplay()
- {
- return <?php echo $this->asPhp(isset($this->config['form']['display']) ? $this->config['form']['display'] : array()) ?>;
-<?php unset($this->config['form']['display']) ?>
- }
-
- public function getEditDisplay()
- {
- return <?php echo $this->asPhp(isset($this->config['edit']['display']) ? $this->config['edit']['display'] : array()) ?>;
-<?php unset($this->config['edit']['display']) ?>
- }
-
- public function getNewDisplay()
- {
- return <?php echo $this->asPhp(isset($this->config['new']['display']) ? $this->config['new']['display'] : array()) ?>;
-<?php unset($this->config['new']['display']) ?>
- }
-
- public function getListDisplay()
- {
-<?php if (isset($this->config['list']['display'])): ?>
- return <?php echo $this->asPhp($this->config['list']['display']) ?>;
-<?php elseif (isset($this->config['list']['hide'])): ?>
- return <?php echo $this->asPhp(array_diff($this->getAllFieldNames(false), $this->config['list']['hide'])) ?>;
-<?php else: ?>
- return <?php echo $this->asPhp($this->getAllFieldNames(false)) ?>;
-<?php endif; ?>
-<?php unset($this->config['list']['display'], $this->config['list']['hide']) ?>
- }
-
- public function getFieldsDefault()
- {
- return array(
-<?php foreach ($this->getDefaultFieldsConfiguration() as $name => $params): ?>
- '<?php echo $name ?>' => <?php echo $this->asPhp($params) ?>,
-<?php endforeach; ?>
- );
- }
-
-<?php foreach (array('list', 'filter', 'form', 'edit', 'new') as $context): ?>
- public function getFields<?php echo ucfirst($context) ?>()
- {
- return array(
-<?php foreach ($this->getFieldsConfiguration($context) as $name => $params): ?>
- '<?php echo $name ?>' => <?php echo $this->asPhp($params) ?>,
-<?php endforeach; ?>
- );
- }
-
-<?php endforeach; ?>
View
26 data/generator/sfDoctrineModule/cachable/parts/filterAction.php
@@ -1,26 +0,0 @@
- public function executeFilter(sfWebRequest $request)
- {
- $this->setPage(1);
-
- if ($request->hasParameter('_reset'))
- {
- $this->setFilters($this->configuration->getFilterDefaults());
-
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
-
- $this->filters = $this->configuration->getFilterForm($this->getFilters());
-
- $this->filters->bind($request->getParameter($this->filters->getName()));
- if ($this->filters->isValid())
- {
- $this->setFilters($this->filters->getValues());
-
- $this->redirect('@<?php echo $this->getUrlForAction('list') ?>');
- }
-
- $this->pager = $this->getPager();
- $this->sort = $this->getSort();
-
- $this->setTemplate('index');
- }
View
9 data/generator/sfDoctrineModule/cachable/parts/filtersAction.php
@@ -1,9 +0,0 @@
- protected function getFilters()
- {
- return $this->getUser()->getAttribute('<?php echo $this->getModuleName() ?>.filters', $this->configuration->getFilterDefaults(), 'admin_module');
- }
-
- protected function setFilters(array $filters)
- {
- return $this->getUser()->setAttribute('<?php echo $this->getModuleName() ?>.filters', $filters, 'admin_module');
- }
View
19 data/generator/sfDoctrineModule/cachable/parts/indexAction.php
@@ -1,19 +0,0 @@
- public function executeIndex(sfWebRequest $request)
- {
- // sorting
- if ($request->getParameter('sort') && $this->isValidSortColumn($request->getParameter('sort')))
- {
- $this->setSort(array($request->getParameter('sort'), $request->getParameter('sort_type')));
- }
-
- // pager
- if ($request->getParameter('page'))
- {
- $this->setPage($request->getParameter('page'));
- }
-
- $this->pager = $this->getPager();
- $this->sort = $this->getSort();
-
- $this->results = $this->pager->getResults();
- }
View
5 data/generator/sfDoctrineModule/cachable/parts/newAction.php
@@ -1,5 +0,0 @@
- public function executeNew(sfWebRequest $request)
- {
- $this->form = $this->configuration->getForm();
- $this-><?php echo $this->getSingularName() ?> = $this->form->getObject();
- }
View
49 data/generator/sfDoctrineModule/cachable/parts/paginationAction.php
@@ -1,49 +0,0 @@
- protected function getPager()
- {
- $pager = $this->configuration->getPager('<?php echo $this->getModelClass() ?>');
- $pager->setQuery($this->buildQuery());
- $pager->setPage($this->getPage());
- $pager->init();
-
- return $pager;
- }
-
- protected function setPage($page)
- {
- $this->getUser()->setAttribute('<?php echo $this->getModuleName() ?>.page', $page, 'admin_module');
- }
-
- protected function getPage()
- {
- return $this->getUser()->getAttribute('<?php echo $this->getModuleName() ?>.page', 1, 'admin_module');
- }
-
- protected function buildQuery()
- {
- $tableMethod = $this->configuration->getTableMethod();
-<?php if ($this->configuration->hasFilterForm()): ?>
- if (null === $this->filters)
- {
- $this->filters = $this->configuration->getFilterForm($this->getFilters());
- }
-
- $this->filters->setTableMethod($tableMethod);
-
- $query = $this->filters->buildQuery($this->getFilters());
-<?php else: ?>
- $query = Doctrine_Core::getTable('<?php echo $this->getModelClass() ?>')
- ->createQuery('a');
-
- if ($tableMethod)
- {
- $query = Doctrine_Core::getTable('<?php echo $this->getModelClass() ?>')->$tableMethod($query);
- }
-<?php endif; ?>
-
- $this->addSortQuery($query);
-
- $event = $this->dispatcher->filter(new sfEvent($this, 'admin.build_query'), $query);
- $query = $event->getReturnValue();
-
- return $query;
- }
View
11 data/generator/sfDoctrineModule/cachable/parts/paginationConfiguration.php
@@ -1,11 +0,0 @@
- public function getPagerClass()
- {
- return '<?php echo isset($this->config['list']['pager_class']) ? $this->config['list']['pager_class'] : 'sfDoctrinePager' ?>';
-<?php unset($this->config['list']['pager_class']) ?>
- }
-
- public function getPagerMaxPerPage()
- {
- return <?php echo isset($this->config['list']['max_per_page']) ? (integer) $this->config['list']['max_per_page'] : 20 ?>;
-<?php unset($this->config['list']['max_per_page']) ?>
- }
View
43 data/generator/sfDoctrineModule/cachable/parts/processFormAction.php
@@ -1,43 +0,0 @@
- protected function processForm(sfWebRequest $request, sfForm $form)
- {
- $form->bind($request->getParameter($form->getName()), $request->getFiles($form->getName()));
- if ($form->isValid())
- {
- $notice = $form->getObject()->isNew() ? 'The item was created successfully.' : 'The item was updated successfully.';
-
- try {
- $<?php echo $this->getSingularName() ?> = $form->save();
- } catch (Doctrine_Validator_Exception $e) {
-
- $errorStack = $form->getObject()->getErrorStack();
-
- $message = get_class($form->getObject()) . ' has ' . count($errorStack) . " field" . (count($errorStack) > 1 ? 's' : null) . " with validation errors: ";
- foreach ($errorStack as $field => $errors) {
- $message .= "$field (" . implode(", ", $errors) . "), ";
- }
- $message = trim($message, ', ');
-
- $this->getUser()->setFlash('error', $message);
- return sfView::SUCCESS;
- }
-
- $this->dispatcher->notify(new sfEvent($this, 'admin.save_object', array('object' => $<?php echo $this->getSingularName() ?>)));
-
- if ($request->hasParameter('_save_and_add'))
- {
- $this->getUser()->setFlash('notice', $notice.' You can add another one below.');
-
- $this->redirect('@<?php echo $this->getUrlForAction('new') ?>');
- }
- else
- {
- $this->getUser()->setFlash('notice', $notice);
-
- $this->redirect(array('sf_route' => '<?php echo $this->getUrlForAction('edit') ?>', 'sf_subject' => $<?php echo $this->getSingularName() ?>));
- }
- }
- else
- {
- $this->getUser()->setFlash('error', 'The item has not been saved due to some errors.', false);
- }
- }
View
41 data/generator/sfDoctrineModule/cachable/parts/sortingAction.php
@@ -1,41 +0,0 @@
- protected function addSortQuery($query)
- {
- if (array(null, null) == ($sort = $this->getSort()))
- {
- return;
- }
-
- if (!in_array(strtolower($sort[1]), array('asc', 'desc')))
- {
- $sort[1] = 'asc';
- }
-
- $query->addOrderBy($sort[0] . ' ' . $sort[1]);
- }
-
- protected function getSort()
- {
- if (null !== $sort = $this->getUser()->getAttribute('<?php echo $this->getModuleName() ?>.sort', null, 'admin_module'))
- {
- return $sort;
- }
-
- $this->setSort($this->configuration->getDefaultSort());
-
- return $this->getUser()->getAttribute('<?php echo $this->getModuleName() ?>.sort', null, 'admin_module');
- }
-
- protected function setSort(array $sort)
- {
- if (null !== $sort[0] && null === $sort[1])
- {
- $sort[1] = 'asc';
- }
-
- $this->getUser()->setAttribute('<?php echo $this->getModuleName() ?>.sort', $sort, 'admin_module');
- }
-
- protected function isValidSortColumn($column)
- {
- return Doctrine_Core::getTable('<?php echo $this->getModelClass() ?>')->hasColumn($column);
- }
View
10 data/generator/sfDoctrineModule/cachable/parts/sortingConfiguration.php
@@ -1,10 +0,0 @@
- public function getDefaultSort()
- {
-<?php if ($sort = (isset($this->config['list']['sort']) ? $this->config['list']['sort'] : false)): ?>
-<?php if (!is_array($sort)) $sort = array($sort, 'asc'); ?>
- return array('<?php echo $sort[0] ?>', '<?php echo isset($sort[1]) ? $sort[1] : 'asc' ?>');
-<?php else: ?>
- return array(null, null);
-<?php endif; ?>
-<?php unset($this->config['list']['sort']) ?>
- }
View
7 data/generator/sfDoctrineModule/cachable/parts/updateAction.php
@@ -1,7 +0,0 @@
- public function executeUpdate(sfWebRequest $request)
- {
- $this-><?php echo $this->getSingularName() ?> = $this->getRoute()->getObject();
- $this->form = $this->configuration->getForm($this-><?php echo $this->getSingularName() ?>);
-
- $this->processForm($request, $this->form);
- }
View
16 data/generator/sfDoctrineModule/cachable/skeleton/actions/actions.class.php
@@ -1,16 +0,0 @@
-<?php
-
-require_once dirname(__FILE__).'/../lib/##MODULE_NAME##GeneratorConfiguration.class.php';
-require_once dirname(__FILE__).'/../lib/##MODULE_NAME##GeneratorHelper.class.php';
-
-/**
- * ##MODULE_NAME## actions.
- *
- * @package ##PROJECT_NAME##
- * @subpackage ##MODULE_NAME##
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-class ##MODULE_NAME##Actions extends auto##UC_MODULE_NAME##Actions
-{
-}
View
13 data/generator/sfDoctrineModule/cachable/skeleton/config/generator.yml
@@ -1,13 +0,0 @@
-generator:
- class: sfDoctrineGenerator
- param:
-##CONFIG##
-
- config:
- actions: ~
- fields: ~
- list: ~
- filter: ~
- form: ~
- edit: ~
- new: ~
View
13 data/generator/sfDoctrineModule/cachable/skeleton/lib/configuration.php
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * ##MODULE_NAME## module configuration.
- *
- * @package ##PROJECT_NAME##
- * @subpackage ##MODULE_NAME##
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: configuration.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-class ##MODULE_NAME##GeneratorConfiguration extends Base##UC_MODULE_NAME##GeneratorConfiguration
-{
-}
View
13 data/generator/sfDoctrineModule/cachable/skeleton/lib/helper.php
@@ -1,13 +0,0 @@
-<?php
-
-/**
- * ##MODULE_NAME## module helper.
- *
- * @package ##PROJECT_NAME##
- * @subpackage ##MODULE_NAME##
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: helper.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
- */
-class ##MODULE_NAME##GeneratorHelper extends Base##UC_MODULE_NAME##GeneratorHelper
-{
-}
View
0  data/generator/sfDoctrineModule/cachable/skeleton/templates/.sf
No changes.
View
61 data/generator/sfDoctrineModule/cachable/template/actions/actions.class.php
@@ -1,61 +0,0 @@
-[?php
-
-require_once(dirname(__FILE__).'/../lib/Base<?php echo ucfirst($this->moduleName) ?>GeneratorConfiguration.class.php');
-require_once(dirname(__FILE__).'/../lib/Base<?php echo ucfirst($this->moduleName) ?>GeneratorHelper.class.php');
-
-/**
- * <?php echo $this->getModuleName() ?> actions.
- *
- * @package ##PROJECT_NAME##
- * @subpackage <?php echo $this->getModuleName()."\n" ?>
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: actions.class.php 31002 2010-09-27 12:04:07Z Kris.Wallsmith $
- */
-abstract class <?php echo $this->getGeneratedModuleName() ?>Actions extends <?php echo $this->getActionsBaseClass()."\n" ?>
-{
- public function preExecute()
- {
- $this->configuration = new <?php echo $this->getModuleName() ?>GeneratorConfiguration();
-
- if (!$this->getUser()->hasCredential($this->configuration->getCredentials($this->getActionName())))
- {
- $this->forward(sfConfig::get('sf_secure_module'), sfConfig::get('sf_secure_action'));
- }
-
- $this->dispatcher->notify(new sfEvent($this, 'admin.pre_execute', array('configuration' => $this->configuration)));
-
- $this->helper = new <?php echo $this->getModuleName() ?>GeneratorHelper();
-
- parent::preExecute();
- }
-
-<?php include dirname(__FILE__).'/../../parts/indexAction.php' ?>
-
-<?php if ($this->configuration->hasFilterForm()): ?>
-<?php include dirname(__FILE__).'/../../parts/filterAction.php' ?>
-<?php endif; ?>
-
-<?php include dirname(__FILE__).'/../../parts/newAction.php' ?>
-
-<?php include dirname(__FILE__).'/../../parts/createAction.php' ?>
-
-<?php include dirname(__FILE__).'/../../parts/editAction.php' ?>
-
-<?php include dirname(__FILE__).'/../../parts/updateAction.php' ?>
-
-<?php include dirname(__FILE__).'/../../parts/deleteAction.php' ?>
-
-<?php if ($this->configuration->getValue('list.batch_actions')): ?>
-<?php include dirname(__FILE__).'/../../parts/batchAction.php' ?>
-<?php endif; ?>
-
-<?php include dirname(__FILE__).'/../../parts/processFormAction.php' ?>
-
-<?php if ($this->configuration->hasFilterForm()): ?>
-<?php include dirname(__FILE__).'/../../parts/filtersAction.php' ?>
-<?php endif; ?>
-
-<?php include dirname(__FILE__).'/../../parts/paginationAction.php' ?>
-
-<?php include dirname(__FILE__).'/../../parts/sortingAction.php' ?>
-}
View
17 data/generator/sfDoctrineModule/cachable/template/lib/helper.php
@@ -1,17 +0,0 @@
-[?php
-
-/**
- * <?php echo $this->getModuleName() ?> module configuration.
- *
- * @package ##PROJECT_NAME##
- * @subpackage <?php echo $this->getModuleName()."\n" ?>
- * @author ##AUTHOR_NAME##
- * @version SVN: $Id: helper.php 24171 2009-11-19 16:37:50Z Kris.Wallsmith $
- */
-abstract class Base<?php echo ucfirst($this->getModuleName()) ?>GeneratorHelper extends sfModelGeneratorHelper
-{
- public function getUrlForAction($action)
- {
- return 'list' == $action ? '<?php echo $this->params['route_prefix'] ?>' : '<?php echo $this->params['route_prefix'] ?>_'.$action;
- }
-}
View
6 data/generator/sfDoctrineModule/cachable/template/templates/_assets.php
@@ -1,6 +0,0 @@
-<?php if (isset($this->params['css']) && ($this->params['css'] !== false)): ?>
-[?php use_stylesheet('<?php echo $this->params['css'] ?>', 'first') ?]
-<?php elseif(!isset($this->params['css'])): ?>
-[?php use_stylesheet('<?php echo sfConfig::get('sf_admin_module_web_dir').'/css/global.css' ?>', 'first') ?]
-[?php use_stylesheet('<?php echo sfConfig::get('sf_admin_module_web_dir').'/css/default.css' ?>', 'first') ?]
-<?php endif; ?>
View
36 data/generator/sfDoctrineModule/cachable/template/templates/_filters.php
@@ -1,36 +0,0 @@
-[?php use_stylesheets_for_form($form) ?]
-[?php use_javascripts_for_form($form) ?]
-
-<div class="sf_admin_filter">
- [?php if ($form->hasGlobalErrors()): ?]
- [?php echo $form->renderGlobalErrors() ?]
- [?php endif; ?]
-
- <form action="[?php echo url_for('<?php echo $this->getUrlForAction('collection') ?>', array('action' => 'filter')) ?]" method="post">
- <table cellspacing="0">
- <tfoot>
- <tr>
- <td colspan="2">
- [?php echo $form->renderHiddenFields() ?]
- [?php echo link_to(__('Reset', array(), 'sf_admin'), '<?php echo $this->getUrlForAction('collection') ?>', array('action' => 'filter'), array('query_string' => '_reset', 'method' => 'post')) ?]
- <input type="submit" value="[?php echo __('Filter', array(), 'sf_admin') ?]" />
- </td>
- </tr>
- </tfoot>
- <tbody>
- [?php foreach ($configuration->getFormFilterFields($form) as $name => $field): ?]
- [?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/filters_field', array(
- 'name' => $name,
- 'attributes' => $field->getConfig('attributes', array()),
- 'label' => $field->getConfig('label'),
- 'help' => $field->getConfig('help'),
- 'form' => $form,
- 'field' => $field,
- 'class' => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_filter_field_'.$name,
- )) ?]
- [?php endforeach; ?]
- </tbody>
- </table>
- </form>
-</div>
View
20 data/generator/sfDoctrineModule/cachable/template/templates/_filters_field.php
@@ -1,20 +0,0 @@
-[?php if ($field->isPartial()): ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/'.$name, array('type' => 'filter', 'form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?]
-[?php elseif ($field->isComponent()): ?]
- [?php include_component('<?php echo $this->getModuleName() ?>', $name, array('type' => 'filter', 'form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?]
-[?php else: ?]
- <tr class="[?php echo $class ?]">
- <td>
- [?php echo $form[$name]->renderLabel($label) ?]
- </td>
- <td>
- [?php echo $form[$name]->renderError() ?]
-
- [?php echo $form[$name]->render($attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes) ?]
-
- [?php if ($help || $help = $form[$name]->renderHelp()): ?]
- <div class="help">[?php echo __($help, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]</div>
- [?php endif; ?]
- </td>
- </tr>
-[?php endif; ?]
View
7 data/generator/sfDoctrineModule/cachable/template/templates/_flashes.php
@@ -1,7 +0,0 @@
-[?php if ($sf_user->hasFlash('notice')): ?]
- <div class="notice">[?php echo __($sf_user->getFlash('notice'), array(), 'sf_admin') ?]</div>
-[?php endif; ?]
-
-[?php if ($sf_user->hasFlash('error')): ?]
- <div class="error">[?php echo __($sf_user->getFlash('error'), array(), 'sf_admin') ?]</div>
-[?php endif; ?]
View
18 data/generator/sfDoctrineModule/cachable/template/templates/_form.php
@@ -1,18 +0,0 @@
-[?php use_stylesheets_for_form($form) ?]
-[?php use_javascripts_for_form($form) ?]
-
-<div class="sf_admin_form">
- [?php echo form_tag_for($form, '@<?php echo $this->params['route_prefix'] ?>') ?]
- [?php echo $form->renderHiddenFields(false) ?]
-
- [?php if ($form->hasGlobalErrors()): ?]
- [?php echo $form->renderGlobalErrors() ?]
- [?php endif; ?]
-
- [?php foreach ($configuration->getFormFields($form, $form->isNew() ? 'new' : 'edit') as $fieldset => $fields): ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_fieldset', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'fields' => $fields, 'fieldset' => $fieldset)) ?]
- [?php endforeach; ?]
-
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
- </form>
-</div>
View
35 data/generator/sfDoctrineModule/cachable/template/templates/_form_actions.php
@@ -1,35 +0,0 @@
-<ul class="sf_admin_actions">
-<?php foreach (array('new', 'edit') as $action): ?>
-<?php if ('new' == $action): ?>
-[?php if ($form->isNew()): ?]
-<?php else: ?>
-[?php else: ?]
-<?php endif; ?>
-<?php foreach ($this->configuration->getValue($action.'.actions') as $name => $params): ?>
-<?php if ('_delete' == $name): ?>
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkToDelete($form->getObject(), '.$this->asPhp($params).') ?]', $params) ?>
-
-<?php elseif ('_list' == $name): ?>
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkToList('.$this->asPhp($params).') ?]', $params) ?>
-
-<?php elseif ('_save' == $name): ?>
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkToSave($form->getObject(), '.$this->asPhp($params).') ?]', $params) ?>
-
-<?php elseif ('_save_and_add' == $name): ?>
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkToSaveAndAdd($form->getObject(), '.$this->asPhp($params).') ?]', $params) ?>
-
-<?php else: ?>
- <li class="sf_admin_action_<?php echo $params['class_suffix'] ?>">
-[?php if (method_exists($helper, 'linkTo<?php echo $method = ucfirst(sfInflector::camelize($name)) ?>')): ?]
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkTo'.$method.'($form->getObject(), '.$this->asPhp($params).') ?]', $params) ?>
-
-[?php else: ?]
- <?php echo $this->addCredentialCondition($this->getLinkToAction($name, $params, true), $params) ?>
-
-[?php endif; ?]
- </li>
-<?php endif; ?>
-<?php endforeach; ?>
-<?php endforeach; ?>
-[?php endif; ?]
-</ul>
View
20 data/generator/sfDoctrineModule/cachable/template/templates/_form_field.php
@@ -1,20 +0,0 @@
-[?php if ($field->isPartial()): ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/'.$name, array('form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?]
-[?php elseif ($field->isComponent()): ?]
- [?php include_component('<?php echo $this->getModuleName() ?>', $name, array('form' => $form, 'attributes' => $attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes)) ?]
-[?php else: ?]
- <div class="[?php echo $class ?][?php $form[$name]->hasError() and print ' errors' ?]">
- [?php echo $form[$name]->renderError() ?]
- <div>
- [?php echo $form[$name]->renderLabel($label) ?]
-
- <div class="content">[?php echo $form[$name]->render($attributes instanceof sfOutputEscaper ? $attributes->getRawValue() : $attributes) ?]</div>
-
- [?php if ($help): ?]
- <div class="help">[?php echo __($help, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]</div>
- [?php elseif ($help = $form[$name]->renderHelp()): ?]
- <div class="help">[?php echo $help ?]</div>
- [?php endif; ?]
- </div>
- </div>
-[?php endif; ?]
View
18 data/generator/sfDoctrineModule/cachable/template/templates/_form_fieldset.php
@@ -1,18 +0,0 @@
-<fieldset id="sf_fieldset_[?php echo preg_replace('/[^a-z0-9_]/', '_', strtolower($fieldset)) ?]">
- [?php if ('NONE' != $fieldset): ?]
- <h2>[?php echo __($fieldset, array(), '<?php echo $this->getI18nCatalogue() ?>') ?]</h2>
- [?php endif; ?]
-
- [?php foreach ($fields as $name => $field): ?]
- [?php if ((isset($form[$name]) && $form[$name]->isHidden()) || (!isset($form[$name]) && $field->isReal())) continue ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_field', array(
- 'name' => $name,
- 'attributes' => $field->getConfig('attributes', array()),
- 'label' => $field->getConfig('label'),
- 'help' => $field->getConfig('help'),
- 'form' => $form,
- 'field' => $field,
- 'class' => 'sf_admin_form_row sf_admin_'.strtolower($field->getType()).' sf_admin_form_field_'.$name,
- )) ?]
- [?php endforeach; ?]
-</fieldset>
View
0  data/generator/sfDoctrineModule/cachable/template/templates/_form_footer.php
No changes.
View
0  data/generator/sfDoctrineModule/cachable/template/templates/_form_header.php
No changes.
View
54 data/generator/sfDoctrineModule/cachable/template/templates/_list.php
@@ -1,54 +0,0 @@
-<div class="sf_admin_list">
- [?php if (!$pager->getNbResults()): ?]
- <p>[?php echo __('No result', array(), 'sf_admin') ?]</p>
- [?php else: ?]
- <table cellspacing="0">
- <thead>
- <tr>
-<?php if ($this->configuration->getValue('list.batch_actions')): ?>
- <th id="sf_admin_list_batch_actions"><input id="sf_admin_list_batch_checkbox" type="checkbox" onclick="checkAll();" /></th>
-<?php endif; ?>
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_th_<?php echo $this->configuration->getValue('list.layout') ?>', array('sort' => $sort)) ?]
-<?php if ($this->configuration->getValue('list.object_actions')): ?>
- <th id="sf_admin_list_th_actions">[?php echo __('Actions', array(), 'sf_admin') ?]</th>
-<?php endif; ?>
- </tr>
- </thead>
- <tfoot>
- <tr>
- <th colspan="<?php echo count($this->configuration->getValue('list.display')) + ($this->configuration->getValue('list.object_actions') ? 1 : 0) + ($this->configuration->getValue('list.batch_actions') ? 1 : 0) ?>">
- [?php if ($pager->haveToPaginate()): ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/pagination', array('pager' => $pager)) ?]
- [?php endif; ?]
-
- [?php echo format_number_choice('[0] no result|[1] 1 result|(1,+Inf] %1% results', array('%1%' => $pager->getNbResults()), $pager->getNbResults(), 'sf_admin') ?]
- [?php if ($pager->haveToPaginate()): ?]
- [?php echo __('(page %%page%%/%%nb_pages%%)', array('%%page%%' => $pager->getPage(), '%%nb_pages%%' => $pager->getLastPage()), 'sf_admin') ?]
- [?php endif; ?]
- </th>
- </tr>
- </tfoot>
- <tbody>
- [?php foreach ($results as $i => $<?php echo $this->getSingularName() ?>): $odd = fmod(++$i, 2) ? 'odd' : 'even' ?]
- <tr class="sf_admin_row [?php echo $odd ?]">
-<?php if ($this->configuration->getValue('list.batch_actions')): ?>
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_td_batch_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'helper' => $helper)) ?]
-<?php endif; ?>
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_td_<?php echo $this->configuration->getValue('list.layout') ?>', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>)) ?]
-<?php if ($this->configuration->getValue('list.object_actions')): ?>
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_td_actions', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'helper' => $helper)) ?]
-<?php endif; ?>
- </tr>
- [?php endforeach; ?]
- </tbody>
- </table>
- [?php endif; ?]
-</div>
-<script type="text/javascript">
-/* <![CDATA[ */
-function checkAll()
-{
- var boxes = document.getElementsByTagName('input'); for(var index = 0; index < boxes.length; index++) { box = boxes[index]; if (box.type == 'checkbox' && box.className == 'sf_admin_batch_checkbox') box.checked = document.getElementById('sf_admin_list_batch_checkbox').checked } return true;
-}
-/* ]]> */
-</script>
View
11 data/generator/sfDoctrineModule/cachable/template/templates/_list_actions.php
@@ -1,11 +0,0 @@
-<?php if ($actions = $this->configuration->getValue('list.actions')): ?>
-<?php foreach ($actions as $name => $params): ?>
-<?php if ('_new' == $name): ?>
-<?php echo $this->addCredentialCondition('[?php echo $helper->linkToNew('.$this->asPhp($params).') ?]', $params)."\n" ?>
-<?php else: ?>
-<li class="sf_admin_action_<?php echo $params['class_suffix'] ?>">
- <?php echo $this->addCredentialCondition($this->getLinkToAction($name, $params, false), $params)."\n" ?>
-</li>
-<?php endif; ?>
-<?php endforeach; ?>
-<?php endif; ?>
View
15 data/generator/sfDoctrineModule/cachable/template/templates/_list_batch_actions.php
@@ -1,15 +0,0 @@
-<?php if ($listActions = $this->configuration->getValue('list.batch_actions')): ?>
-<li class="sf_admin_batch_actions_choice">
- <select name="batch_action">
- <option value="">[?php echo __('Choose an action', array(), 'sf_admin') ?]</option>
-<?php foreach ((array) $listActions as $action => $params): ?>
- <?php echo $this->addCredentialCondition('<option value="'.$action.'">[?php echo __(\''.$params['label'].'\', array(), \'sf_admin\') ?]</option>', $params) ?>
-
-<?php endforeach; ?>
- </select>
- [?php $form = new BaseForm(); if ($form->isCSRFProtected()): ?]
- <input type="hidden" name="[?php echo $form->getCSRFFieldName() ?]" value="[?php echo $form->getCSRFToken() ?]" />
- [?php endif; ?]
- <input type="submit" value="[?php echo __('go', array(), 'sf_admin') ?]" />
-</li>
-<?php endif; ?>
View
5 data/generator/sfDoctrineModule/cachable/template/templates/_list_field_boolean.php
@@ -1,5 +0,0 @@
-[?php if ($value): ?]
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/tick.png', array('alt' => __('Checked', array(), 'sf_admin'), 'title' => __('Checked', array(), 'sf_admin'))) ?]
-[?php else: ?]
- &nbsp;
-[?php endif; ?]
View
0  data/generator/sfDoctrineModule/cachable/template/templates/_list_footer.php
No changes.
View
0  data/generator/sfDoctrineModule/cachable/template/templates/_list_header.php
No changes.
View
18 data/generator/sfDoctrineModule/cachable/template/templates/_list_td_actions.php
@@ -1,18 +0,0 @@
-<td>
- <ul class="sf_admin_td_actions">
-<?php foreach ($this->configuration->getValue('list.object_actions') as $name => $params): ?>
-<?php if ('_delete' == $name): ?>
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkToDelete($'.$this->getSingularName().', '.$this->asPhp($params).') ?]', $params) ?>
-
-<?php elseif ('_edit' == $name): ?>
- <?php echo $this->addCredentialCondition('[?php echo $helper->linkToEdit($'.$this->getSingularName().', '.$this->asPhp($params).') ?]', $params) ?>
-
-<?php else: ?>
- <li class="sf_admin_action_<?php echo $params['class_suffix'] ?>">
- <?php echo $this->addCredentialCondition($this->getLinkToAction($name, $params, true), $params) ?>
-
- </li>
-<?php endif; ?>
-<?php endforeach; ?>
- </ul>
-</td>
View
3  data/generator/sfDoctrineModule/cachable/template/templates/_list_td_batch_actions.php
@@ -1,3 +0,0 @@
-<td>
- <input type="checkbox" name="ids[]" value="[?php echo $<?php echo $this->getSingularName() ?>->getPrimaryKey() ?]" class="sf_admin_batch_checkbox" />
-</td>
View
3  data/generator/sfDoctrineModule/cachable/template/templates/_list_td_stacked.php
@@ -1,3 +0,0 @@
-<td colspan="<?php echo count($this->configuration->getValue('list.display')) ?>">
- [?php echo <?php echo $this->getI18NString('list.params') ?> ?]
-</td>
View
9 data/generator/sfDoctrineModule/cachable/template/templates/_list_td_tabular.php
@@ -1,9 +0,0 @@
-<?php foreach ($this->configuration->getValue('list.display') as $name => $field): ?>
-<?php echo $this->addCredentialCondition(sprintf(<<<EOF
-<td class="sf_admin_%s sf_admin_list_td_%s">
- [?php echo %s ?]
-</td>
-
-EOF
-, strtolower($field->getType()), $name, $this->renderField($field)), $field->getConfig()) ?>
-<?php endforeach; ?>
View
1  data/generator/sfDoctrineModule/cachable/template/templates/_list_th_stacked.php
@@ -1 +0,0 @@
-[?php include_partial('<?php echo $this->getModuleName() ?>/list_th_tabular', array('sort' => $sort)) ?]
View
17 data/generator/sfDoctrineModule/cachable/template/templates/_list_th_tabular.php
@@ -1,17 +0,0 @@
-<?php foreach ($this->configuration->getValue('list.display') as $name => $field): ?>
-[?php slot('sf_admin.current_header') ?]
-<th class="sf_admin_<?php echo strtolower($field->getType()) ?> sf_admin_list_th_<?php echo $name ?>">
-<?php if ($field->isReal()): ?>
- [?php if ('<?php echo $name ?>' == $sort[0]): ?]
- [?php echo link_to(__('<?php echo $field->getConfig('label', '', true) ?>', array(), '<?php echo $this->getI18nCatalogue() ?>'), '@<?php echo $this->getUrlForAction('list') ?>', array('query_string' => 'sort=<?php echo $name ?>&sort_type='.($sort[1] == 'asc' ? 'desc' : 'asc'))) ?]
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/'.$sort[1].'.png', array('alt' => __($sort[1], array(), 'sf_admin'), 'title' => __($sort[1], array(), 'sf_admin'))) ?]
- [?php else: ?]
- [?php echo link_to(__('<?php echo $field->getConfig('label', '', true) ?>', array(), '<?php echo $this->getI18nCatalogue() ?>'), '@<?php echo $this->getUrlForAction('list') ?>', array('query_string' => 'sort=<?php echo $name ?>&sort_type=asc')) ?]
- [?php endif; ?]
-<?php else: ?>
- [?php echo __('<?php echo $field->getConfig('label', '', true) ?>', array(), '<?php echo $this->getI18nCatalogue() ?>') ?]
-<?php endif; ?>
-</th>
-[?php end_slot(); ?]
-<?php echo $this->addCredentialCondition("[?php include_slot('sf_admin.current_header') ?]", $field->getConfig()) ?>
-<?php endforeach; ?>
View
25 data/generator/sfDoctrineModule/cachable/template/templates/_pagination.php
@@ -1,25 +0,0 @@
-<div class="sf_admin_pagination">
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=1">
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/first.png', array('alt' => __('First page', array(), 'sf_admin'), 'title' => __('First page', array(), 'sf_admin'))) ?]
- </a>
-
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getPreviousPage() ?]">
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/previous.png', array('alt' => __('Previous page', array(), 'sf_admin'), 'title' => __('Previous page', array(), 'sf_admin'))) ?]
- </a>
-
- [?php foreach ($pager->getLinks() as $page): ?]
- [?php if ($page == $pager->getPage()): ?]
- [?php echo $page ?]
- [?php else: ?]
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $page ?]">[?php echo $page ?]</a>
- [?php endif; ?]
- [?php endforeach; ?]
-
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getNextPage() ?]">
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/next.png', array('alt' => __('Next page', array(), 'sf_admin'), 'title' => __('Next page', array(), 'sf_admin'))) ?]
- </a>
-
- <a href="[?php echo url_for('@<?php echo $this->getUrlForAction('list') ?>') ?]?page=[?php echo $pager->getLastPage() ?]">
- [?php echo image_tag(sfConfig::get('sf_admin_module_web_dir').'/images/last.png', array('alt' => __('Last page', array(), 'sf_admin'), 'title' => __('Last page', array(), 'sf_admin'))) ?]
- </a>
-</div>
View
35 data/generator/sfDoctrineModule/cachable/template/templates/editSuccess.php
@@ -1,35 +0,0 @@
-[?php use_helper('I18N', 'Date') ?]
-[?php include_partial('<?php echo $this->getModuleName() ?>/assets') ?]
-
-<div id="sf_admin_container">
- <h1>[?php echo <?php echo $this->getI18NString('edit.title') ?> ?]</h1>
-
- [?php include_partial('<?php echo $this->getModuleName() ?>/flashes') ?]
-
- <div id="sf_admin_header">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
- </div>
-
- <div id="sf_admin_content">
-
- [?php include_partial(
- '<?php echo $this->getModuleName() ?>/form',
- array(
- '<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>,
- 'form' => $form,
- 'configuration' => $configuration,
- 'helper' => $helper,
- 'sf_cache_key' => sprintf(
- 'backend-form-module:%s-id:%d',
- '<?php echo $this->getModuleName() ?>',
- $sf_data->getRaw('form')->getObject()->getId()
- ),
- 'sf_cache_tags' => $form->getObject()->getCacheTags(),
- )
- ) ?]
- </div>
-
- <div id="sf_admin_footer">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_footer', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
- </div>
-</div>
View
50 data/generator/sfDoctrineModule/cachable/template/templates/indexSuccess.php
@@ -1,50 +0,0 @@
-[?php use_helper('I18N', 'Date') ?]
-[?php include_partial('<?php echo $this->getModuleName() ?>/assets') ?]
-
-<div id="sf_admin_container">
- <h1>[?php echo <?php echo $this->getI18NString('list.title') ?> ?]</h1>
-
- [?php include_partial('<?php echo $this->getModuleName() ?>/flashes') ?]
-
- <div id="sf_admin_header">
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_header', array('pager' => $pager)) ?]
- </div>
-
-<?php if ($this->configuration->hasFilterForm()): ?>
- <div id="sf_admin_bar">
- [?php include_partial('<?php echo $this->getModuleName() ?>/filters', array('form' => $filters, 'configuration' => $configuration)) ?]
- </div>
-<?php endif; ?>
-
- <div id="sf_admin_content">
-<?php if ($this->configuration->getValue('list.batch_actions')): ?>
- <form action="[?php echo url_for('<?php echo $this->getUrlForAction('collection') ?>', array('action' => 'batch')) ?]" method="post">
-<?php endif; ?>
-
- [?php include_partial('<?php echo $this->getModuleName() ?>/list', array(
- 'pager' => $pager,
- 'results' => $results,
- 'sort' => $sort,
- 'helper' => $helper,
- 'sf_cache_key' => sprintf(
- 'backend-list-module:%s-page:%s-sorting:%s',
- '<?php echo $this->getModuleName() ?>',
- md5(serialize(sfOutputEscaper::unescape($pager))),
- http_build_query(sfOutputEscaper::unescape($sort), '', ':')
- ),
- 'sf_cache_tags' => $results->getCacheTags(),
- )) ?]
-
- <ul class="sf_admin_actions">
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_batch_actions', array('helper' => $helper)) ?]
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_actions', array('helper' => $helper)) ?]
- </ul>
-<?php if ($this->configuration->getValue('list.batch_actions')): ?>
- </form>
-<?php endif; ?>
- </div>
-
- <div id="sf_admin_footer">
- [?php include_partial('<?php echo $this->getModuleName() ?>/list_footer', array('pager' => $pager)) ?]
- </div>
-</div>
View
20 data/generator/sfDoctrineModule/cachable/template/templates/newSuccess.php
@@ -1,20 +0,0 @@
-[?php use_helper('I18N', 'Date') ?]
-[?php include_partial('<?php echo $this->getModuleName() ?>/assets') ?]
-
-<div id="sf_admin_container">
- <h1>[?php echo <?php echo $this->getI18NString('new.title') ?> ?]</h1>
-
- [?php include_partial('<?php echo $this->getModuleName() ?>/flashes') ?]
-
- <div id="sf_admin_header">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
- </div>
-
- <div id="sf_admin_content">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
- </div>
-
- <div id="sf_admin_footer">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_footer', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
- </div>
-</div>
View
20 data/generator/sfDoctrineModule/cachable/template/templates/updateSuccess.php
@@ -1,20 +0,0 @@
-[?php use_helper('I18N', 'Date') ?]
-[?php include_partial('<?php echo $this->getModuleName() ?>/assets') ?]
-
-<div id="sf_admin_container">
- <h1>[?php echo <?php echo $this->getI18NString('edit.title') ?> ?]</h1>
-
- [?php include_partial('<?php echo $this->getModuleName() ?>/flashes') ?]
-
- <div id="sf_admin_header">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_header', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
- </div>
-
- <div id="sf_admin_content">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration, 'helper' => $helper)) ?]
- </div>
-
- <div id="sf_admin_footer">
- [?php include_partial('<?php echo $this->getModuleName() ?>/form_footer', array('<?php echo $this->getSingularName() ?>' => $<?php echo $this->getSingularName() ?>, 'form' => $form, 'configuration' => $configuration)) ?]
- </div>
-</div>
Please sign in to comment.
Something went wrong with that request. Please try again.