omp icon indicating copy to clipboard operation
omp copied to clipboard

overview page for series available in a press to be added OMP

Open gemusehandler opened this issue 4 years ago • 4 comments

gemusehandler avatar Aug 15 '20 18:08 gemusehandler

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Aug 15 '20 18:08 CLAassistant

Thanks for that.

On 18 Aug 2020, at 11:59, Nate Wright [email protected] wrote:

@NateWr requested changes on this pull request.

Thanks @gemusehandler https://github.com/gemusehandler! Nice work. I've added some comments to the code to reflect some minor syntax and whitespace changes in order to fit our coding style.

I've also provided a commit that just re-arranges your code a little bit so that the series index can be found a /catalog/series instead of /catalog/seriesIndex. You can see that at gemusehandler#1 https://github.com/gemusehandler/omp/pull/1 and you should be able to just merge it into your code.

In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472047377:

@@ -0,0 +1,66 @@ +{**

    • templates/frontend/pages/catalogSeries.tpl
    • Copyright (c) 2014-2017 Simon Fraser University Library
    • Copyright (c) 2003-2017 John Willinsky
    • Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
    • @brief Display the page to view books in a series in the catalog.
    • @uses $series Series Current series being viewed
    • @uses $publishedMonographs array List of published monographs in this series
    • @uses $featuredMonographIds array List of featured monograph IDs in this series
    • @uses $newReleasesMonographs array List of new monographs in this series
  • *} +{include file="frontend/components/header.tpl" pageTitle="plugins.block.browse.series"} Replace plugins.block.browse.series with series.series here and everywhere else that it is used.

In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472047599:

@@ -0,0 +1,66 @@ +{**

    • templates/frontend/pages/catalogSeries.tpl This should be catalogSeriesIndex.tpl

In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472047854:

@@ -0,0 +1,66 @@ +{**

    • templates/frontend/pages/catalogSeries.tpl
    • Copyright (c) 2014-2017 Simon Fraser University Library
    • Copyright (c) 2003-2017 John Willinsky
    • Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
    • @brief Display the page to view books in a series in the catalog.
    • @uses $series Series Current series being viewed
    • @uses $publishedMonographs array List of published monographs in this series
    • @uses $featuredMonographIds array List of featured monograph IDs in this series
    • @uses $newReleasesMonographs array List of new monographs in this series The @brief and @uses declarations need to be updated to reflect this template.

In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472047925:

@@ -0,0 +1,66 @@ +{**

    • templates/frontend/pages/catalogSeries.tpl
    • Copyright (c) 2014-2017 Simon Fraser University Library
    • Copyright (c) 2003-2017 John Willinsky Update the copyright to go to 2020.

In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472049544:

    • @uses $featuredMonographIds array List of featured monograph IDs in this series
    • @uses $newReleasesMonographs array List of new monographs in this series
  • *} +{include file="frontend/components/header.tpl" pageTitle="plugins.block.browse.series"}

+

+
  • {* Breadcrumb *}
  • {include file="frontend/components/breadcrumbs_catalog.tpl" type="series" currentTitleKey="plugins.block.browse.series"}
  • {translate key="plugins.block.browse.series"}
    
  • {* Index with series *}
  • Let's call this class series_list to follow the naming conventions of other classes, like cmp_monograph_list.

    In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472050430:

    • {* Breadcrumb *}
    • {include file="frontend/components/breadcrumbs_catalog.tpl" type="series" currentTitleKey="plugins.block.browse.series"}
    • {translate key="plugins.block.browse.series"}
      
    • {* Index with series *}
    • {* Series *}
      
    • {if $browseSeriesFactory && $browseSeriesFactory->getCount()}
      
    • {iterate from=browseSeriesFactory item=browseSeriesItem}				
      
    • Double-check the indentation here and throughout the rest of this template. HTML elements and smarty tags should be indented, like:

        {if ...} {iterate ...}
      • ...
      • {/iterate} {/if}
      In templates/frontend/pages/catalogSeriesIndex.tpl :
      • {* Index with series *}
      • {* 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>
        
      • Let's only show an image if it exists. You can do this:

        {assign var="image" value=$browseSeriesItem->getImage()} {if $image} <img ...> {/if} In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472054046:

        •   {* 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>
          

        Change h3 to h2 to reflect the page structure.

        In templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855#discussion_r472054603:

        • {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>
          

        Let's not truncate this string. It will cut it off mid-word. Instead, we prefer to let each journal decide the length that is appropriate by adjusting the description.

        — You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pkp/omp/pull/855#pullrequestreview-469156308, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDGQSZEOEAS34PSKSKLDQLSBJGGJANCNFSM4QAMXUZA.

gemusehandler avatar Sep 08 '20 21:09 gemusehandler

Hi @gemusehandler, were you able to make the changes? It doesn't look like there are any new commits in this pull request, so you might need to push them up still.

NateWr avatar Sep 09 '20 08:09 NateWr

Ha Nate, sorry it took some time. Start of the new academic year is always a busy time. I have gone through all the comments and made changes accordingly in the templates/frontend/pages/catalogSeriesIndex.tpl https://github.com/pkp/omp/pull/855/files#diff-463610f59a1419f56b1d3fefc4210518

Please let me know if I still need to do anything Still working on my Github skills. Frank (aka gemusehandler)

On 9 Sep 2020, at 10:26, Nate Wright [email protected] wrote:

Hi @gemusehandler https://github.com/gemusehandler, were you able to make the changes? It doesn't look like there are any new commits in this pull request, so you might need to push them up still.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/pkp/omp/pull/855#issuecomment-689411123, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABDGQS6GSZO43XAN5YNSMT3SE432VANCNFSM4QAMXUZA.

gemusehandler avatar Sep 20 '20 17:09 gemusehandler