Author: sevein
Date: Wed May 2 17:46:40 2012
New Revision: 11601
Log:
Use facet partial and update array path to actor attributes
Modified:
branches/2.0/apps/qubit/modules/repository/templates/browseSuccess.php
Modified: branches/2.0/apps/qubit/modules/repository/templates/browseSuccess.php
==============================================================================
--- branches/2.0/apps/qubit/modules/repository/templates/browseSuccess.php
Wed May 2 17:45:46 2012 (r11600)
+++ branches/2.0/apps/qubit/modules/repository/templates/browseSuccess.php
Wed May 2 17:46:40 2012 (r11601)
@@ -5,7 +5,7 @@
<div class="span12 hidden-phone">
<h1>
<?php echo
image_tag('/plugins/qtDominionPlugin/images/icons-large/icon-institutions.png',
array('width' => '42', 'height' => '42')) ?>
- <?php echo __('%1% Institutions', array('%1%' =>
$pager->getNbResults())) ?>
+ <?php echo __('%1% institutions', array('%1%' =>
$pager->getNbResults())) ?>
</h1>
</div>
@@ -21,39 +21,19 @@
<div class="span3" id="facets">
- <div class="section">
-
- <h2 class="visible-phone widebtn btn-huge" data-toggle="collapse"
data-target="#archivetype"><?php echo __('Archive type') ?></h2>
-
- <h2 class="hidden-phone"><?php echo __('Archive type'); ?></h2>
-
- <div class="scrollable">
- <ul>
- <li class="active"><?php echo link_to(__('All'), array('types' =>
null) + $sf_request->getParameterHolder()->getAll()) ?></li>
- <?php foreach ($pager->facets['types']['terms'] as $id => $term):
?>
- <li><?php echo
link_to(__($term['term']).'<span>'.$term['count'].'</span>', array('types' =>
$id) + $sf_request->getParameterHolder()->getAll()) ?></li>
- <?php endforeach; ?>
- </ul>
- </div>
-
- </div>
-
- <div class="section">
-
- <h2 class="visible-phone widebtn btn-huge" data-toggle="collapse"
data-target="#province"><?php echo __('Province'); ?></h2>
-
- <h2 class="hidden-phone"><?php echo __('Province'); ?></h2>
-
- <div class="scrollable">
- <ul>
- <li class="active"><?php echo link_to(__('All'),
array('contact_i18n_region' => null) +
$sf_request->getParameterHolder()->getAll()) ?></li>
- <?php foreach($pager->facets['contact_i18n_region']['terms'] as
$id => $term): ?>
- <li><?php echo
link_to(__($term['term']).'<span>'.$term['count'].'</span>',
array('contact_i18n_region' => $id) +
$sf_request->getParameterHolder()->getAll()) ?></li>
- <?php endforeach; ?>
- </ul>
- </div>
-
- </div>
+ <?php echo get_partial('search/facet', array(
+ 'target' => '#facet-archivetype',
+ 'label' => __('Archive type'),
+ 'facet' => 'types',
+ 'pager' => $pager,
+ 'filters' => $filters)) ?>
+
+ <?php echo get_partial('search/facet', array(
+ 'target' => '#facet-province',
+ 'label' => __('Region'),
+ 'facet' => 'contact_i18n_region',
+ 'pager' => $pager,
+ 'filters' => $filters)) ?>
</div>
@@ -62,9 +42,11 @@
<div class="section">
<?php foreach ($pager->getResults() as $hit): ?>
- <?php $doc = build_i18n_doc($hit) ?>
+ <?php $doc = build_i18n_doc($hit, array('actor')) ?>
<div class="institution maxi">
- <h2 class="filltext"><?php echo
link_to($doc[$sf_user->getCulture()]['authorizedFormOfName'] ?:
$doc[$doc['sourceCulture']]['authorizedFormOfName'], array('module' =>
'repository', 'slug' => $doc['slug'])) ?></h2>
+ <h2 class="filltext">
+ <?php echo
link_to($doc['actor'][$sf_user->getCulture()]['authorizedFormOfName'],
array('module' => 'repository', 'slug' => $doc['slug'])) ?>
+ </h2>
</div>
<?php endforeach; ?>
--
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.