first commit
This commit is contained in:
@@ -0,0 +1,93 @@
|
||||
{**
|
||||
* templates/atom.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2023 Simon Fraser University
|
||||
* Copyright (c) 2003-2023 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Atom feed template
|
||||
*
|
||||
*}
|
||||
<?xml version="1.0" encoding="{$defaultCharset|escape}"?>
|
||||
<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
{* required elements *}
|
||||
<id>{$feedUrl}</id>
|
||||
<title>{$context->getLocalizedName()|escape:"html"|strip}</title>
|
||||
|
||||
<updated>{$latestDate|date_format:"Y-m-d\TH:i:sP"}</updated>
|
||||
|
||||
{* recommended elements *}
|
||||
{if $context->getData('contactName')}
|
||||
<author>
|
||||
<name>{$context->getData('contactName')|strip|escape:"html"}</name>
|
||||
{if $context->getData('contactEmail')}
|
||||
<email>{$context->getData('contactEmail')|strip|escape:"html"}</email>
|
||||
{/if}
|
||||
</author>
|
||||
{/if}
|
||||
|
||||
<link rel="alternate" href="{url context=$context->getPath()}" />
|
||||
<link rel="self" type="application/atom+xml" href="{$feedUrl}" />
|
||||
|
||||
{* optional elements *}
|
||||
|
||||
{* <category/> *}
|
||||
{* <contributor/> *}
|
||||
|
||||
<generator uri="https://pkp.sfu.ca/{$applicationIdentifier}/" version="{$applicationVersion|escape}">{$applicationName}</generator>
|
||||
{if $context->getLocalizedDescription()}
|
||||
{assign var="description" value=$context->getLocalizedDescription()}
|
||||
{elseif $context->getLocalizedData('searchDescription')}
|
||||
{assign var="description" value=$context->getLocalizedData('searchDescription')}
|
||||
{/if}
|
||||
|
||||
<subtitle type="html">{$description|strip|escape:"html"}</subtitle>
|
||||
|
||||
{foreach from=$submissions item=item}
|
||||
{assign var=submission value=$item.submission}
|
||||
{assign var=publication value=$submission->getCurrentPublication()}
|
||||
<entry>
|
||||
{* required elements *}
|
||||
<id>{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}</id>
|
||||
<title>{$publication->getLocalizedTitle()|strip|escape:"html"}</title>
|
||||
<updated>{$publication->getData('lastModified')|date_format:"Y-m-d\TH:i:sP"}</updated>
|
||||
|
||||
{* recommended elements *}
|
||||
|
||||
{foreach from=$publication->getData('authors') item=author}
|
||||
<author>
|
||||
<name>{$author->getFullName(false)|strip|escape:"html"}</name>
|
||||
</author>
|
||||
{/foreach}{* authors *}
|
||||
|
||||
<link rel="alternate" href="{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}" />
|
||||
|
||||
{if $publication->getLocalizedData('abstract') || $includeIdentifiers}
|
||||
<summary type="html" xml:base="{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}">
|
||||
{if $includeIdentifiers}
|
||||
{foreach from=$item.identifiers item=identifier}
|
||||
{$identifier.label|strip|escape:"html"}: {', '|implode:$identifier.values|strip|escape:"html"}<br />
|
||||
{/foreach}{* summary identifiers *}
|
||||
<br />
|
||||
{/if}
|
||||
{$publication->getLocalizedData('abstract')|strip|escape:"html"}
|
||||
</summary>
|
||||
{/if}
|
||||
|
||||
{* optional elements *}
|
||||
|
||||
{foreach from=$item.identifiers item=identifier}
|
||||
{foreach from=$identifier.values item=value}
|
||||
<category term="{$value|strip|escape:"html"}" label="{$identifier.label|strip|escape:"html"}" scheme="https://pkp.sfu.ca/{$applicationIdentifier}/category/{$identifier.type|strip|escape:"html"}"/>
|
||||
{/foreach}
|
||||
{/foreach}{* categories *}
|
||||
|
||||
{* <contributor/> *}
|
||||
|
||||
<published>{$publication->getData('datePublished')|date_format:"Y-m-d\TH:i:sP"}</published>
|
||||
|
||||
{* <source/> *}
|
||||
<rights>{translate|escape key="submission.copyrightStatement" copyrightYear=$publication->getData('copyrightYear') copyrightHolder=$publication->getLocalizedData('copyrightHolder')}</rights>
|
||||
</entry>
|
||||
{/foreach}{* submissions *}
|
||||
</feed>
|
||||
@@ -0,0 +1,32 @@
|
||||
{**
|
||||
* templates/block.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2023 Simon Fraser University
|
||||
* Copyright (c) 2003-2023 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Feed plugin navigation sidebar.
|
||||
*
|
||||
*}
|
||||
<div class="pkp_block block_web_feed">
|
||||
<h2 class="title">{translate key="plugins.generic.webfeed.blockTitle"}</h2>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="gateway" op="plugin" path="WebFeedGatewayPlugin"|to_array:"atom"}">
|
||||
<img src="{$baseUrl}/lib/pkp/templates/images/atom.svg" alt="{translate key="plugins.generic.webfeed.atom.altText"}">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="gateway" op="plugin" path="WebFeedGatewayPlugin"|to_array:"rss2"}">
|
||||
<img src="{$baseUrl}/lib/pkp/templates/images/rss20_logo.svg" alt="{translate key="plugins.generic.webfeed.rss2.altText"}">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="gateway" op="plugin" path="WebFeedGatewayPlugin"|to_array:"rss"}">
|
||||
<img src="{$baseUrl}/lib/pkp/templates/images/rss10_logo.svg" alt="{translate key="plugins.generic.webfeed.rss1.altText"}">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,127 @@
|
||||
{**
|
||||
* templates/rss.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2023 Simon Fraser University
|
||||
* Copyright (c) 2003-2023 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* RSS feed template
|
||||
*
|
||||
*}
|
||||
<?xml version="1.0" encoding="{$defaultCharset|escape}"?>
|
||||
<rdf:RDF
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns="http://purl.org/rss/1.0/"
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/"
|
||||
xmlns:cc="http://web.resource.org/cc/"
|
||||
xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/">
|
||||
|
||||
<channel rdf:about="{url context=$context->getPath()}">
|
||||
{* required elements *}
|
||||
<title>{$context->getLocalizedName()|strip|escape:"html"}</title>
|
||||
<link>{url context=$context->getPath()}</link>
|
||||
|
||||
{if $context->getLocalizedDescription()}
|
||||
{assign var="description" value=$context->getLocalizedDescription()}
|
||||
{elseif $context->getLocalizedData('searchDescription')}
|
||||
{assign var="description" value=$context->getLocalizedData('searchDescription')}
|
||||
{/if}
|
||||
|
||||
<description>{$description|strip|escape:"html"}</description>
|
||||
|
||||
{* optional elements *}
|
||||
{assign var="publisherInstitution" value=$context->getData('publisherInstitution')}
|
||||
{if $publisherInstitution}
|
||||
<dc:publisher>{$publisherInstitution|strip|escape:"html"}</dc:publisher>
|
||||
{/if}
|
||||
|
||||
{if $context->getPrimaryLocale()}
|
||||
<dc:language>{$context->getPrimaryLocale()|replace:'_':'-'|strip|escape:"html"}</dc:language>
|
||||
{/if}
|
||||
|
||||
<prism:publicationName>{$context->getLocalizedName()|strip|escape:"html"}</prism:publicationName>
|
||||
|
||||
{if $context->getData('printIssn')}
|
||||
{assign var="ISSN" value=$context->getData('printIssn')}
|
||||
{elseif $context->getData('onlineIssn')}
|
||||
{assign var="ISSN" value=$context->getData('onlineIssn')}
|
||||
{/if}
|
||||
|
||||
{if $ISSN}
|
||||
<prism:issn>{$ISSN|escape}</prism:issn>
|
||||
{/if}
|
||||
|
||||
{if $context->getLocalizedData('licenseTerms')}
|
||||
<prism:copyright>{$context->getLocalizedData('licenseTerms')|strip|escape:"html"}</prism:copyright>
|
||||
{/if}
|
||||
|
||||
<items>
|
||||
<rdf:Seq>
|
||||
{foreach from=$submissions item=item}
|
||||
<rdf:li rdf:resource="{url page=$publicationPage op=$publicationOp path=$item.submission->getBestId()}"/>
|
||||
{/foreach}{* articles *}
|
||||
</rdf:Seq>
|
||||
</items>
|
||||
</channel>
|
||||
|
||||
{foreach from=$submissions item=item}
|
||||
{assign var=submission value=$item.submission}
|
||||
{assign var=publication value=$submission->getCurrentPublication()}
|
||||
<item rdf:about="{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}">
|
||||
|
||||
{* required elements *}
|
||||
<title>{$publication->getLocalizedTitle()|strip|escape:"html"}</title>
|
||||
<link>{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}</link>
|
||||
|
||||
{* optional elements *}
|
||||
{if $publication->getLocalizedData('abstract') || $includeIdentifiers}
|
||||
<description>
|
||||
{if $includeIdentifiers}
|
||||
{foreach from=$item.identifiers item=identifier}
|
||||
{$identifier.label|strip|escape:"html"}: {', '|implode:$identifier.values|strip|escape:"html"}<br />
|
||||
{/foreach}{* categories *}
|
||||
<br />
|
||||
{/if}
|
||||
{$publication->getLocalizedData('abstract')|strip|escape:"html"}
|
||||
</description>
|
||||
{/if}
|
||||
|
||||
{foreach from=$item.identifiers item=identifier}
|
||||
{foreach from=$identifier.values item=value}
|
||||
<dc:subject>
|
||||
<rdf:Description>
|
||||
<taxo:topic rdf:resource="https://pkp.sfu.ca/{$applicationIdentifier}/category/{$identifier.type|strip|escape:"html"}" />
|
||||
<rdf:value>{$value|strip|escape:"html"}</rdf:value>
|
||||
</rdf:Description>
|
||||
</dc:subject>
|
||||
{/foreach}
|
||||
{/foreach}{* categories *}
|
||||
|
||||
{foreach from=$publication->getData('authors') item=author name=authorList}
|
||||
<dc:creator>{$author->getFullName(false)|strip|escape:"html"}</dc:creator>
|
||||
{/foreach}
|
||||
|
||||
<dc:rights>
|
||||
{translate|escape key="submission.copyrightStatement" copyrightYear=$publication->getData('copyrightYear') copyrightHolder=$publication->getLocalizedData('copyrightHolder')}
|
||||
{$publication->getData('licenseUrl')|escape}
|
||||
</dc:rights>
|
||||
<cc:license {if ($openAccess === null || $openAccess === $publication->getData('accessStatus')) && $publication->isCCLicense()}rdf:resource="{$publication->getData('licenseUrl')|escape}"{/if} />
|
||||
|
||||
<dc:date>{$publication->getData('datePublished')|date_format:"Y-m-d"}</dc:date>
|
||||
<prism:publicationDate>{$publication->getData('datePublished')|date_format:"Y-m-d"}</prism:publicationDate>
|
||||
|
||||
{if $publication->getStartingPage()}
|
||||
<prism:startingPage>{$publication->getStartingPage()|escape}</prism:startingPage>
|
||||
{/if}
|
||||
{if $publication->getEndingPage()}
|
||||
<prism:endingPage>{$publication->getEndingPage()|escape}</prism:endingPage>
|
||||
{/if}
|
||||
|
||||
{if $publication->getDoi()}
|
||||
<prism:doi>{$publication->getDoi()|escape}</prism:doi>
|
||||
{/if}
|
||||
</item>
|
||||
{/foreach}{* articles *}
|
||||
|
||||
</rdf:RDF>
|
||||
@@ -0,0 +1,97 @@
|
||||
{**
|
||||
* templates/rss2.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2023 Simon Fraser University
|
||||
* Copyright (c) 2003-2023 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* RSS 2 feed template
|
||||
*
|
||||
*}
|
||||
<?xml version="1.0" encoding="{$defaultCharset|escape}"?>
|
||||
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<atom:link href="{$feedUrl}" rel="self" type="application/rss+xml" />
|
||||
{* required elements *}
|
||||
<title>{$context->getLocalizedName()|strip|escape:"html"}</title>
|
||||
<link>{url context=$context->getPath()}</link>
|
||||
|
||||
{if $context->getLocalizedDescription()}
|
||||
{assign var="description" value=$context->getLocalizedDescription()}
|
||||
{elseif $context->getLocalizedData('searchDescription')}
|
||||
{assign var="description" value=$context->getLocalizedData('searchDescription')}
|
||||
{/if}
|
||||
|
||||
<description>{$description|strip|escape:"html"}</description>
|
||||
|
||||
{* optional elements *}
|
||||
{if $context->getPrimaryLocale()}
|
||||
<language>{$context->getPrimaryLocale()|replace:'_':'-'|strip|escape:"html"}</language>
|
||||
{/if}
|
||||
|
||||
{if $context->getLocalizedData('licenseTerms')}
|
||||
<copyright>{$context->getLocalizedData('licenseTerms')|strip|escape:"html"}</copyright>
|
||||
{/if}
|
||||
|
||||
{if $context->getData('contactEmail')}
|
||||
<managingEditor>{$context->getData('contactEmail')|strip|escape:"html"}{if $context->getData('contactName')} ({$context->getData('contactName')|strip|escape:"html"}){/if}</managingEditor>
|
||||
{/if}
|
||||
|
||||
{if $context->getData('supportEmail')}
|
||||
<webMaster>{$context->getData('supportEmail')|strip|escape:"html"}{if $context->getData('contactName')} ({$context->getData('supportName')|strip|escape:"html"}){/if}</webMaster>
|
||||
{/if}
|
||||
|
||||
<pubDate>{$latestDate|date_format:$smarty.const.DATE_RSS}</pubDate>
|
||||
|
||||
{* <lastBuildDate/> *}
|
||||
{* <category/> *}
|
||||
{* <creativeCommons:license/> *}
|
||||
|
||||
<generator>{$applicationName} {$applicationVersion|escape}</generator>
|
||||
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
||||
<ttl>60</ttl>
|
||||
|
||||
{foreach from=$submissions item=item}
|
||||
{assign var=submission value=$item.submission}
|
||||
{assign var=publication value=$submission->getCurrentPublication()}
|
||||
<item>
|
||||
{* required elements *}
|
||||
<title>{$publication->getLocalizedTitle()|strip|escape:"html"}</title>
|
||||
<link>{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}</link>
|
||||
{if $publication->getLocalizedData('abstract') || $includeIdentifiers}
|
||||
<description>
|
||||
{if $includeIdentifiers}
|
||||
{foreach from=$item.identifiers item=identifier}
|
||||
{$identifier.label|strip|escape:"html"}: {', '|implode:$identifier.values|strip|escape:"html"}<br />
|
||||
{/foreach}{* categories *}
|
||||
<br />
|
||||
{/if}
|
||||
{$publication->getLocalizedData('abstract')|strip|escape:"html"}
|
||||
</description>
|
||||
{/if}
|
||||
|
||||
{* optional elements *}
|
||||
{* <author/> *}
|
||||
{if !empty($publication->getAuthorString($userGroups))}
|
||||
<dc:creator>{$publication->getAuthorString($userGroups)|escape:"html"}</dc:creator>
|
||||
{/if}
|
||||
|
||||
{foreach from=$item.identifiers item=identifier}
|
||||
{foreach from=$identifier.values item=value}
|
||||
<category domain="https://pkp.sfu.ca/{$applicationIdentifier}/category/{$identifier.type|strip|escape:"html"}">{$value|strip|escape:"html"}</category>
|
||||
{/foreach}
|
||||
{/foreach}{* categories *}
|
||||
{* <comments/> *}
|
||||
{* <source/> *}
|
||||
|
||||
<dc:rights>
|
||||
{translate|escape key="submission.copyrightStatement" copyrightYear=$publication->getData('copyrightYear') copyrightHolder=$publication->getLocalizedData('copyrightHolder')}
|
||||
{$publication->getData('licenseUrl')|escape}
|
||||
</dc:rights>
|
||||
<cc:license {if ($openAccess === null || $openAccess === $publication->getData('accessStatus')) && $publication->isCCLicense()}rdf:resource="{$publication->getData('licenseUrl')|escape}"{/if} />
|
||||
<guid isPermaLink="true">{url page=$publicationPage op=$publicationOp path=$submission->getBestId()}</guid>
|
||||
<pubDate>{$publication->getData('datePublished')|date_format:$smarty.const.DATE_RSS}</pubDate>
|
||||
</item>
|
||||
{/foreach}{* articles *}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -0,0 +1,55 @@
|
||||
{**
|
||||
* templates/settingsForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2023 Simon Fraser University
|
||||
* Copyright (c) 2003-2023 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Web feeds plugin settings
|
||||
*
|
||||
*}
|
||||
<script>
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#webFeedSettingsForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="webFeedSettingsForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT op="manage" category="generic" plugin=$pluginName verb="settings" save=true}">
|
||||
{csrf}
|
||||
{include file="controllers/notification/inPlaceNotification.tpl" notificationId="webFeedSettingsFormNotification"}
|
||||
|
||||
<div id="description">{translate key="plugins.generic.webfeed.description"}</div>
|
||||
|
||||
<h3>{translate key="plugins.generic.webfeed.settings"}</h3>
|
||||
|
||||
{fbvFormArea id="webFeedSettingsFormArea"}
|
||||
{fbvFormSection list=true}
|
||||
{fbvElement type="radio" id="displayPage-all" name="displayPage" value="all" checked=$displayPage|compare:"all" label="plugins.generic.webfeed.settings.all"}
|
||||
{if $hasIssues}
|
||||
{fbvElement type="radio" id="displayPage-homepage" name="displayPage" value="homepage" checked=$displayPage|compare:"homepage" label="plugins.generic.webfeed.settings.homepageAndIssues"}
|
||||
{else}
|
||||
{fbvElement type="radio" id="displayPage-homepage" name="displayPage" value="homepage" checked=$displayPage|compare:"homepage" label="plugins.generic.webfeed.settings.homepage"}
|
||||
{/if}
|
||||
{if $hasIssues}
|
||||
{fbvElement type="radio" id="displayPage-issue" name="displayPage" value="issue" checked=$displayPage|compare:"issue" label="plugins.generic.webfeed.settings.issue"}
|
||||
{/if}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection list=true}
|
||||
{if $hasIssues}
|
||||
{fbvElement type="radio" id="displayItems-issue" name="displayItems" value="issue" checked=$displayItems|compare:"issue" label="plugins.generic.webfeed.settings.currentIssue"}
|
||||
{fbvElement type="radio" id="displayItems-recent" name="displayItems" value="recent" checked=$displayItems|compare:"recent" label="plugins.generic.webfeed.settings.recent"}
|
||||
{/if}
|
||||
{fbvElement type="text" id="recentItems" value=$recentItems label="plugins.generic.webfeed.settings.recentArticles" size=$fbvStyles.size.SMALL}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection list=true}
|
||||
{fbvElement type="checkbox" id="includeIdentifiers" name="includeIdentifiers" value="1" checked=$includeIdentifiers label="plugins.generic.webfeed.settings.includeIdentifiers"}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormButtons}
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
</form>
|
||||
Reference in New Issue
Block a user