Author: david
Date: Fri Oct 29 13:20:43 2010
New Revision: 8667
Log:
Hide table if it contains no data.
Modified:
trunk/apps/qubit/modules/oai/actions/harvesterListAction.class.php
trunk/apps/qubit/modules/oai/templates/harvesterListSuccess.php
Modified: trunk/apps/qubit/modules/oai/actions/harvesterListAction.class.php
==============================================================================
--- trunk/apps/qubit/modules/oai/actions/harvesterListAction.class.php Fri Oct
29 13:04:45 2010 (r8666)
+++ trunk/apps/qubit/modules/oai/actions/harvesterListAction.class.php Fri Oct
29 13:20:43 2010 (r8667)
@@ -35,8 +35,15 @@
public function execute($request)
{
$this->form = new OaiAddRepositoryForm();
- $this->repositories = QubitOaiRepository::getRepositories();
+
+ // Get repositories
+ $criteria = new Criteria;
+ $criteria->add(QubitOaiRepository::ID, null, Criteria::ISNOTNULL);
+ $criteria->addAscendingOrderByColumn(QubitOaiRepository::NAME);
+ $this->repositories = QubitOaiRepository::get($criteria);
+
$this->harvestJob = array();
+
if ($request->isMethod('post'))
{
$this->form->bind($request->oai_harvester);
Modified: trunk/apps/qubit/modules/oai/templates/harvesterListSuccess.php
==============================================================================
--- trunk/apps/qubit/modules/oai/templates/harvesterListSuccess.php Fri Oct
29 13:04:45 2010 (r8666)
+++ trunk/apps/qubit/modules/oai/templates/harvesterListSuccess.php Fri Oct
29 13:20:43 2010 (r8667)
@@ -1,5 +1,6 @@
<h1><?php echo __('Harvested Sites') ?></h1>
+<?php if (0 < count($repositories)): ?>
<table>
<thead>
<tr>
@@ -24,6 +25,7 @@
<?php endforeach; ?>
</tbody>
</table>
+<?php endif; ?>
<fieldset class="collapsible" id="addOaiRepository">
<legend><?php echo __('Add New Repository') ?></legend>
--
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.