Bug 8083 - Add HTML & PDF links to the reading tools
Add HTML & PDF links to the reading tools
Status: NEW
Product: OJS
Classification: Unclassified
Component: Reading Tools
2.4.x
All All
: P3 enhancement
Assigned To: James MacGregor
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2013-01-16 19:18 PST by Tagir Valeev
Modified: 2013-10-29 23:17 PDT (History)
1 user (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Article tools with HTML and PDF links (8.50 KB, image/png)
2013-01-16 19:18 PST, Tagir Valeev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tagir Valeev 2013-01-16 19:18:37 PST
Created attachment 3901 [details]
Article tools with HTML and PDF links

Hello!

I'm using 2.4.1. version. Currently it's not so easy to switch from HTML to PDF version and vice versa: I should click to Abstract and then select other format in galleys line. It would be nice to add links to HTML and PDF if available into the reading tools and mark with bold currently selected view if possible.

Actually I already did this on my installation changing
plugins/blocks/readingTools/block.tpl
"if $journalRt->getAbstract()" section was replaced with:

{if $journalRt->getAbstract() && $article->getLocalizedAbstract()}
    <div class="articleToolItem">
        <img src="{$baseUrl}/plugins/blocks/readingTools/icons/abstract.png" class="articleToolIcon" /> {if !$galley}<b>{/if}<a href="{url page="article" op="view" path=$articleId}" target="_parent">{translate key="article.abstract"}</a>{if !$galley}</b>{/if}<br />
    </div>
    {foreach from=$article->getLocalizedGalleys() item=artgalley}
        {if $artgalley->isPdfGalley()}
            <div class="articleToolItem">
                <img src="{$baseUrl}/plugins/blocks/readingTools/icons/pdf.png" class="articleToolIcon" /> {if $galley==$artgalley}<b>{/if}<a href="{url page="article" op="view" path=$articleId}/{$artgalley->getId()}" target="_parent">{$artgalley->getGalleyLabel()}</a>{if $galley==$artgalley}</b>{/if}<br />
            </div>
        {/if}
        {if $artgalley->isHtmlGalley()}
            <div class="articleToolItem">
                <img src="{$baseUrl}/plugins/blocks/readingTools/icons/html.png" class="articleToolIcon" /> {if $galley==$artgalley}<b>{/if}<a href="{url page="article" op="view" path=$articleId}/{$artgalley->getId()}" target="_parent">{$artgalley->getGalleyLabel()}</a>{if $galley==$artgalley}</b>{/if}<br />
            </div>
        {/if}
    {/foreach}
{/if}

I also found some free 24x24 icons for HTML and PDF links. Looks quite nice for mec (screenshot is attached). Sorry, I was too lazy to check subscriptions/permissions as we're going to launch open-access journal and I'm not experienced with both PHP and your project, thus code might be suboptimal.
Comment 1 James MacGregor 2013-05-29 15:00:19 PDT
Thanks, Tagir! I'm moving for consideration to 2.4.3. Note that this contribution may be superseded by other changes we are making to the reading tools and PDF/HTML display towards OJS 3.0.
Comment 2 James MacGregor 2013-10-29 23:17:11 PDT
Deferring for now. It's a great idea, but it needs further consideration for other filetypes, and likely will need icon creation/vetting.