first commit
This commit is contained in:
@@ -0,0 +1,58 @@
|
||||
{**
|
||||
* plugins/generic/announcementFeed/templates/atom.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 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>{$selfUrl|escape}</id>
|
||||
<title>{$journal->getLocalizedName()|escape:"html"|strip}: {translate key="announcement.announcements"}</title>
|
||||
<updated>{$dateUpdated|date_format:"%Y-%m-%dT%T%z"|regex_replace:"/00$/":":00"}</updated>
|
||||
|
||||
{* recommended elements *}
|
||||
{* <author/> *}
|
||||
<link rel="alternate" href="{url journal=$journal->getPath()}" />
|
||||
<link rel="self" type="application/atom+xml" href="{$selfUrl|escape}" />
|
||||
|
||||
{* optional elements *}
|
||||
{* <category/> *}
|
||||
{* <contributor/> *}
|
||||
<generator uri="https://pkp.sfu.ca/ojs/" version="{$ojsVersion|escape}">Open Journal Systems</generator>
|
||||
{if $journal->getLocalizedDescription()}
|
||||
{assign var="description" value=$journal->getLocalizedDescription()}
|
||||
{elseif $journal->getLocalizedData('searchDescription')}
|
||||
{assign var="description" value=$journal->getLocalizedData('searchDescription')}
|
||||
{/if}
|
||||
{if $description}
|
||||
<subtitle>{$description|strip|escape:"html"}</subtitle>
|
||||
{/if}
|
||||
|
||||
{foreach from=$announcements item=announcement}
|
||||
<entry>
|
||||
{* required elements *}
|
||||
<id>{url page="announcement" op="view" path=$announcement->getId()}</id>
|
||||
<title>{$announcement->getLocalizedTitleFull()|strip|escape:"html"}</title>
|
||||
<updated>{$announcement->getDatetimePosted()|date_format:"%Y-%m-%dT%T%z"|regex_replace:"/00$/":":00"}</updated>
|
||||
<author>
|
||||
<name>{$journal->getLocalizedName()|strip|escape:"html"}</name>
|
||||
</author>
|
||||
<link rel="alternate" href="{url page="announcement" op="view" path=$announcement->getId()}" />
|
||||
{if $announcement->getLocalizedDescription()}
|
||||
<summary type="html" xml:base="{url page="announcement" op="view" path=$announcement->getId()}">{$announcement->getLocalizedDescription()|strip|escape:"html"}</summary>
|
||||
{/if}
|
||||
|
||||
{* optional elements *}
|
||||
{* <category/> *}
|
||||
{* <contributor/> *}
|
||||
<published>{$announcement->getDatetimePosted()|date_format:"%Y-%m-%dT%T%z"|regex_replace:"/00$/":":00"}</published>
|
||||
{* <source/> *}
|
||||
{* <rights/> *}
|
||||
</entry>
|
||||
{/foreach}
|
||||
</feed>
|
||||
@@ -0,0 +1,32 @@
|
||||
{**
|
||||
* plugins/generic/announcementFeed/templates/block.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Announcement feed plugin navigation sidebar.
|
||||
*
|
||||
*}
|
||||
<div class="pkp_block block_announcement_feed">
|
||||
<h2 class="title">{translate key="announcement.announcements"}</h2>
|
||||
<div class="content">
|
||||
<ul>
|
||||
<li>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="gateway" op="plugin" path="AnnouncementFeedGatewayPlugin"|to_array:"atom"}">
|
||||
<img src="{$baseUrl}/lib/pkp/templates/images/atom.svg" alt="{translate key="plugins.generic.announcementfeed.atom.altText"}">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="gateway" op="plugin" path="AnnouncementFeedGatewayPlugin"|to_array:"rss2"}">
|
||||
<img src="{$baseUrl}/lib/pkp/templates/images/rss20_logo.svg" alt="{translate key="plugins.generic.announcementfeed.rss2.altText"}">
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="{url router=\PKP\core\PKPApplication::ROUTE_PAGE page="gateway" op="plugin" path="AnnouncementFeedGatewayPlugin"|to_array:"rss"}">
|
||||
<img src="{$baseUrl}/lib/pkp/templates/images/rss10_logo.svg" alt="{translate key="plugins.generic.announcementfeed.rss1.altText"}">
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
@@ -0,0 +1,58 @@
|
||||
{**
|
||||
* plugins/generic/announcementFeed/templates/rss.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 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/">
|
||||
|
||||
<channel rdf:about="{url journal=$journal->getPath()}">
|
||||
{* required elements *}
|
||||
<title>{$journal->getLocalizedName()|strip|escape:"html"}: {translate key="announcement.announcements"}</title>
|
||||
<link>{url journal=$journal->getPath()}</link>
|
||||
{if $journal->getLocalizedDescription()}
|
||||
{assign var="description" value=$journal->getLocalizedDescription()}
|
||||
{elseif $journal->getLocalizedData('searchDescription')}
|
||||
{assign var="description" value=$journal->getLocalizedData('searchDescription')}
|
||||
{/if}
|
||||
<description>{$description|strip|escape:"html"}</description>
|
||||
|
||||
{* optional elements *}
|
||||
{if $journal->getPrimaryLocale()}
|
||||
<dc:language>{$journal->getPrimaryLocale()|replace:'_':'-'|strip|escape:"html"}</dc:language>
|
||||
{/if}
|
||||
|
||||
<items>
|
||||
{foreach from=$announcements item=announcement}
|
||||
<rdf:Seq>
|
||||
<rdf:li rdf:resource="{url page="announcement" op="view" path=$announcement->getId()}"/>
|
||||
</rdf:Seq>
|
||||
{/foreach}
|
||||
</items>
|
||||
</channel>
|
||||
|
||||
{foreach from=$announcements item=announcement}
|
||||
<item rdf:about="{url page="announcement" op="view" path=$announcement->getId()}">
|
||||
{* required elements *}
|
||||
<title>{$announcement->getLocalizedTitleFull()|strip|escape:"html"}</title>
|
||||
<link>{url page="announcement" op="view" path=$announcement->getId()}</link>
|
||||
|
||||
{* optional elements *}
|
||||
{if $announcement->getLocalizedDescription()}
|
||||
<description>{$announcement->getLocalizedDescription()|strip|escape:"html"}</description>
|
||||
{/if}
|
||||
<dc:creator>{$journal->getLocalizedName()|strip|escape:"html"}</dc:creator>
|
||||
<dc:date>{$announcement->getDatePosted()|date_format:"%Y-%m-%d"}</dc:date>
|
||||
</item>
|
||||
{/foreach}
|
||||
|
||||
</rdf:RDF>
|
||||
@@ -0,0 +1,48 @@
|
||||
{**
|
||||
* plugins/generic/announcementFeed/templates/rss2.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 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">
|
||||
<channel>
|
||||
{* required elements *}
|
||||
<title>{$journal->getLocalizedName()|strip|escape:"html"}: {translate key="announcement.announcements"}</title>
|
||||
<link>{url journal=$journal->getPath()}</link>
|
||||
{if $journal->getLocalizedDescription()}
|
||||
{assign var="description" value=$journal->getLocalizedDescription()}
|
||||
{elseif $journal->getLocalizedData('searchDescription')}
|
||||
{assign var="description" value=$journal->getLocalizedData('searchDescription')}
|
||||
{/if}
|
||||
<description>{$description|strip|escape:"html"}</description>
|
||||
|
||||
{* optional elements *}
|
||||
{if $journal->getPrimaryLocale()}
|
||||
<language>{$journal->getPrimaryLocale()|replace:'_':'-'|strip|escape:"html"}</language>
|
||||
{/if}
|
||||
{capture assign="dateUpdated"}{$dateUpdated|strtotime}{/capture}
|
||||
<pubDate>{$smarty.const.DATE_RSS|date:$dateUpdated}</pubDate>
|
||||
<generator>OJS {$ojsVersion|escape}</generator>
|
||||
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
|
||||
<ttl>60</ttl>
|
||||
|
||||
{foreach from=$announcements item=announcement}
|
||||
<item>
|
||||
{* required elements *}
|
||||
<title>{$announcement->getLocalizedTitleFull()|strip|escape:"html"}</title>
|
||||
<link>{url page="announcement" op="view" path=$announcement->getId()}</link>
|
||||
<description>{$announcement->getLocalizedDescription()|strip|escape:"html"}</description>
|
||||
|
||||
{* optional elements *}
|
||||
<guid isPermaLink="true">{url page="announcement" op="view" path=$announcement->getId()}</guid>
|
||||
{capture assign="datePosted"}{$announcement->getDatetimePosted()|strtotime}{/capture}
|
||||
<pubDate>{$smarty.const.DATE_RSS|date:$datePosted}</pubDate>
|
||||
</item>
|
||||
{/foreach}
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -0,0 +1,46 @@
|
||||
{**
|
||||
* plugins/generic/announcementFeed/settingsForm.tpl
|
||||
*
|
||||
* Copyright (c) 2014-2021 Simon Fraser University
|
||||
* Copyright (c) 2003-2021 John Willinsky
|
||||
* Distributed under the GNU GPL v3. For full terms see the file docs/COPYING.
|
||||
*
|
||||
* Announcement Feed plugin settings
|
||||
*
|
||||
*}
|
||||
<script>
|
||||
$(function() {ldelim}
|
||||
// Attach the form handler.
|
||||
$('#announcementFeedSettingsForm').pkpHandler('$.pkp.controllers.form.AjaxFormHandler');
|
||||
{rdelim});
|
||||
</script>
|
||||
|
||||
<form class="pkp_form" id="announcementFeedSettingsForm" method="post" action="{url router=\PKP\core\PKPApplication::ROUTE_COMPONENT op="manage" category="generic" plugin=$pluginName verb="settings" save=true}">
|
||||
<div id="announcementFeedSettings">
|
||||
<div id="description">{translate key="plugins.generic.announcementfeed.description"}</div>
|
||||
|
||||
<div class="separator"> </div>
|
||||
|
||||
<h3>{translate key="plugins.generic.announcementfeed.settings"}</h3>
|
||||
|
||||
{csrf}
|
||||
{include file="common/formErrors.tpl"}
|
||||
|
||||
{fbvFormArea id="webFeedSettingsFormArea"}
|
||||
{fbvFormSection list=true}
|
||||
{fbvElement type="radio" id="displayPage-all" name="displayPage" value="all" checked=$displayPage|compare:"all" label="plugins.generic.announcementfeed.settings.all"}
|
||||
{fbvElement type="radio" id="displayPage-homepage" name="displayPage" value="homepage" checked=$displayPage|compare:"homepage" label="plugins.generic.announcementfeed.settings.homepage"}
|
||||
{fbvElement type="radio" id="displayPage-announcement" name="displayPage" value="announcement" checked=$displayPage|compare:"announcement" label="plugins.generic.announcementfeed.settings.announcement"}
|
||||
{/fbvFormSection}
|
||||
|
||||
{fbvFormSection list=true}
|
||||
{translate key="plugins.generic.announcementfeed.settings.recentAnnouncements1"}
|
||||
{fbvElement type="text" id="recentItems" value=$recentItems label="plugins.generic.announcementfeed.settings.recentAnnouncements2" size=$fbvStyles.size.SMALL}
|
||||
{/fbvFormSection}
|
||||
{/fbvFormArea}
|
||||
|
||||
{fbvFormButtons}
|
||||
|
||||
<p><span class="formRequired">{translate key="common.requiredField"}</span></p>
|
||||
</div>
|
||||
</form>
|
||||
Reference in New Issue
Block a user