Development

#1421 ([PATCH] can't set "peer_count_method" parameter for list in admin generator)

You must first sign up to be able to contribute.

Ticket #1421 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

[PATCH] can't set "peer_count_method" parameter for list in admin generator

Reported by: kta Assigned to:
Priority: major Milestone: 1.0.0
Component: Version: 1.0.0-rc1
Keywords: Cc:
Qualification:

Description

It is only possible to set peer_method in generator.yml config file, but not peer_count_method. sfPager class has method for setting this parameter, but configuration file doesn't handle it.

Probably also object_select_tag helper hasn't this configuration possibility, but I didn't checked it.

Index: /data/generator/sfPropelAdmin/default/template/actions/actions.class.php
===================================================================
--- D:/htdocs/guru/data/symfony/generator/sfPropelAdmin/default/template/actions/actions.class.php	(revision 304)
+++ D:/htdocs/guru/data/symfony/generator/sfPropelAdmin/default/template/actions/actions.class.php	(working copy)
@@ -40,6 +40,9 @@
     $this->pager->setPage($this->getRequestParameter('page', 1));
 <?php if ($this->getParameterValue('list.peer_method')): ?>
     $this->pager->setPeerMethod('<?php echo $this->getParameterValue('list.peer_method') ?>');
 <?php endif ?>
+<?php if ($this->getParameterValue('list.peer_count_method')): ?>
+    $this->pager->setPeerCountMethod('<?php echo $this->getParameterValue('list.peer_count_method') ?>');
+<?php endif ?>
     $this->pager->init();
   }

Change History

02/18/07 10:27:07 changed by fabien

  • milestone set to 1.0.0.

02/18/07 10:27:27 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [3494]) added peer_count_method parameter for list in admin generator (closes #1421 - patch from kta)