echo __('Search Results'); ?> </h2> <p><?php echo __('The following results matched your query:'); ?> </p> <ol start="<?php echo $pager->getFirstIndice(); ?> " class="search-results"> <?php foreach ($pager->getResults() as $result) { ?> <li><?php include_search_result($result, $query); ?> </li> <?php } ?> </ol> <?php include_search_pager($pager, $form, sfConfig::get('app_lucene_pager_radius', 5)); ?> <?php include_search_controls($form);
} elseif ($result->getInternalPartial() == 'argomento/searchResult') { ?> <td><div class="ico-type"><?php echo image_tag('/images/ico-type-etichetta.png', array('width' => '44', 'height' => '42')); ?> </div></td> <?php } ?> <td class="<?php echo fmod($num_item, 2) != 0 ? 'odd' : 'even'; ?> "> <?php include_search_result($result, $query, array('num_item' => $num_item)); ?> </tr> <?php } ?> </table> <?php echo pager_navigation($pager, "@votazioniSearch?query={$query}"); ?> </div> </div>
$sParams = $params; } class Foo { public function getInternalPartial() { return 'FooPartial'; } } class Bar { } $foo = new Foo(); $bar = new Bar(); $t->diag('testing partial dependencies'); include_search_result($foo, 'query'); $values = include_partial(null, null, true); $t->is($values['partial'], 'FooPartial', 'include_search_result() selects the correct partial'); $t->ok($values['params']['result'] === $foo, 'include_search_result() sends the same result'); $t->is($values['params']['query'], 'query', 'include_search_result() passes the query'); include_search_controls($foo); $values = include_partial(null, null, true); $t->is($values['partial'], 'sfLucene/controls', 'include_search_controls() selects the correct partial'); $t->ok($values['params']['form'] === $foo, 'include_search_controls() sends the same form'); include_search_pager($foo, $bar, 8); $values = include_partial(null, null, true); $t->is($values['partial'], 'sfLucene/pagerNavigation', 'include_search_pager() selects the correct partial'); $t->ok($values['params']['pager'] === $foo, 'include_search_pager() sends the same pager'); $t->ok($values['params']['form'] === $bar, 'include_search_pager() sends the same form'); $t->is($values['params']['radius'], 8, 'include_search_pager() sends the correct radius'); $t->diag('testing highlighting');