[OJS 3] Archives -- Group by Year

It’s really interesting, thanks!
Would you be so kind to make a plugin out of it?

1 Like

I’m sorry. I don’t think i have enough expirience.

Hi, is it possible to add accordion syle in it? I tried doing it but it only showed one issue from the year (as it has foreach code).

that would require javascript of some sort probably.

https://jqueryui.com/accordion/

I think jqueryui is loaded by default in OJS, not sure of frontend though.

Hi, guys!

I have this code:

{**

  • templates/frontend/pages/issueArchive.tpl
  • Copyright (c) 2014-2018 Simon Fraser University
  • Copyright (c) 2003-2018 John Willinsky
  • Distributed under the GNU GPL v2. For full terms see the file docs/COPYING.
  • @brief Display a list of recent issues.
  • @uses $issues Array Collection of issues to display
  • @uses $prevPage int The previous page number
  • @uses $nextPage int The next page number
  • @uses $showingStart int The number of the first item on this page
  • @uses $showingEnd int The number of the last item on this page
  • @uses $total int Count of all published monographs
    *}
    {capture assign=“pageTitle”}
    {if $prevPage}
    {translate key=“archive.archivesPageNumber” pageNumber=$prevPage+1}
    {else}
    {translate key=“archive.archives”}
    {/if}
    {/capture}
    {include file=“frontend/components/header.tpl” pageTitleTranslated=$pageTitle}
<div class="page-header page-archives-header">
	<h1>{$pageTitle}</h1>
</div>

{* No issues have been published *}
{if empty($issues)}
	<div class="row">
		<div class="col-md-8">
			<p>{translate key="current.noCurrentIssueDesc"}</p>
		</div>
	</div>

{* List issues *}
{else}
	{foreach from=$issues item="issue" key="i"}
		{if $i % 4 == 0 && $i > 0}
			</div>
			{assign var="open" value=false}
		{/if}
		{if $i % 4 == 0}
			<div class="row justify-content-around">
			{assign var="open" value=true}
		{/if}
		<div class="col-md-3 col-lg-2">
			{include file="frontend/objects/issue_summary.tpl" heading="h2"}
		</div>
	{/foreach}
	{if $open}
		</div>{* Close an open row *}
	{/if}

	{* Pagination *}
	{capture assign="prevUrl"}
		{if $prevPage > 1}
			{url router=$smarty.const.ROUTE_PAGE page="issue" op="archive" path=$prevPage}
		{elseif $prevPage === 1}
			{url router=$smarty.const.ROUTE_PAGE page="issue" op="archive"}
		{/if}
	{/capture}
	{capture assign="nextUrl"}
		{if $nextPage}
			{url router=$smarty.const.ROUTE_PAGE page="issue" op="archive" path=$nextPage}
		{/if}
	{/capture}
	{include
		file="frontend/components/pagination.tpl"
		prevUrl=$prevUrl|trim
		nextUrl=$nextUrl|trim
		showingStart=$showingStart
		showingEnd=$showingEnd
		total=$total
	}
{/if}

{include file=“frontend/components/footer.tpl”}

Please, help me to do group by year!

1 Like

Seconding this proposal. Browsing archives with over 100 issues is not efficient at the moment, because you have to scroll down to the bottom of the page several times.

Grouping by year would be a great core feature for OJS in my opinion. Most major publishing platforms seem to be using an accordion style layout, as mentioned above. I think it’s a reasonable solution. I’ve even seen some who are using several levels, sorting by decade and then year, which would be great for some of our journals who have content going back to the early 1900s, but that is of course a special case.

Most important for us is that the standard behaviour of archive browsing is improved with large quantities of issues in mind.

Best regards,
Magnus A
Lund University Library

Have a look at this example: https://chimia.ch/chimia/issue/archive (308 issues currently). Issues are grouped by year, the last 10 are open, but the remaining can be opened, too.

proposed before:

Hi everyone. I’m copying over the results of some discussions we had several years ago in the dev team. Unfortunately, we have not been able to make progress on this yet.

During the Barcelona sprint, a few of us did some research on this internally and worked together to identify the key use cases we want to serve on the issue archive page. We decided we want to give editors two choices:

  1. Should issues be grouped by year, volume or not at all?
  2. Should issue covers be prominently displayed or not?

These choices could be put into options for the default theme and it can present different issue archive pages depending on each option.

With that in mind we did some preliminary mockups. In this mockup, the issues are grouped by year and volume, and they work like tabs. Clicking on a year “2019 – Volume 2” will show all issues from that year without waiting for a new page load.

side-tabs

In this mockup, the issues are similarly grouped but appear in an accordion display in which the group names appear inline with the issues, and you can toggle the groups open/closed. This provides a more dense display which may work better for journals that have very little issue information and never use cover images.

accordion

These mockups support the most common use case, in which issue cover images are not used or are not a key part of the issue package, either because issue cover images are all similar or because resources are not invested in good-looking covers. In such cases, the issue details can be shown with or without the cover image without having a big impact on the UX, as below.

issue-details

In the mockup below, we show an issue archive page designed to highlight cover images. This would work best in cases where a journal invests significant resources in attractive, distinctive covers. It could work with or without grouping by year or volume.

covers

In the final mockup, we show a browsing pattern specifically for small devices like phones. In such circumstances, we adopt a swiping pattern that is common to mobile devices, in which the user can swipe left/right within the nav area at the top in order to quickly reach old years. And they can swipe left/right within the issue list area to go to the prev/next group (years/volumes).

mobile

From Group archive issues by year (as in OJS2) · Issue #4667 · pkp/pkp-lib · GitHub.

3 Likes

Hi @NateWr . We’d still be happy with the fourth one (the same as in the initial message).

2 Likes

Interesting mockups - is a plugin or a website setting planned where the different options are configurable? So publishers could choose what suits them best.

If you are interested in the code for the CHIMIA example above then I can share. It’s just a template / CSS change plus some JavaScript.

On another note: I’m thinking of creating a sidebar block plugin that allows to navigate forward/backwards from issue to issue on the TOC page, and from article to article on the article details page. Unfortunately, I haven’t found the time yet.

1 Like

Hello @Ph_We,

We are trying to make all first “Feature Request” posts follow same structure.We hope this will make it easier to understand the requests and, at the same time, ensure that no relevant information is missing.

Could you please edit your post following this template?

Describe the problem you would like to solve
Example: Our editors need a way to […]

Describe the solution you’d like
Tell us how you would like this problem to be solved.

Who is asking for this feature?
Tell us what kind of users are requesting this feature. Example: Journal Editors, Journal Administrators, Technical Support, Authors, Reviewers, etc.

Additional information
Add any other information or screenshots about the feature request here.

You can use this post as a reference.

Best regards,
m.

Hi @marc! Not sure if there was such template back in 2017 :upside_down_face: Anyway the post is too old, so I do not have permission to edit it now, sorry.

1 Like

:rofl: :rofl: :rofl: :rofl:

What if you create a new FR with the conclusions of this thread and we move the votes from this post to there?

Hi, I think a plugin may be helpful, visit https://openjournaltheme.com/br/produto/published-by-year-ojs-3-plugin for details.

1 Like