OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS (could be for OxS) site index improvements

OJS development discussion, enhancement requests, third-party patches and plug-ins.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
Developer Resources:

Documentation: The OJS Technical Reference and the OJS API Reference are both available from the OJS Documentation page.

Git: You can access our public Git Repository here. Comprehensive Git usage instructions are available on the wiki.

Bugzilla: You can access our Bugzilla report tracker here.

Search: You can use our Google Custom Search to search across our main website, the support forum, and Bugzilla.

Questions and discussion are welcome, but if you have a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a technical support question, try the OJS Technical Support subforum.

OJS (could be for OxS) site index improvements

Postby ramon » Wed Mar 13, 2013 10:28 am

Hello all,

I'm creating a new post because I couldn't find any other post related to this.
Not sure if it should be here, but made more sense. Feel free to organize as you see fit!!

As I'm "playing" with OJS 2.42, I realized the site index hasn't changed much, and still does not allow proper CSS customization.
I believe the site index HTML output could be improved with the following (right after the really necessary alpha list, for portals):

Code: Select all
<ol class="journals">
{iterate from=journals item=journal}
        <li>
        {if $site->getSetting('showThumbnail')}
                {assign var="displayJournalThumbnail" value=$journal->getLocalizedSetting('journalThumbnail')}
                {if $displayJournalThumbnail && is_array($displayJournalThumbnail)}
                        {assign var="altText" value=$journal->getLocalizedSetting('journalThumbnailAltText')}
                        <div class="homepageImage"><a href="{url journal=$journal->getPath()}" class="action"><img src="{$journalFilesPath}{$journal->getId()}/{$displayJournalThumbnail.uploadName|escape:"url"}" {if $altText != ''}alt="{$altText|escape}"{else}alt="{translate key="common.pageHeaderLogo.altText"}"{/if} /></a></div>
                {/if}
        {/if}
        {if $site->getSetting('showTitle')}
                <h3>{$journal->getLocalizedTitle()|escape}</h3>
        {/if}
        {if $site->getSetting('showDescription')}
                {if $journal->getLocalizedDescription()}
                        <div class="journal_desc">{$journal->getLocalizedDescription()|nl2br}</div>
                {/if}
        {/if}
        <div class="journal_access"><a href="{url journal=$journal->getPath()}" class="action">{translate key="site.journalView"}</a> | <a href="{url journal=$journal->getPath() page="issue" op="current"}" class="action">{translate key="site.journalCurrent"}</a> | <a href="{url journal=$journal->getPath() page="user" op="register"}" class="action">{translate key="site.journalRegister"}</a></div>
        </li>
{/iterate}

{if $journals->wasEmpty()}
        <li>{translate key="site.noJournals"}</li>
{/if}
</ol>
<div class="pagenav">
        <div id="journalListPageInfo">{page_info iterator=$journals}</div>
        <div id="journalListPageLinks">{page_links anchor="journals" name="journals" iterator=$journals}
</div>


Basically, an ordered list, a few divs replacing <p> tags, with classes added to them, and an extra div to group the page nav, also with a CSS class added to it, was all I did.
This simple change allows much more flexibility with CSS styling.
I can remove the <li> numbering, float them and use CSS media queries to change the width of the <li> items so they adjusts to screen or device size, for example.

Anyway, just a suggestion to incorporate to the code. Improvements to this are always welcome.
If I come up with further ideas, I'll add them here...

_______________________________
Ramón Martins Sodoma da Fonseca
Analista em C&T
Coordenação de Tecnologias de Informação
Instituto Brasileiro de Informação em Ciência e Tecnologia - IBICT
Ministério da Ciência e Tecnologia - MCT
ramon
 
Posts: 931
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Return to OJS Development

Who is online

Users browsing this forum: No registered users and 1 guest