Author: david
Date: Wed Oct 14 16:53:26 2009
New Revision: 3743
Log:
Remove actor autocomplete pager, add fallback criteria and sort. Add
autocompleteSuccess template with no javascripts or css.
Added:
trunk/apps/qubit/modules/actor/templates/autocompleteSuccess.php
(contents, props changed)
Modified:
trunk/apps/qubit/modules/actor/actions/autocompleteAction.class.php
trunk/apps/qubit/modules/actor/config/view.yml
Modified: trunk/apps/qubit/modules/actor/actions/autocompleteAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/actor/actions/autocompleteAction.class.php Wed Oct
14 16:42:13 2009 (r3742)
+++ trunk/apps/qubit/modules/actor/actions/autocompleteAction.class.php Wed Oct
14 16:53:26 2009 (r3743)
@@ -25,14 +25,14 @@
$criteria->add(QubitActor::CLASS_NAME, 'QubitActor');
$criteria->add(QubitActorI18n::AUTHORIZED_FORM_OF_NAME,
$request->query.'%', Criteria::LIKE);
$criteria->addJoin(QubitActor::ID, QubitActorI18n::ID);
+ $criteria->addAscendingOrderByColumn('authorized_form_of_name');
+ $criteria->setDistinct();
+ $criteria->setLimit(sfConfig::get('app_hits_per_page', 10));
- $this->pager = new QubitPager('QubitActor');
- $this->pager->setCriteria($criteria);
- $this->pager->setPage($request->page);
- $this->pager->init();
+ $criteria = QubitCultureFallback::addFallbackCriteria($criteria,
'QubitActor');
- $this->actors = $this->pager->getResults();
+ $this->actors = QubitActor::get($criteria);
- $this->setTemplate('list');
+ $this->setLayout('xmlResponseLayout');
}
}
Modified: trunk/apps/qubit/modules/actor/config/view.yml
==============================================================================
--- trunk/apps/qubit/modules/actor/config/view.yml Wed Oct 14 16:42:13
2009 (r3742)
+++ trunk/apps/qubit/modules/actor/config/view.yml Wed Oct 14 16:53:26
2009 (r3743)
@@ -18,6 +18,12 @@
components:
sidebar: []
+autocompleteSuccess:
+ javascripts: [-*]
+ components:
+ sidebar: []
+ stylesheets: [-*]
+
all:
components:
sidebar: [actor, contextMenu]
Added: trunk/apps/qubit/modules/actor/templates/autocompleteSuccess.php
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ trunk/apps/qubit/modules/actor/templates/autocompleteSuccess.php Wed Oct
14 16:53:26 2009 (r3743)
@@ -0,0 +1,15 @@
+<table>
+<caption><?php echo __('actors') ?></caption>
+<thead>
+<tr><th><?php echo __('name') ?></th></tr>
+</thead>
+<tbody>
+<?php foreach($actors as $actor): ?>
+<tr>
+ <td>
+ <?php echo link_to($actor->getAuthorizedFormOfName(array('cultureFallback'
=> true)), array('module' => 'actor', 'action' => 'show', 'id' => $actor->id))
?>
+ </td>
+</tr>
+<?php endforeach; ?>
+</tbody>
+</table>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Qubit Toolkit Commits" 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.ca/group/qubit-commits?hl=en
-~----------~----~----~----~------~----~------~--~---