Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added and index page for series #1229

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions pages/catalog/CatalogHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,14 @@ public function series($args, $request)
$templateMgr = TemplateManager::getManager($request);
$context = $request->getContext();

// Provide a list of series to browse
if (!$seriesPath) {
$seriesDao = DAORegistry::getDAO('SeriesDAO');
$allSeries = $seriesDao->getByPressId($context->getId())->toArray();
$templateMgr->assign('allSeries', $allSeries);
return $templateMgr->display('frontend/pages/catalogSeriesIndex.tpl');
}

// Get the series
$seriesDao = DAORegistry::getDAO('SeriesDAO'); /** @var SeriesDAO $seriesDao */
$series = $seriesDao->getByPath($seriesPath, $context->getId());
Expand Down
1 change: 1 addition & 0 deletions pages/catalog/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
case 'newReleases':
case 'series':
case 'thumbnail':
case 'seriesIndex':
case 'results':
define('HANDLER_CLASS', 'APP\pages\catalog\CatalogHandler');
break;
Expand Down
63 changes: 63 additions & 0 deletions templates/frontend/pages/catalogSeriesIndex.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{**
* templates/frontend/pages/catalogSeriesIndex.tpl
*
* Copyright (c) 2014-2020 Simon Fraser University Library
* Copyright (c) 2003-2020 John Willinsky
* Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
*
* @brief Display the page to view the series that are included in a OMP press.
* @uses browseSeriesItem array List of series in this press
*}

{include file="frontend/components/header.tpl" pageTitle="plugins.block.browse.series"}

<div class="page page_catalog_seriesIndex">

{* Breadcrumb *}
{include file="frontend/components/breadcrumbs_catalog.tpl" type="series" currentTitleKey="plugins.block.browse.series"}

<h2>
{translate key="plugins.block.browse.series"}
</h2>

{* Index with series *}
<div class="seriesIndex">
<ul>

{* Series *}
{if $browseSeriesFactory && $browseSeriesFactory->getCount()}

{iterate from=browseSeriesFactory item=browseSeriesItem}
<li>

<div class="imageDescription">

{* Image and description *}

<div class="cover"> <a href="{url router=$smarty.const.ROUTE_PAGE page="catalog" op="series" path=$browseSeriesItem->getPath()|escape}">
<img src="{url router=$smarty.const.ROUTE_PAGE page="catalog" op="thumbnail" type="series" id=$browseSeriesItem->getId()|escape}" alt="{$browseSeriesItem->getLocalizedFullTitle()|escape}" /></a>
</div>

<div class="metadata">
<h3><a href="{url router=$smarty.const.ROUTE_PAGE page="catalog" op="series" path=$browseSeriesItem->getPath()|escape}"> {$browseSeriesItem->getLocalizedFullTitle()|escape}</a></h3>

<div class="description">{$browseSeriesItem->getLocalizedDescription()|strip_unsafe_html|truncate:800}</div>

{if $browseSeriesItem->getPrintISSN()}
<div class="printISSN">{translate key="catalog.manage.series.printIssn"} {$browseSeriesItem->getPrintISSN()|escape}</div>{/if}

{if $browseSeriesItem->getOnlineISSN()}
<div class="onlineISSN">{translate key="catalog.manage.series.onlineIssn"} {$browseSeriesItem->getOnlineISSN()|escape}</div>{/if}

</div>

</li>
{/iterate}

{/if}
</ul>
</div>

</div><!-- .page -->

{include file="frontend/components/footer.tpl"}