Author: sevein
Date: Tue Apr 17 16:38:31 2012
New Revision: 11457
Log:
Move autocomplete tmpl to main module
Added:
branches/2.0/apps/qubit/modules/search/templates/autocompleteSuccess.php
- copied unchanged from r11449,
branches/2.0/plugins/qtDominionPlugin/modules/search/templates/autocompleteSuccess.php
Deleted:
branches/2.0/plugins/qtDominionPlugin/modules/search/templates/autocompleteSuccess.php
Copied:
branches/2.0/apps/qubit/modules/search/templates/autocompleteSuccess.php (from
r11449,
branches/2.0/plugins/qtDominionPlugin/modules/search/templates/autocompleteSuccess.php)
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ branches/2.0/apps/qubit/modules/search/templates/autocompleteSuccess.php
Tue Apr 17 16:38:31 2012 (r11457, copy of r11449,
branches/2.0/plugins/qtDominionPlugin/modules/search/templates/autocompleteSuccess.php)
@@ -0,0 +1,88 @@
+<div class="span6">
+
+ <?php if ($descriptionsHits > 0): ?>
+
+ <div class="group">
+ <?php echo
image_tag('/plugins/qtDominionPlugin/images/icons-small/icon-new-small.png',
array('width' => '25', 'height' => '25')) ?>
+ <ul>
+ <?php foreach ($descriptions->getResults() as $hit): ?>
+ <?php $doc = $hit->getData() ?>
+ <?php foreach ($doc['i18n'] as $i18n): ?>
+ <?php $doc[$i18n['culture']] = $i18n ?>
+ <?php endforeach; ?>
+ <?php unset($doc['i18n']) ?>
+ <li><?php echo link_to(($doc[$sf_user->getCulture()]['title'] ?:
$doc[$doc['sourceCulture']]['title']), array('module' => 'informationobject',
'slug' => $doc['slug'])) ?></li>
+ <!-- TODO: include description level logic; performance impact? -->
+ <?php endforeach; ?>
+ <?php if ($descriptions->getTotalHits() > 3): ?>
+ <li class="showall"><?php echo link_to(__('all matching
descriptions'), array('module' => 'search', 'action' => 'index') +
$sf_request->getParameterHolder()->getAll()) ?></li>
+ <?php endif; ?>
+ </ul>
+ </div>
+
+ <?php endif; ?>
+
+ <?php if ($subjectsHits > 0): ?>
+
+ <div class="group">
+ <?php echo
image_tag('/plugins/qtDominionPlugin/images/icons-small/icon-topics-small.png',
array('width' => '25', 'height' => '25')) ?>
+ <ul>
+ <?php foreach ($subjects->getResults() as $hit): ?>
+ <?php $doc = $hit->getData() ?>
+ <?php foreach ($doc['i18n'] as $i18n): ?>
+ <?php $doc[$i18n['culture']] = $i18n ?>
+ <?php endforeach; ?>
+ <?php unset($doc['i18n']) ?>
+ <li><?php echo link_to(($doc[$sf_user->getCulture()]['name'] ?:
$doc[$doc['sourceCulture']]['name']), array('module' => 'search', 'action' =>
'index', 'subjects_id' => $hit->getId())) ?></li>
+ <?php endforeach; ?>
+ <?php if ($subjects->getTotalHits() > 3): ?>
+ <li class="showall"><?php echo link_to(__('all matching subjects'),
array('module' => 'search', 'action' => 'index') +
$sf_request->getParameterHolder()->getAll()) ?></li>
+ <?php endif; ?>
+ </ul>
+ </div>
+
+ <?php endif; ?>
+
+ <?php if ($repositoriesHits > 0): ?>
+
+ <div class="group">
+ <?php echo
image_tag('/plugins/qtDominionPlugin/images/icons-small/icon-institutions-small.png',
array('width' => '25', 'height' => '25')) ?>
+ <ul>
+ <?php foreach ($repositories->getResults() as $hit): ?>
+ <?php $doc = $hit->getData() ?>
+ <?php foreach ($doc['actor'] as $i18n): ?>
+ <?php $doc[$i18n['culture']] = $i18n ?>
+ <?php endforeach; ?>
+ <?php unset($doc['actor']) // continue; ?>
+ <li><?php echo
link_to(($doc[$sf_user->getCulture()]['authorizedFormOfName'] ?:
$doc[$doc['sourceCulture']]['authorizedFormOfName']), array('module' =>
'repository', 'slug' => $doc['slug'])) ?></li>
+ <?php endforeach; ?>
+ <?php if ($repositories->getTotalHits() > 3): ?>
+ <li class="showall"><?php echo link_to(__('all matching
institutions'), array('module' => 'search', 'action' => 'index') +
$sf_request->getParameterHolder()->getAll()) ?></li>
+ <?php endif; ?>
+ </ul>
+ </div>
+
+ <?php endif; ?>
+
+ <?php if ($actorsHits > 0): ?>
+
+ <div class="group">
+ <?php echo
image_tag('/plugins/qtDominionPlugin/images/icons-small/icon-people-small.png',
array('width' => '25', 'height' => '25')) ?>
+ <ul>
+ <?php foreach ($actors->getResults() as $hit): ?>
+ <?php $doc = $hit->getData() ?>
+ <?php foreach ($doc['i18n'] as $i18n): ?>
+ <?php $doc[$i18n['culture']] = $i18n ?>
+ <?php endforeach; ?>
+ <?php unset($doc['i18n']) // continue; ?>
+ <li><?php echo
link_to(($doc[$sf_user->getCulture()]['authorizedFormOfName'] ?:
$doc[$doc['sourceCulture']]['authorizedFormOfName']), array('module' =>
'search', 'action' => 'index', 'names_id' => $hit->getId())) ?></li>
+ <?php endforeach; ?>
+ <?php if ($actors->getTotalHits() > 3): ?>
+ <li class="showall"><?php echo link_to(__('all matching people &
organizations'), array('module' => 'search', 'action' => 'index') +
$sf_request->getParameterHolder()->getAll()) ?></li>
+ <?php endif; ?>
+ </ul>
+ </div>
+
+ <?php endif; ?>
+
+</div>
--
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.com/group/qubit-commits?hl=en.