list of sites from table to lists (ul/li) to be able to use accordion and more semantic
This commit is contained in:
parent
2d4eb887be
commit
7dc3de84c2
|
@ -2,40 +2,55 @@
|
||||||
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
$archiveSiteHelper = $this->getHelperPluginManager()->get('archiveSiteMeta');
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<div class="list-of-sites">
|
<section class="collections-list">
|
||||||
<div class="site-list">
|
|
||||||
|
|
||||||
<table>
|
<header>
|
||||||
<thead>
|
<h2> Latest in collections</h2>
|
||||||
<tr>
|
</header>
|
||||||
<th>Title</th>
|
<main class="">
|
||||||
<th>Artist</th>
|
<article class="">
|
||||||
<th>Collection</th>
|
<ul class="accordion" data-responsive-accordion-tabs="accordion small-accordion" data-multi-expand="true" data-allow-all-closed="true" data-deep-link="true">
|
||||||
<th>Date</th>
|
<li class="accordion-item title" data-accordion-item disabled>
|
||||||
</tr>
|
<a href="#" class="accordion-title">
|
||||||
</thead>
|
<ul class="">
|
||||||
<tbody>
|
<li class="title">Title</li>
|
||||||
|
<li class="curator">Artist</li>
|
||||||
|
<li class="collection-name">Collection</li>
|
||||||
|
<li class="date">Date</li>
|
||||||
|
</ul>
|
||||||
|
</a>
|
||||||
|
<div class="accordion-content" data-tab-content>
|
||||||
|
<figure>
|
||||||
|
</figure>
|
||||||
|
<p>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</li>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
// read each omeka site to publish
|
||||||
foreach($sites as $site):
|
foreach($sites as $site):
|
||||||
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
|
$site_meta_values = $archiveSiteHelper->getSiteMetaValues($site);
|
||||||
echo $this->partial('common/site-list-entry', [
|
// table body build file
|
||||||
'site' => $site,
|
echo $this->partial('common/site-list-entry', [
|
||||||
'showSummary' => $summaries,
|
'site' => $site,
|
||||||
'site_meta_values' => $site_meta_values,
|
'showSummary' => $summaries,
|
||||||
'archive_collections' => $archiveSiteHelper->getCollections(),
|
'site_meta_values' => $site_meta_values,
|
||||||
]);
|
'archive_collections' => $archiveSiteHelper->getCollections(),
|
||||||
|
]);
|
||||||
endforeach;
|
endforeach;
|
||||||
?>
|
?>
|
||||||
|
</ul>
|
||||||
</tbody>
|
</article>
|
||||||
</table>
|
</main>
|
||||||
|
<aside>
|
||||||
</div>
|
<nav>
|
||||||
<?php
|
<?php
|
||||||
if (1 == 0):
|
if (1 == 0):
|
||||||
//if ($pagination):
|
//if ($pagination):
|
||||||
echo $this->pagination();
|
echo $this->pagination();
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</nav>
|
||||||
|
</aside>
|
||||||
|
</section>
|
||||||
|
|
|
@ -1,41 +1,43 @@
|
||||||
<?php
|
<?php
|
||||||
|
// publish as a table the content
|
||||||
$summary = $showSummary ? $site->summary() : null;
|
$summary = $showSummary ? $site->summary() : null;
|
||||||
|
//
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="_expand_site_item">
|
<li class="accordion-item" data-accordion-item>
|
||||||
<td>
|
<a href="#" class="accordion-title">
|
||||||
<?= $site->title() ?>
|
<ul class="">
|
||||||
</td>
|
<li class="title">
|
||||||
<td>
|
<?= $site->title() ?>
|
||||||
<?php if ($site_meta_values != null): ?>
|
</li>
|
||||||
<?= $site_meta_values['currator']; ?><br />
|
<li class="curator">
|
||||||
<?php endif; ?>
|
<?php if ($site_meta_values != null): ?>
|
||||||
</td>
|
<?= $site_meta_values['currator']; ?><br />
|
||||||
<td>
|
<?php endif; ?>
|
||||||
<?php if ($site_meta_values != null): ?>
|
</li>
|
||||||
<?= $archive_collections[$site_meta_values['collection']]; ?>
|
<li class="collection-name">
|
||||||
<?php endif; ?>
|
<?php if ($site_meta_values != null): ?>
|
||||||
</td>
|
<?= $archive_collections[$site_meta_values['collection']]; ?>
|
||||||
<td>
|
<?php endif; ?>
|
||||||
<?php if ($site_meta_values != null): ?>
|
</li>
|
||||||
<?= $site_meta_values['project_date']; ?>
|
<li class="date">
|
||||||
<?php endif; ?>
|
<?php if ($site_meta_values != null): ?>
|
||||||
</td>
|
<?= $site_meta_values['project_date']; ?>
|
||||||
</tr>
|
<?php endif; ?>
|
||||||
<tr style="display:none">
|
</li>
|
||||||
<td>
|
</ul>
|
||||||
|
</a>
|
||||||
|
<div class="accordion-content" data-tab-content>
|
||||||
|
<figure>
|
||||||
<?php if ($site_meta_values != null): ?>
|
<?php if ($site_meta_values != null): ?>
|
||||||
<img src="<?= $site_meta_values['thumbnail']; ?>" />
|
<img src="<?= $site_meta_values['thumbnail']; ?>" />
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
</td>
|
</figure>
|
||||||
<td colspan="3">
|
<p>
|
||||||
<?php if ($summary): ?>
|
<?php if ($summary): ?>
|
||||||
<?php echo nl2br($this->escapeHtml($summary)); ?>
|
<?php echo nl2br($this->escapeHtml($summary)); ?>
|
||||||
<br />
|
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<button class="go_to_site_button"
|
<a class="button small" href="<?= $site->siteUrl() ?>">View</a>
|
||||||
onclick="window.location.href = '<?= $site->siteUrl() ?>'">
|
</p>
|
||||||
View
|
</div>
|
||||||
</button>
|
</li>
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
Loading…
Reference in New Issue