Moving assets and resources to the public folder
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:be.container>
|
||||
<n:includeFile path="../typo3conf/ext/news/Resources/Public/Css/administration.css" />
|
||||
<div class="typo3-fullDoc">
|
||||
<div id="typo3-docheader">
|
||||
<div class="typo3-docheader-functions">
|
||||
<div class="left">
|
||||
<f:be.buttons.csh />
|
||||
<f:be.menus.actionMenu>
|
||||
<f:be.menus.actionMenuItem label="{f:translate(key: 'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.newsListing')}" controller="Administration" action="index" />
|
||||
<f:be.menus.actionMenuItem label="{f:translate(key: 'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.newsPidListing')}" controller="Administration" action="newsPidListing" />
|
||||
</f:be.menus.actionMenu>
|
||||
</div>
|
||||
|
||||
<div class="right">
|
||||
<f:be.pagePath />
|
||||
<f:be.pageInfo />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="typo3-docheader-buttons">
|
||||
<div class="left">
|
||||
<f:link.action action="newNews" title="{f:translate(key:'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.createNewNewsRecord')}">
|
||||
<f:image src="{f:uri.resource(path:'Icons/news_domain_model_news_add.png')}" />
|
||||
</f:link.action>
|
||||
<n:be.security.ifAccessToTableIsAllowed table="sys_category">
|
||||
<f:link.action action="newCategory" title="{f:translate(key:'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.createNewCategory')}">
|
||||
<f:image src="{f:uri.resource(path:'Icons/news_domain_model_category_add.png')}" />
|
||||
</f:link.action>
|
||||
</n:be.security.ifAccessToTableIsAllowed>
|
||||
<n:be.security.ifAccessToTableIsAllowed table="tx_news_domain_model_tag">
|
||||
<f:link.action action="newTag" title="{f:translate(key:'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.createNewTag')}">
|
||||
<f:image src="{f:uri.resource(path:'Icons/news_domain_model_tag_add.png')}" />
|
||||
</f:link.action>
|
||||
</n:be.security.ifAccessToTableIsAllowed>
|
||||
</div>
|
||||
<div class="right">
|
||||
<f:be.buttons.shortcut />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="typo3-docbody">
|
||||
<div id="typo3-inner-docbody" class="news-administration">
|
||||
<f:render section="content" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:be.container>
|
||||
@@ -0,0 +1,29 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:be.container>
|
||||
<n:includeFile path="../typo3conf/ext/news/Resources/Public/Css/administration.css" />
|
||||
<div class="typo3-fullDoc">
|
||||
<div id="typo3-docheader">
|
||||
<div class="typo3-docheader-functions">
|
||||
<div class="left"></div>
|
||||
|
||||
<div class="right">
|
||||
<f:be.pagePath />
|
||||
<f:be.pageInfo />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="typo3-docheader-buttons">
|
||||
<div class="left"></div>
|
||||
<div class="right">
|
||||
<f:be.buttons.shortcut />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="typo3-docbody">
|
||||
<div id="typo3-inner-docbody" class="news-administration">
|
||||
<f:render section="content" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</f:be.container>
|
||||
7
public/fileadmin/templates/ext/news/Layouts/Detail.html
Normal file
7
public/fileadmin/templates/ext/news/Layouts/Detail.html
Normal file
@@ -0,0 +1,7 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:if condition="{settings.cssFile}">
|
||||
<n:includeFile path="{settings.cssFile}" />
|
||||
</f:if>
|
||||
|
||||
<f:render section="content" />
|
||||
8
public/fileadmin/templates/ext/news/Layouts/General.html
Normal file
8
public/fileadmin/templates/ext/news/Layouts/General.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:if condition="{settings.cssFile}">
|
||||
<n:includeFile path="{settings.cssFile}" />
|
||||
</f:if>
|
||||
|
||||
<f:flashMessages class="tx-news-flash-message" />
|
||||
<f:render section="content" />
|
||||
@@ -0,0 +1,50 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<tr class="db_list_normal">
|
||||
<td class="col-title">
|
||||
<n:be.clickmenu table="tx_news_domain_model_news" uid="{newsItem.uid}">
|
||||
<n:be.buttons.iconForRecord table="tx_news_domain_model_news" uid="{newsItem.uid}" title="{newsItem.title}" />
|
||||
</n:be.clickmenu>
|
||||
<a href="" title="UID: {newsItem.uid}" onclick="window.location.href='alt_doc.php?returnUrl='+T3_THIS_LOCATION+'&edit[tx_news_domain_model_news][{newsItem.uid}]=edit'; return false;">
|
||||
{newsItem.title}
|
||||
</a>
|
||||
</td>
|
||||
<td>
|
||||
<f:if condition="{newsItem.isTopNews}">
|
||||
<f:then>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.topNewsYes" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.topNewsNo" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</td>
|
||||
<td>
|
||||
<f:format.date format="{dateformat}">{newsItem.dateTime}</f:format.date>
|
||||
</td>
|
||||
<td>
|
||||
<f:format.date format="{dateformat}">{newsItem.archive}</f:format.date>
|
||||
</td>
|
||||
<td>
|
||||
<f:format.date format="{dateformat}">{newsItem.tstamp}</f:format.date>
|
||||
</td>
|
||||
<td>
|
||||
<f:if condition="{newsItem.author}">
|
||||
<strong>
|
||||
<f:translate key="LLL:EXT:cms/locallang_tca.xlf:pages.author_formlabel" />
|
||||
:</strong> {newsItem.author}<br />
|
||||
</f:if>
|
||||
<f:if condition="{newsItem.categories}">
|
||||
<strong>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.categories" />
|
||||
:</strong>
|
||||
<f:for each="{newsItem.categories}" as="category" iteration="iterator">
|
||||
<span title="UID: {category.uid}">{category.title}</span>
|
||||
<f:if condition="{iterator.isLast}">
|
||||
<f:then></f:then>
|
||||
<f:else>,</f:else>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</f:if>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -0,0 +1,15 @@
|
||||
<!-- categories -->
|
||||
<span class="news-list-category">
|
||||
<f:for each="{categories}" as="category">
|
||||
<f:if condition="{category.shortcut}">
|
||||
<f:then>
|
||||
<f:link.page pageUid="{category.shortcut}">
|
||||
{category.title}
|
||||
</f:link.page>
|
||||
</f:then>
|
||||
<f:else>
|
||||
{category.title}
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</span>
|
||||
@@ -0,0 +1,17 @@
|
||||
<f:if condition="{media}">
|
||||
<!-- fal media files -->
|
||||
<div class="news-img-wrap">
|
||||
<f:for each="{media}" as="mediaElement">
|
||||
<div class="outer">
|
||||
<f:if condition="{mediaElement.originalResource.type} == 2">
|
||||
<f:render partial="Detail/FalMediaImage" arguments="{mediaElement: mediaElement, settings:settings}"/>
|
||||
</f:if>
|
||||
<f:if condition="{mediaElement.originalResource.type} == 4">
|
||||
<f:render partial="Detail/FalMediaVideo" arguments="{mediaElement: mediaElement, settings:settings}"/>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="mediaelement mediaelement-image">
|
||||
<f:if condition="{settings.detail.media.image.lightbox}">
|
||||
<f:then>
|
||||
<a rel="{settings.detail.media.image.lightbox}" title="{mediaElement.title}" href="{f:uri.image(src:'{mediaElement.uid}' treatIdAsReference:1 maxWidth:'800')}">
|
||||
<f:image src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.title}" alt="{mediaElement.alternative}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
|
||||
</a>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:image src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.title}" alt="{mediaElement.alternative}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
<f:if condition="{mediaElement.description}">
|
||||
<p class="news-img-caption">
|
||||
{mediaElement.description}
|
||||
</p>
|
||||
</f:if>
|
||||
@@ -0,0 +1,17 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<div class="mediaelement">
|
||||
<div class="mediaelement-video">
|
||||
<n:falMediaFactory classes="{settings.interfaces.falMedia.video}" element="{mediaElement}" width="{settings.detail.media.video.width}"
|
||||
height="{settings.detail.media.video.height}" />
|
||||
</div>
|
||||
|
||||
|
||||
<f:if condition="{mediaElement.description}">
|
||||
<div class="medialement-alternative-content">
|
||||
<p class="news-img-caption">
|
||||
{mediaElement.description}
|
||||
</p>
|
||||
</div>
|
||||
</f:if>
|
||||
</div>
|
||||
@@ -0,0 +1,17 @@
|
||||
<f:if condition="{media}">
|
||||
<!-- media files -->
|
||||
<div class="news-img-wrap">
|
||||
<f:for each="{media}" as="mediaElement">
|
||||
<div class="outer">
|
||||
<f:if condition="{mediaElement.type} == 0">
|
||||
<f:render partial="Detail/MediaImage" arguments="{mediaElement: mediaElement, settings:settings}" />
|
||||
</f:if>
|
||||
<f:if condition="{mediaElement.type} == 1">
|
||||
<f:render partial="Detail/MediaVideo" arguments="{mediaElement: mediaElement, settings:settings}" />
|
||||
</f:if>
|
||||
</div>
|
||||
</f:for>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
|
||||
@@ -0,0 +1,17 @@
|
||||
<div class="mediaelement mediaelement-image">
|
||||
<f:if condition="{settings.detail.media.image.lightbox}">
|
||||
<f:then>
|
||||
<a rel="{settings.detail.media.image.lightbox}" title="{mediaElement.caption}" href="{f:uri.image(src:'uploads/tx_news/{mediaElement.content}' maxWidth:'800')}">
|
||||
<f:image src="uploads/tx_news/{mediaElement.content}" title="{mediaElement.title}" alt="{mediaElement.alt}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
|
||||
</a>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:image src="uploads/tx_news/{mediaElement.content}" title="{mediaElement.title}" alt="{mediaElement.alt}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</div>
|
||||
<f:if condition="{mediaElement.caption}">
|
||||
<p class="news-img-caption">
|
||||
{mediaElement.caption}
|
||||
</p>
|
||||
</f:if>
|
||||
@@ -0,0 +1,17 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<div class="mediaelement">
|
||||
<div class="mediaelement-video">
|
||||
<n:mediaFactory classes="{settings.interfaces.media.video}" element="{mediaElement}" width="{settings.detail.media.video.width}"
|
||||
height="{settings.detail.media.video.height}" />
|
||||
</div>
|
||||
|
||||
|
||||
<f:if condition="{mediaElement.caption}">
|
||||
<div class="medialement-alternative-content">
|
||||
<p class="news-img-caption">
|
||||
{mediaElement.caption}
|
||||
</p>
|
||||
</div>
|
||||
</f:if>
|
||||
</div>
|
||||
@@ -0,0 +1,49 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:if condition="{newsItem.alternativeTitle}">
|
||||
<f:then><n:metaTag property="og:title" content="{newsItem.alternativeTitle}" /></f:then>
|
||||
<f:else><n:metaTag property="og:title" content="{newsItem.title}" /></f:else>
|
||||
</f:if>
|
||||
<n:metaTag property="og:type" content="{settings.opengraph.type}" />
|
||||
<n:metaTag property="og:url" content="" useCurrentDomain="1" />
|
||||
<n:metaTag property="og:site_name" content="{settings.opengraph.site_name}" />
|
||||
<f:if condition="{newsItem.firstFalImagePreview}">
|
||||
<f:then>
|
||||
<n:metaTag
|
||||
property="og:image"
|
||||
content="{f:uri.image(src:'{newsItem.firstFalImagePreview.uid}' treatIdAsReference:1 maxWidth:'500')}"
|
||||
forceAbsoluteUrl="1" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{newsItem.firstImagePreview.image}">
|
||||
<n:metaTag
|
||||
property="og:image"
|
||||
content="{f:uri.image(src:'uploads/tx_news/{newsItem.firstImagePreview.image}' maxWidth:'500')}"
|
||||
forceAbsoluteUrl="1" />
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.description}">
|
||||
<f:then>
|
||||
<n:metaTag name="description" content="{newsItem.description}" />
|
||||
<n:metaTag property="og:description" content="{newsItem.description}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<n:metaTag name="description" content="{newsItem.teaser}" />
|
||||
<n:metaTag property="og:description" content="{newsItem.teaser}" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
<n:metaTag name="keywords" content="{newsItem.keywords}" />
|
||||
<n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />
|
||||
<n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />
|
||||
<n:metaTag property="og:email" content="{settings.opengraph.email}" />
|
||||
<n:metaTag property="og:phone_number" content="{settings.opengraph.phone_number}" />
|
||||
<n:metaTag property="og:fax_number" content="{settings.opengraph.fax_number}" />
|
||||
<n:metaTag property="og:latitude" content="{settings.opengraph.latitude}" />
|
||||
<n:metaTag property="og:longitude" content="{settings.opengraph.longitude}" />
|
||||
<n:metaTag property="og:street-address" content="{settings.opengraph.street-address}" />
|
||||
<n:metaTag property="og:locality" content="{settings.opengraph.locality}" />
|
||||
<n:metaTag property="og:region" content="{settings.opengraph.region}" />
|
||||
<n:metaTag property="og:postal-code" content="{settings.opengraph.postal-code}" />
|
||||
<n:metaTag property="og:country-name" content="{settings.opengraph.country-name}" />
|
||||
142
public/fileadmin/templates/ext/news/Partials/List/Item.html
Normal file
142
public/fileadmin/templates/ext/news/Partials/List/Item.html
Normal file
@@ -0,0 +1,142 @@
|
||||
{namespace n=Tx_News_ViewHelpers}<!--
|
||||
=====================
|
||||
Partials/List/Item.html
|
||||
-->
|
||||
<li class="article articletype-{newsItem.type}{f:if(condition: newsItem.istopnews, then: ' topnews')}">
|
||||
<n:excludeDisplayedNews newsItem="{newsItem}"/>
|
||||
|
||||
<!-- date -->
|
||||
<span class="date">
|
||||
<n:format.date format="%d %B %Y">{newsItem.datetime}</n:format.date>
|
||||
</span>
|
||||
|
||||
<!-- header -->
|
||||
<n:link newsItem="{newsItem}" settings="{settings}">
|
||||
<h6>
|
||||
{newsItem.title}
|
||||
</h6>
|
||||
</n:link>
|
||||
|
||||
<f:if condition="{newsItem.falMedia}">
|
||||
<!-- fal media preview element -->
|
||||
<f:then>
|
||||
<div class="news-img-wrap">
|
||||
<f:if condition="{newsItem.falMediaPreviews}">
|
||||
<f:then>
|
||||
<n:link newsItem="{newsItem}" settings="{settings}">
|
||||
<f:alias map="{mediaElement: newsItem.falMediaPreviews.0}">
|
||||
<f:if condition="{mediaElement.originalResource.type} == 2">
|
||||
<f:image src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.originalResource.title}" alt="{mediaElement.originalResource.alternative}" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
|
||||
</f:if>
|
||||
<f:if condition="{mediaElement.originalResource.type} == 4">
|
||||
<f:render partial="Detail/FalMediaVideo" arguments="{mediaElement: mediaElement}"/>
|
||||
</f:if>
|
||||
</f:alias>
|
||||
</n:link>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{settings.displayDummyIfNoMedia}">
|
||||
<span class="no-media-element">
|
||||
<n:link newsItem="{newsItem}" settings="{settings}">
|
||||
<f:image src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
|
||||
</n:link>
|
||||
</span>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
||||
<f:if condition="{newsItem.media}">
|
||||
<!-- media preview element -->
|
||||
<f:then>
|
||||
<div class="news-img-wrap">
|
||||
<f:if condition="{newsItem.mediaPreviews}">
|
||||
<f:then>
|
||||
<n:link newsItem="{newsItem}" settings="{settings}">
|
||||
<f:alias map="{mediaElement: newsItem.mediaPreviews.0}">
|
||||
<f:if condition="{mediaElement.type} == 0">
|
||||
<f:image src="uploads/tx_news/{mediaElement.image}" title="{mediaElement.title}" alt="{mediaElement.alt}" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
|
||||
</f:if>
|
||||
<f:if condition="{mediaElement.type} == 1">
|
||||
<f:render partial="Detail/MediaVideo" arguments="{mediaElement: mediaElement}"/>
|
||||
</f:if>
|
||||
<f:if condition="{mediaElement.type} == 2">
|
||||
<f:render partial="Detail/MediaHtml" arguments="{mediaElement: mediaElement}"/>
|
||||
</f:if>
|
||||
</f:alias>
|
||||
</n:link>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{settings.displayDummyIfNoMedia}">
|
||||
<span class="no-media-element">
|
||||
<n:link newsItem="{newsItem}" settings="{settings}">
|
||||
<f:image src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
|
||||
</n:link>
|
||||
</span>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{settings.displayDummyIfNoMedia}">
|
||||
<f:then>
|
||||
<div class="news-img-wrap">
|
||||
<n:link newsItem="{newsItem}" settings="{settings}">
|
||||
<span class="no-media-element">
|
||||
<f:image src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}"/>
|
||||
</span>
|
||||
</n:link>
|
||||
</div>
|
||||
</f:then>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
|
||||
<!-- teas=ser text -->
|
||||
<f:if condition="{newsItem.teaser}">
|
||||
<f:then>
|
||||
{newsItem.teaser -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()}
|
||||
</f:then>
|
||||
<f:else>
|
||||
{newsItem.bodytext -> f:format.crop(maxCharacters: '{settings.cropMaxCharacters}', respectWordBoundaries:'1') -> f:format.html()}
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<!--
|
||||
<n:link newsItem="{newsItem}" settings="{settings}" class="more">
|
||||
<f:translate key="more-link"/>
|
||||
</n:link>
|
||||
-->
|
||||
|
||||
<!-- footer information -->
|
||||
<f:if condition="{newsItem.firstCategory}">
|
||||
<!-- first category -->
|
||||
<span class="news-list-category">{newsItem.firstCategory.title}</span>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.tags}">
|
||||
<!-- Tags -->
|
||||
<span class="news-list-tags">
|
||||
<f:for each="{newsItem.tags}" as="tag">
|
||||
{tag.title}
|
||||
</f:for>
|
||||
</span>
|
||||
</f:if>
|
||||
|
||||
<!-- author -->
|
||||
<f:if condition="{newsItem.author}">
|
||||
<span class="news-list-author">
|
||||
<f:translate key="author" arguments="{0:newsItem.author}"/>
|
||||
</span>
|
||||
</f:if>
|
||||
|
||||
</li>
|
||||
@@ -0,0 +1,201 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:layout name="Backend/Default" />
|
||||
|
||||
<f:section name="categoryTree">
|
||||
<ul class="list-unstyled">
|
||||
<f:for each="{categories}" as="category">
|
||||
<li>
|
||||
<f:form.checkbox id="category-{category.item.uid}" property="selectedCategories" value="{category.item.uid}" />
|
||||
<label for="category-{category.item.uid}" title="{category.item.uid}">{category.item.title}</label>
|
||||
|
||||
<f:if condition="{category.children}">
|
||||
<f:render section="categoryTree" arguments="{categories: category.children}" />
|
||||
</f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</f:section>
|
||||
|
||||
<f:section name="content">
|
||||
<h1>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.title" />
|
||||
</h1>
|
||||
<f:if condition="{page} == 0">
|
||||
<div class="alert alert-info">
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.nopageselected" />
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:flashMessages class="tx-extbase-flash-message" />
|
||||
|
||||
<f:form name="demand" object="{demand}" method="get" >
|
||||
<input type="hidden" name="M" value="web_NewsTxNewsM2">
|
||||
<input type="hidden" name="moduleToken" value="{moduleToken}">
|
||||
<input type="hidden" name="id" value="{page}">
|
||||
|
||||
<h2>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.headline" />
|
||||
</h2>
|
||||
<div class="settings">
|
||||
<div class="row">
|
||||
<div class="col-sm-4 form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="recursive" class="col-sm-4 control-label">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.recursive" />
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<f:form.select property="recursive" options="{0:0,1:1,2:2,3:3,4:4,5:5}" id="recursive" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeRestriction" class="col-sm-4 control-label">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.timeRestriction" />
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<f:form.textfield property="timeRestriction" id="timeRestriction" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timeRestrictionHigh" class="col-sm-4 control-label">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.timeRestrictionHigh" />
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<f:form.textfield property="timeRestrictionHigh" id="timeRestrictionHigh" class="form-control" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="topNewsRestriction" class="col-sm-4 control-label">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.topNewsRestriction" />
|
||||
</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<f:form.select property="topNewsRestriction" class="form-control" options="{
|
||||
0:'',
|
||||
1:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.topNewsRestriction.1\')}',
|
||||
2:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.topNewsRestriction.2\')}'
|
||||
}" id="topNewsRestriction" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="sortingField" class="col-sm-4 control-label">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy" />
|
||||
</label>
|
||||
|
||||
<div class="col-sm-4">
|
||||
<f:form.select class="form-control" property="sortingField" options="{
|
||||
title:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.title\')}',
|
||||
datetime:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.datetime\')}',
|
||||
tstamp:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.tstamp\')}',
|
||||
archive:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.archive\')}',
|
||||
author:'{f:translate(key: \'LLL:EXT:cms/locallang_tca.xlf:pages.author_formlabel\')}'
|
||||
}" id="sortingField" />
|
||||
</div>
|
||||
<div class="col-sm-4">
|
||||
<f:form.select class="form-control" property="sortingDirection" options="{
|
||||
asc:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderDirection.asc\')}',
|
||||
desc:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderDirection.desc\')}'
|
||||
}" id="sortingDirection" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-4 col-sm-8">
|
||||
<f:form.submit value="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:search')}" class="btn btn-default" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-8">
|
||||
<div class="category-tree">
|
||||
<div class="tree-wrapper">
|
||||
<f:render section="categoryTree" arguments="{categories: categories}" />
|
||||
</div>
|
||||
|
||||
<f:if condition="{categories}">
|
||||
<div class="form-group">
|
||||
<label for="categoryConjunction" class="col-sm-6 control-label">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.categoryConjunction" />
|
||||
</label>
|
||||
|
||||
<div class="col-sm-6">
|
||||
<f:form.select class="form-control" property="categoryConjunction" options="{AND:'AND', OR:'OR', notor:'notor', notand:'notand'}" id="categoryConjunction" />
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</f:form>
|
||||
|
||||
<f:if condition="{news}">
|
||||
<f:then>
|
||||
<div class="result">
|
||||
<f:if condition="{settings.list.paginate.itemsPerPage} == 0">
|
||||
<div class="alert alert-warning">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.nolimit" arguments="{0:'settings.list.paginate.itemsPerPage'}" />
|
||||
</div>
|
||||
</f:if>
|
||||
<f:be.widget.paginate objects="{news}" as="paginatedNews" configuration="{itemsPerPage: settings.list.paginate.itemsPerPage}">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr class="t3-row-header">
|
||||
<th>
|
||||
<f:translate key="LLL:EXT:cms/locallang_ttc.xlf:header_formlabel" />
|
||||
<div class="btn-group">
|
||||
<n:be.buttons.icon class="btn" uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'title')}" icon="actions-document-open" />
|
||||
</div>
|
||||
</th>
|
||||
<th class="nowrap">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.istopnews" />
|
||||
<div class="btn-group">
|
||||
<n:be.buttons.icon class="btn" uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'istopnews')}" icon="actions-document-open" />
|
||||
</div>
|
||||
</th>
|
||||
<th class="nowrap date">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.datetime" />
|
||||
<div class="btn-group">
|
||||
<n:be.buttons.icon class="btn" uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'datetime')}" icon="actions-document-open" />
|
||||
</div>
|
||||
</th>
|
||||
<th class="nowrap date">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.archive" />
|
||||
<div class="btn-group">
|
||||
<n:be.buttons.icon class="btn" uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'archive')}" icon="actions-document-open" />
|
||||
</div>
|
||||
</th>
|
||||
<th class="nowrap">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.tstamp" />
|
||||
</th>
|
||||
<th class="nowrap nosort"></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{paginatedNews}" as="newsItem">
|
||||
<f:render partial="Administration/ListItem" arguments="{newsItem: newsItem, dateformat:dateformat}" />
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.newsCount" arguments="{0:'{f:count(subject:news)}'}" />
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</f:be.widget.paginate>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="alert alert-notice">
|
||||
<f:translate key="list_nonewsfound" />
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
@@ -0,0 +1,48 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:layout name="Backend/Default" />
|
||||
|
||||
<f:section name="content">
|
||||
<h1>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.newsPidListing.header" />
|
||||
</h1>
|
||||
<f:flashMessages class="tx-extbase-flash-message" />
|
||||
<p class="lead">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.newsPidListing.description" />
|
||||
</p>
|
||||
<f:form action="newsPidListing" class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<label for="treeLevel" class="col-sm-3 control-label">
|
||||
<f:translate key="LLL:EXT:lang/locallang_general.xlf:LGL.recursive" />
|
||||
</label>
|
||||
<div class="col-sm-4">
|
||||
<f:form.select class="form-control" name="treeLevel" id="treeLevel" options="{1:1,2:2,3:3,4:4,5:5,6:6,7:7}" value="{treeLevel}" additionalAttributes="{onchange:'this.form.submit()'}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:form>
|
||||
<table class="t3-table">
|
||||
<thead>
|
||||
<tr class="t3-row-header">
|
||||
<th>
|
||||
<f:translate key="LLL:EXT:lang/locallang_tca.xlf:pages" />
|
||||
</th>
|
||||
<th>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news" />
|
||||
</th>
|
||||
<th>
|
||||
<f:translate key="LLL:EXT:lang/locallang_tca.xlf:sys_category" />
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<f:for each="{tree}" as="item">
|
||||
<tr class="{f:if(condition: item.countNewsAndCategories, then: '', else: 'hide_line')}">
|
||||
<td class="icon" nowrap="nowrap">
|
||||
<f:format.html parseFuncTSPath="">{item.HTML}</f:format.html>
|
||||
<f:link.action action="index" additionalParams="{id:item.row.uid}" title="UID: {item.row.uid}">{item.row.title}</f:link.action>
|
||||
</td>
|
||||
<td>{item.countNews}</td>
|
||||
<td>{item.countCategories}</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</f:section>
|
||||
@@ -0,0 +1,176 @@
|
||||
<f:layout name="Backend/Simple" />
|
||||
|
||||
<f:section name="iconButtons">
|
||||
|
||||
</f:section>
|
||||
|
||||
<f:section name="content">
|
||||
<h3 class="uppercase">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.header" />
|
||||
</h3>
|
||||
|
||||
<p class="description">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.description" />
|
||||
</p>
|
||||
<div class="alert alert-warning">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.backupwarning" />
|
||||
</div>
|
||||
<br />
|
||||
<f:if condition="{error}">
|
||||
<div class="alert alert-danger">
|
||||
<div class="message-header">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.error.configuration.title" />
|
||||
</div>
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:{error}" default="{error}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{availableJobs -> f:count()} > 1">
|
||||
<f:then>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.choose_a_job" />:
|
||||
<f:form.select id="jobSelector" options="{availableJobs}" />
|
||||
<br /><br />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="alert alert-info">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.nojobs" />
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<div id="job" style="display:none;">
|
||||
<div id="progressBar" style="width:300px;"></div>
|
||||
<button id="startButton">Start</button>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var moduleUrl = '{f:format.raw(value: moduleUrl)}';
|
||||
<![CDATA[
|
||||
Ext.namespace('Tx_News');
|
||||
|
||||
Tx_News.Common = function () {
|
||||
var pub = {};
|
||||
var extKey = 'news';
|
||||
|
||||
var underscoreToUpperCamelCase = function (subject) {
|
||||
var matches = subject.match(/(_\w)/g);
|
||||
if (matches) {
|
||||
matches.each(function (m) {
|
||||
subject = subject.replace(m, m.charAt(1).toUpperCase());
|
||||
});
|
||||
}
|
||||
return subject.charAt(0).toUpperCase() + subject.substr(1);
|
||||
};
|
||||
|
||||
var getParameterPrefix = function (mainModuleName, subModuleName) {
|
||||
return 'tx_' + extKey + '_' + mainModuleName + '_' + extKey + subModuleName.replace(/_/g, '');
|
||||
};
|
||||
|
||||
pub.getExtKey = function () {
|
||||
return extKey;
|
||||
};
|
||||
|
||||
pub.getBackendRequest = function (mainModuleName, subModuleName, controller, action, parameters) {
|
||||
var parameterPrefix = getParameterPrefix(mainModuleName, subModuleName);
|
||||
var params = {};
|
||||
|
||||
Ext.apply(parameters, {controller: controller, action: action});
|
||||
|
||||
Ext.iterate(parameters, function (key, value) {
|
||||
params[parameterPrefix + '[' + key + ']'] = value;
|
||||
});
|
||||
|
||||
var request = {
|
||||
'url': moduleUrl,
|
||||
'params': params
|
||||
};
|
||||
|
||||
return request;
|
||||
};
|
||||
|
||||
return pub;
|
||||
}();
|
||||
|
||||
|
||||
Tx_News.Importer = function () {
|
||||
var pub = {};
|
||||
var jobInfo = {};
|
||||
var progressBar;
|
||||
|
||||
var runCounter = 0;
|
||||
|
||||
var run = function () {
|
||||
var request = Ext.apply(Tx_News.Common.getBackendRequest('web', 'tx_news_m1', 'Import',
|
||||
'runJob', {jobClassName: jobInfo.jobClassName, offset: runCounter * jobInfo.increaseOffsetPerRunBy}));
|
||||
|
||||
Ext.apply(request, {
|
||||
success: function () {
|
||||
var progress = runCounter / jobInfo.runsToComplete;
|
||||
|
||||
progressBar.updateProgress(progress, Math.round(100 * progress) + '%');
|
||||
runCounter++;
|
||||
|
||||
if (runCounter <= jobInfo.runsToComplete) {
|
||||
run();
|
||||
} else {
|
||||
progressBar.updateText('Done.');
|
||||
progressBar.reset();
|
||||
runCounter = 1;
|
||||
}
|
||||
},
|
||||
failure: function () {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
|
||||
Ext.Ajax.request(request);
|
||||
};
|
||||
|
||||
var initJob = function () {
|
||||
Ext.get('job').show();
|
||||
|
||||
progressBar = new Ext.ProgressBar({
|
||||
renderTo: 'progressBar'
|
||||
});
|
||||
|
||||
Ext.get('startButton').on('click', function () {
|
||||
run();
|
||||
});
|
||||
};
|
||||
|
||||
var loadJobInfo = function (jobClassName) {
|
||||
var request = Ext.apply(Tx_News.Common.getBackendRequest('web', 'tx_news_m1', 'Import',
|
||||
'jobInfo', {jobClassName: jobClassName}));
|
||||
|
||||
Ext.apply(request, {
|
||||
success: function (response) {
|
||||
jobInfo = (Ext.decode(response.responseText));
|
||||
Ext.apply(jobInfo, {jobClassName: jobClassName});
|
||||
initJob();
|
||||
}
|
||||
});
|
||||
|
||||
Ext.Ajax.request(request);
|
||||
};
|
||||
|
||||
pub.init = function () {
|
||||
Ext.get('jobSelector').on('change', function () {
|
||||
var jobClassName = this.getValue();
|
||||
if (jobClassName != '0') {
|
||||
loadJobInfo(jobClassName);
|
||||
} else {
|
||||
Ext.get('job').hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
return pub;
|
||||
}();
|
||||
|
||||
Ext.onReady(function () {
|
||||
Tx_News.Importer.init();
|
||||
});
|
||||
]]>
|
||||
</script>
|
||||
</f:section>
|
||||
@@ -0,0 +1,179 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:layout name="Backend/Default" />
|
||||
|
||||
<f:section name="categoryTree">
|
||||
<ul class="list-unstyled">
|
||||
<f:for each="{categories}" as="category">
|
||||
<li>
|
||||
<f:form.checkbox id="category-{category.item.uid}" property="selectedCategories" value="{category.item.uid}" />
|
||||
<label for="category-{category.item.uid}" title="{category.item.uid}">{category.item.title}</label>
|
||||
|
||||
<f:if condition="{category.children}">
|
||||
<f:render section="categoryTree" arguments="{categories: category.children}" />
|
||||
</f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</f:section>
|
||||
|
||||
<f:section name="content">
|
||||
<h1>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.title" />
|
||||
</h1>
|
||||
|
||||
<f:if condition="{page} == 0">
|
||||
<div class="typo3-message message-information">
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.nopageselected" />
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:flashMessages class="tx-extbase-flash-message" />
|
||||
|
||||
<f:form name="demand" object="{demand}" method="get" >
|
||||
<input type="hidden" name="M" value="web_NewsTxNewsM2">
|
||||
<input type="hidden" name="moduleToken" value="{moduleToken}">
|
||||
<input type="hidden" name="id" value="{page}">
|
||||
|
||||
<h2>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.headline" />
|
||||
</h2>
|
||||
<div class="settings">
|
||||
<div class="form">
|
||||
<div class="field">
|
||||
<label for="recursive">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.recursive" />
|
||||
</label>
|
||||
<f:form.select property="recursive" options="{0:0,1:1,2:2,3:3,4:4,5:5}" id="recursive" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label for="timeRestriction">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.timeRestriction" />
|
||||
</label>
|
||||
<f:form.textfield property="timeRestriction" id="timeRestriction" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="timeRestrictionHigh">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.timeRestrictionHigh" />
|
||||
</label>
|
||||
<f:form.textfield property="timeRestrictionHigh" id="timeRestrictionHigh" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
<div class="field">
|
||||
<label for="topNewsRestriction">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.topNewsRestriction" />
|
||||
</label>
|
||||
<f:form.select property="topNewsRestriction" options="{
|
||||
0:'',
|
||||
1:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.topNewsRestriction.1\')}',
|
||||
2:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.topNewsRestriction.2\')}'
|
||||
}" id="topNewsRestriction" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<div class="field" style="margin-top:10px;">
|
||||
<label for="sortingField">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy" />
|
||||
</label>
|
||||
<f:form.select property="sortingField" options="{
|
||||
title:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.title\')}',
|
||||
datetime:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.datetime\')}',
|
||||
tstamp:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.tstamp\')}',
|
||||
archive:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.archive\')}',
|
||||
author:'{f:translate(key: \'LLL:EXT:cms/locallang_tca.xlf:pages.author_formlabel\')}'
|
||||
}" id="sortingField" />
|
||||
<f:form.select property="sortingDirection" options="{
|
||||
asc:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderDirection.asc\')}',
|
||||
desc:'{f:translate(key: \'LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderDirection.desc\')}'
|
||||
}" id="sortingDirection" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
<f:form.submit value="{f:translate(key:'LLL:EXT:lang/locallang_common.xlf:search')}" class="submit" />
|
||||
</div>
|
||||
|
||||
<div class="category-tree">
|
||||
<div class="tree-wrapper">
|
||||
<f:render section="categoryTree" arguments="{categories: categories}" />
|
||||
</div>
|
||||
|
||||
<f:if condition="{categories}">
|
||||
<div class="field">
|
||||
<label for="categoryConjunction">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.categoryConjunction" />
|
||||
</label>
|
||||
<f:form.select property="categoryConjunction" options="{AND:'AND', OR:'OR', notor:'notor', notand:'notand'}" id="categoryConjunction" />
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</f:if>
|
||||
</div>
|
||||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
</f:form>
|
||||
|
||||
<f:if condition="{news}">
|
||||
<f:then>
|
||||
<div class="result">
|
||||
<f:if condition="{settings.list.paginate.itemsPerPage} == 0">
|
||||
<div class="typo3-message message-warning">
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.nolimit" arguments="{0:'settings.list.paginate.itemsPerPage'}"/>
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:be.widget.paginate objects="{news}" as="paginatedNews" configuration="{itemsPerPage: settings.list.paginate.itemsPerPage}">
|
||||
<table cellpadding="0" cellmargin="0" cellspacing="0" class="t3-table">
|
||||
<thead>
|
||||
<tr class="t3-row-header">
|
||||
<td>
|
||||
<span><f:translate key="LLL:EXT:cms/locallang_ttc.xlf:header_formlabel" /></span>
|
||||
<n:be.buttons.icon uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'title')}" icon="actions-document-open" />
|
||||
</td>
|
||||
<td>
|
||||
<span><f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.istopnews" /></span>
|
||||
<n:be.buttons.icon uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'istopnews')}" icon="actions-document-open" />
|
||||
</td>
|
||||
<td class="date">
|
||||
<span><f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.datetime" /></span>
|
||||
<n:be.buttons.icon uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'datetime')}" icon="actions-document-open" />
|
||||
</td>
|
||||
<td class="date">
|
||||
<span><f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news.archive" /></span>
|
||||
<n:be.buttons.icon uri="#" onclick="{n:be.multiEditLink(items:paginatedNews,columns:'archive')}" icon="actions-document-open" />
|
||||
</td>
|
||||
<td>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:flexforms_general.orderBy.tstamp" />
|
||||
</td>
|
||||
<td class="nosort"></td>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<f:for each="{paginatedNews}" as="newsItem">
|
||||
<f:render partial="Administration/ListItem" arguments="{newsItem: newsItem, dateformat:dateformat}" />
|
||||
</f:for>
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:module.newsCount" arguments="{0:'{f:count(subject:news)}'}" />
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</f:be.widget.paginate>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="typo3-message message-notice">
|
||||
<div class="message-body">
|
||||
<f:translate key="list_nonewsfound" />
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
@@ -0,0 +1,45 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:layout name="Backend/Default" />
|
||||
|
||||
<f:section name="content">
|
||||
<h2>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.newsPidListing.header" />
|
||||
</h2>
|
||||
<f:flashMessages class="tx-extbase-flash-message" />
|
||||
<p>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:administration.newsPidListing.description" />
|
||||
</p>
|
||||
<br />
|
||||
<f:form action="newsPidListing">
|
||||
<label for="treeLevel">
|
||||
<f:translate key="LLL:EXT:lang/locallang_general.xlf:LGL.recursive" />
|
||||
</label>
|
||||
<f:form.select name="treeLevel" id="treeLevel" options="{1:1,2:2,3:3,4:4,5:5,6:6,7:7}" value="{treeLevel}" additionalAttributes="{onchange:'this.form.submit()'}" />
|
||||
</f:form>
|
||||
<table cellpadding="0" cellmargin="0" cellspacing="0" class="t3-table">
|
||||
<thead>
|
||||
<tr class="t3-row-header">
|
||||
<td>
|
||||
<f:translate key="LLL:EXT:lang/locallang_tca.xlf:pages" />
|
||||
</td>
|
||||
<td>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_db.xlf:tx_news_domain_model_news" />
|
||||
</td>
|
||||
<td>
|
||||
<f:translate key="LLL:EXT:lang/locallang_tca.xlf:sys_category" />
|
||||
</td>
|
||||
</tr>
|
||||
</thead>
|
||||
<f:for each="{tree}" as="item">
|
||||
<tr class="db_list_normal {f:if(condition: item.countNewsAndCategories, then: 'show', else: 'hide')}">
|
||||
<td class="icon" nowrap="nowrap">
|
||||
<f:format.html parseFuncTSPath="">{item.HTML}</f:format.html>
|
||||
<f:link.action action="index" additionalParams="{id:item.row.uid}" title="UID: {item.row.uid}">{item.row.title}</f:link.action>
|
||||
</td>
|
||||
<td>{item.countNews}</td>
|
||||
<td>{item.countCategories}</td>
|
||||
</tr>
|
||||
</f:for>
|
||||
</table>
|
||||
</f:section>
|
||||
@@ -0,0 +1,43 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
<f:layout name="General" />
|
||||
<!--
|
||||
=====================
|
||||
Templates/Category/List.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<f:if condition="{categories}">
|
||||
<f:then>
|
||||
|
||||
|
||||
<f:render section="categoryTree" arguments="{categories:categories,overwriteDemand:overwriteDemand}" />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:translate key="list_nocategoriesfound" />
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
|
||||
<f:section name="categoryTree">
|
||||
<ul>
|
||||
<f:for each="{categories}" as="category">
|
||||
<li>
|
||||
<f:if condition="{category.item.uid} == {overwriteDemand.categories}">
|
||||
<f:then>
|
||||
<f:link.page class="active" pageUid="{settings.listPid}"
|
||||
additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title}
|
||||
</f:link.page>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:link.page pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{categories: category.item.uid}}}">{category.item.title}
|
||||
</f:link.page>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{category.children}">
|
||||
<f:render section="categoryTree" arguments="{categories: category.children,overwriteDemand:overwriteDemand}" />
|
||||
</f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</f:section>
|
||||
180
public/fileadmin/templates/ext/news/Templates/Import/Index.html
Normal file
180
public/fileadmin/templates/ext/news/Templates/Import/Index.html
Normal file
@@ -0,0 +1,180 @@
|
||||
<f:layout name="Backend/Simple" />
|
||||
|
||||
<f:section name="iconButtons">
|
||||
|
||||
</f:section>
|
||||
|
||||
<f:section name="content">
|
||||
<h3 class="uppercase">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.header" />
|
||||
</h3>
|
||||
|
||||
<p class="description">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.description" />
|
||||
</p>
|
||||
<div class="typo3-message message-warning">
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.backupwarning" />
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<f:if condition="{error}">
|
||||
<div class="typo3-message message-error">
|
||||
<div class="message-header">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.error.configuration.title" />
|
||||
</div>
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:{error}" default="{error}" />
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
<f:if condition="{availableJobs -> f:count()} > 1">
|
||||
<f:then>
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.choose_a_job" />:
|
||||
<f:form.select id="jobSelector" options="{availableJobs}" />
|
||||
<br /><br />
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="typo3-message message-information">
|
||||
<div class="message-body">
|
||||
<f:translate key="LLL:EXT:news/Resources/Private/Language/locallang_be.xlf:import.nojobs" />
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
<div id="job" style="display:none;">
|
||||
<div id="progressBar" style="width:300px;"></div>
|
||||
<button id="startButton">Start</button>
|
||||
<br />
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
var moduleUrl = '{f:format.raw(value: moduleUrl)}';
|
||||
<![CDATA[
|
||||
Ext.namespace('Tx_News');
|
||||
|
||||
Tx_News.Common = function () {
|
||||
var pub = {};
|
||||
var extKey = 'news';
|
||||
|
||||
var underscoreToUpperCamelCase = function (subject) {
|
||||
var matches = subject.match(/(_\w)/g);
|
||||
if (matches) {
|
||||
matches.each(function (m) {
|
||||
subject = subject.replace(m, m.charAt(1).toUpperCase());
|
||||
});
|
||||
}
|
||||
return subject.charAt(0).toUpperCase() + subject.substr(1);
|
||||
};
|
||||
|
||||
var getParameterPrefix = function (mainModuleName, subModuleName) {
|
||||
return 'tx_' + extKey + '_' + mainModuleName + '_' + extKey + subModuleName.replace(/_/g, '');
|
||||
};
|
||||
|
||||
pub.getExtKey = function () {
|
||||
return extKey;
|
||||
};
|
||||
|
||||
pub.getBackendRequest = function (mainModuleName, subModuleName, controller, action, parameters) {
|
||||
var parameterPrefix = getParameterPrefix(mainModuleName, subModuleName);
|
||||
var params = {};
|
||||
|
||||
Ext.apply(parameters, {controller: controller, action: action});
|
||||
|
||||
Ext.iterate(parameters, function (key, value) {
|
||||
params[parameterPrefix + '[' + key + ']'] = value;
|
||||
});
|
||||
|
||||
var request = {
|
||||
'url': moduleUrl,
|
||||
'params': params
|
||||
};
|
||||
|
||||
return request;
|
||||
};
|
||||
|
||||
return pub;
|
||||
}();
|
||||
|
||||
|
||||
Tx_News.Importer = function () {
|
||||
var pub = {};
|
||||
var jobInfo = {};
|
||||
var progressBar;
|
||||
|
||||
var runCounter = 0;
|
||||
|
||||
var run = function () {
|
||||
var request = Ext.apply(Tx_News.Common.getBackendRequest('web', 'tx_news_m1', 'Import',
|
||||
'runJob', {jobClassName: jobInfo.jobClassName, offset: runCounter * jobInfo.increaseOffsetPerRunBy}));
|
||||
|
||||
Ext.apply(request, {
|
||||
success: function () {
|
||||
var progress = runCounter / jobInfo.runsToComplete;
|
||||
|
||||
progressBar.updateProgress(progress, Math.round(100 * progress) + '%');
|
||||
runCounter++;
|
||||
|
||||
if (runCounter <= jobInfo.runsToComplete) {
|
||||
run();
|
||||
} else {
|
||||
progressBar.updateText('Done.');
|
||||
progressBar.reset();
|
||||
runCounter = 1;
|
||||
}
|
||||
},
|
||||
failure: function () {
|
||||
alert('error');
|
||||
}
|
||||
});
|
||||
|
||||
Ext.Ajax.request(request);
|
||||
};
|
||||
|
||||
var initJob = function () {
|
||||
Ext.get('job').show();
|
||||
|
||||
progressBar = new Ext.ProgressBar({
|
||||
renderTo: 'progressBar'
|
||||
});
|
||||
|
||||
Ext.get('startButton').on('click', function () {
|
||||
run();
|
||||
});
|
||||
};
|
||||
|
||||
var loadJobInfo = function (jobClassName) {
|
||||
var request = Ext.apply(Tx_News.Common.getBackendRequest('web', 'tx_news_m1', 'Import',
|
||||
'jobInfo', {jobClassName: jobClassName}));
|
||||
|
||||
Ext.apply(request, {
|
||||
success: function (response) {
|
||||
jobInfo = (Ext.decode(response.responseText));
|
||||
Ext.apply(jobInfo, {jobClassName: jobClassName});
|
||||
initJob();
|
||||
}
|
||||
});
|
||||
|
||||
Ext.Ajax.request(request);
|
||||
};
|
||||
|
||||
pub.init = function () {
|
||||
Ext.get('jobSelector').on('change', function () {
|
||||
var jobClassName = this.getValue();
|
||||
if (jobClassName != '0') {
|
||||
loadJobInfo(jobClassName);
|
||||
} else {
|
||||
Ext.get('job').hide();
|
||||
}
|
||||
});
|
||||
};
|
||||
return pub;
|
||||
}();
|
||||
|
||||
Ext.onReady(function () {
|
||||
Tx_News.Importer.init();
|
||||
});
|
||||
]]>
|
||||
</script>
|
||||
</f:section>
|
||||
@@ -0,0 +1,33 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
<f:layout name="General" />
|
||||
<!--
|
||||
=====================
|
||||
Templates/News/DateMenu.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<div class="news-menu-view">
|
||||
<ul>
|
||||
<f:for each="{data.single}" key="year" as="months">
|
||||
<li>
|
||||
{year}
|
||||
<ul>
|
||||
<f:for each="{months}" key="month" as="count">
|
||||
<f:if condition="{0:year, 1:month} == {0:overwriteDemand.year, 1:overwriteDemand.month}">
|
||||
<f:then>
|
||||
<li class="item itemactive">
|
||||
</f:then>
|
||||
<f:else>
|
||||
<li class="item">
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:link.action pageUid="{listPid}" arguments="{overwriteDemand:{year: year, month: month}}"><f:translate key="month.{month}" /> {year}</f:link.action>
|
||||
({count} <f:translate key="{f:if(condition: '{count} == 1', then: 'entry', else: 'entries')}" />)
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</div>
|
||||
</f:section>
|
||||
215
public/fileadmin/templates/ext/news/Templates/News/Detail.html
Normal file
215
public/fileadmin/templates/ext/news/Templates/News/Detail.html
Normal file
@@ -0,0 +1,215 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:layout name="Detail.html" />
|
||||
|
||||
<!--
|
||||
=====================
|
||||
News/Detail.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<f:if condition="{newsItem}">
|
||||
<f:then>
|
||||
<n:format.nothing>
|
||||
<f:if condition="{newsItem.alternativeTitle}">
|
||||
<f:then>
|
||||
<n:titleTag>
|
||||
<n:format.htmlentitiesDecode>{newsItem.alternativeTitle}</n:format.htmlentitiesDecode>
|
||||
</n:titleTag>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<n:titleTag>
|
||||
<n:format.htmlentitiesDecode>{newsItem.title}</n:format.htmlentitiesDecode>
|
||||
</n:titleTag>
|
||||
</f:else>
|
||||
</f:if>
|
||||
<f:render partial="Detail/Opengraph" arguments="{newsItem: newsItem, settings:settings}" />
|
||||
</n:format.nothing>
|
||||
<!-- <div class="headerNews">
|
||||
<h3>{newsItem.title}</h3>
|
||||
</div>-->
|
||||
<h1 class="title">{newsItem.title}</h1>
|
||||
<div class="footerNews">
|
||||
<p>
|
||||
<!-- date -->
|
||||
<span class="date">
|
||||
<n:format.date format="%d %B %Y">{newsItem.datetime}</n:format.date>
|
||||
</span>
|
||||
|
||||
<f:if condition="{newsItem.categories}">
|
||||
<f:render partial="Category/Items" arguments="{categories:newsItem.categories, settings:settings}" />
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.tags}">
|
||||
<!-- Tags -->
|
||||
<span class="news-list-tags">
|
||||
<f:for each="{newsItem.tags}" as="tag">
|
||||
{tag.title}
|
||||
</f:for>
|
||||
</span>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.author}">
|
||||
<!-- author -->
|
||||
<span class="news-list-author" itemscope itemtype="http://data-vocabulary.org/Person">
|
||||
<f:translate key="author_simple" /> <span itemprop="name">{newsItem.author}</span>
|
||||
</span>
|
||||
</f:if>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<f:if condition="{newsItem.teaser}">
|
||||
<!-- teaser -->
|
||||
<div class="teaser-text">
|
||||
<f:format.html>{newsItem.teaser}</f:format.html>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.contentElements}">
|
||||
<!-- content elements -->
|
||||
<f:cObject typoscriptObjectPath="lib.tx_news.contentElementRendering">{newsItem.contentElementIdList}</f:cObject>
|
||||
</f:if>
|
||||
|
||||
<f:render partial="Detail/FalMediaContainer" arguments="{media: newsItem.falMedia, settings:settings}" />
|
||||
<f:render partial="Detail/MediaContainer" arguments="{media: newsItem.media, settings:settings}" />
|
||||
|
||||
<!-- main text -->
|
||||
<div class="news-text-wrap">
|
||||
<f:format.html>{newsItem.bodytext}</f:format.html>
|
||||
</div>
|
||||
|
||||
<f:if condition="{settings.backPid}">
|
||||
<!-- Link Back -->
|
||||
<div class="news-backlink-wrap">
|
||||
<f:link.page pageUid="{settings.backPid}">
|
||||
<f:translate key="back-link" />
|
||||
</f:link.page>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{settings.detail.showSocialShareButtons}">
|
||||
<div class="facebook">
|
||||
<div class="like">
|
||||
<n:social.facebook.like></n:social.facebook.like>
|
||||
</div>
|
||||
<div class="share">
|
||||
<n:social.facebook.share />
|
||||
</div>
|
||||
<div class="twitter">
|
||||
<n:social.twitter>Twitter</n:social.twitter>
|
||||
</div>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{settings.detail.disqusShortname}">
|
||||
<n:social.disqus newsItem="{newsItem}"
|
||||
shortName="{settings.detail.disqusShortname}"
|
||||
link="{n:link(newsItem:newsItem,settings:settings,uriOnly:1,configuration:'{forceAbsoluteUrl:1}')}" />
|
||||
</f:if>
|
||||
|
||||
<!-- related things -->
|
||||
<div class="news-related-wrap">
|
||||
|
||||
<f:if condition="{newsItem.allRelatedSorted}">
|
||||
<!-- Related news records -->
|
||||
<div class="news-related news-related-news">
|
||||
<h4>
|
||||
<f:translate key="related-news" />
|
||||
</h4>
|
||||
<ul>
|
||||
<f:for each="{newsItem.allRelatedSorted}" as="related">
|
||||
<li>
|
||||
<span class="news-related-news-date"><n:format.date format="{f:translate(key:'dateFormat')}">{related.datetime}</n:format.date></span>
|
||||
<n:link newsItem="{related}" settings="{settings}">
|
||||
{related.title}
|
||||
</n:link>
|
||||
</li>
|
||||
|
||||
</f:for>
|
||||
</ul>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.relatedFiles}">
|
||||
<!-- Related files -->
|
||||
<div class="news-related news-related-files">
|
||||
<h4>
|
||||
<f:translate key="related-files" />
|
||||
</h4>
|
||||
<ul>
|
||||
<f:for each="{newsItem.relatedFiles}" as="relatedFile">
|
||||
<li>
|
||||
<span class="news-related-files-link">
|
||||
<n:format.fileDownload file="uploads/tx_news/{relatedFile.file}" configuration="{settings.relatedFiles.download}">
|
||||
<f:if condition="{relatedFile.title}">
|
||||
<f:then>
|
||||
{relatedFile.title}
|
||||
</f:then>
|
||||
<f:else>
|
||||
{relatedFile.file}
|
||||
</f:else>
|
||||
</f:if>
|
||||
</n:format.fileDownload>
|
||||
</span>
|
||||
<span class="news-related-files-size">
|
||||
<n:format.fileSize file="uploads/tx_news/{relatedFile.file}" format="{settings.relatedFiles.fileSizeLabels}" />
|
||||
</span>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.falRelatedFiles}">
|
||||
<!-- FAL related files -->
|
||||
<div class="news-related news-related-files">
|
||||
<h4>
|
||||
<f:translate key="related-files" />
|
||||
</h4>
|
||||
<ul>
|
||||
<f:for each="{newsItem.falRelatedFiles}" as="relatedFile">
|
||||
<li>
|
||||
<span class="news-related-files-link">
|
||||
<n:format.fileDownload file="{relatedFile.originalResource.publicUrl}" configuration="{settings.relatedFiles.download}">
|
||||
<f:if condition="{relatedFile.originalResource.title}">
|
||||
<f:then>
|
||||
{relatedFile.originalResource.title}
|
||||
</f:then>
|
||||
<f:else>
|
||||
{relatedFile.originalResource.name}
|
||||
</f:else>
|
||||
</f:if>
|
||||
</n:format.fileDownload>
|
||||
</span>
|
||||
<span class="news-related-files-size">
|
||||
{relatedFile.originalResource.size -> f:format.bytes()}
|
||||
</span>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</div>
|
||||
</f:if>
|
||||
|
||||
<f:if condition="{newsItem.relatedLinks}">
|
||||
<!-- Related links -->
|
||||
<div class="news-related news-related-links">
|
||||
<h4>
|
||||
<f:translate key="related-links" />
|
||||
</h4>
|
||||
<ul>
|
||||
<f:for each="{newsItem.relatedLinks}" as="relatedLink">
|
||||
<li>
|
||||
<f:link.page pageUid="{relatedLink.uri}" title="{relatedLink.title}" target="{n:targetLink(link:relatedLink.uri)}">{f:if(condition: relatedLink.title, then: relatedLink.title, else: relatedLink.uri)}</f:link.page>
|
||||
<f:if condition="{relatedLink.description}"><span>{relatedLink.description}</span></f:if>
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</div>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:then>
|
||||
<f:else>
|
||||
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
27
public/fileadmin/templates/ext/news/Templates/News/List.atom
Normal file
27
public/fileadmin/templates/ext/news/Templates/News/List.atom
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
{namespace n=Tx_News_ViewHelpers}<feed xmlns="http://www.w3.org/2005/Atom">
|
||||
<title>{settings.list.rss.channel.title}</title>
|
||||
<link href="{settings.list.rss.channel.link}"/>
|
||||
<link rel="self" href="<f:format.htmlentities><f:uri.page pageType="9818"/></f:format.htmlentities>"/>
|
||||
<id><f:uri.page/></id>
|
||||
<updated><n:format.date format="c" currentDate="1" strftime="0"/></updated>
|
||||
<f:if condition="{news}">
|
||||
<f:for each="{news}" as="newsItem">
|
||||
<entry>
|
||||
<id>{settings.list.rss.channel.link}news-{newsItem.uid}.atom</id>
|
||||
<title><n:format.hsc>{newsItem.title}</n:format.hsc></title>
|
||||
<author>
|
||||
<name><f:if condition="{newsItem.author}"><f:then>{newsItem.author}</f:then><f:else>-</f:else></f:if></name>
|
||||
<f:if condition="{newsItem.author_email}"><email>{newsItem.author_email}</email></f:if>
|
||||
</author>
|
||||
<published><n:format.date format="c" strftime="0">{newsItem.crdate}</n:format.date></published>
|
||||
<updated><n:format.date format="c" strftime="0">{newsItem.datetime}</n:format.date></updated>
|
||||
<link rel="alternate" type="text/html" href="<n:format.hsc><n:link newsItem="{newsItem}" settings="{settings}" uriOnly="1" /></n:format.hsc>"/>
|
||||
<summary><n:format.hsc><n:format.striptags>{newsItem.teaser}</n:format.striptags></n:format.hsc></summary>
|
||||
<content type="xhtml"><div xmlns="http://www.w3.org/1999/xhtml">
|
||||
<f:format.html>{newsItem.bodytext}</f:format.html>
|
||||
</div></content>
|
||||
</entry>
|
||||
</f:for>
|
||||
</f:if>
|
||||
</feed>
|
||||
86
public/fileadmin/templates/ext/news/Templates/News/List.html
Normal file
86
public/fileadmin/templates/ext/news/Templates/News/List.html
Normal file
@@ -0,0 +1,86 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
<f:layout name="General" />
|
||||
<!--
|
||||
=====================
|
||||
Templates/News/List.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<f:if condition="{news}">
|
||||
<f:then>
|
||||
<f:if condition="{settings.templateLayout} == 100">
|
||||
|
||||
<!-- Archivio notizie -->
|
||||
<f:then>
|
||||
<ul class="base_list news_list">
|
||||
<f:if condition="{settings.hidePagination}">
|
||||
<f:then>
|
||||
<f:for each="{news}" as="newsItem" iteration="iterator">
|
||||
<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
|
||||
</f:for>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}" initial="{offset:settings.offset,limit:settings.limit}">
|
||||
<f:for each="{paginatedNews}" as="newsItem" iteration="iterator">
|
||||
<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
|
||||
</f:for>
|
||||
</n:widget.paginate>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</ul>
|
||||
</f:then>
|
||||
<!-- [FINE] Archivio notizie -->
|
||||
|
||||
<!-- Lista ultime notizie -->
|
||||
<f:else>
|
||||
<div class="four columns content omega">
|
||||
<div class="widget">
|
||||
<h3 class="t_line">Notizie</h3>
|
||||
<ol class="base_list icon_list">
|
||||
<f:if condition="{settings.hidePagination}">
|
||||
<f:then>
|
||||
<f:for each="{news}" as="newsItem" iteration="iterator">
|
||||
<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
|
||||
<f:if condition="{iterator.isLast}">
|
||||
<f:then>
|
||||
<li>
|
||||
<br><i class="fa fa-archive"></i>
|
||||
<f:link.action pageUid="{settings.listPid}">Archivio notizie</f:link.action>
|
||||
</li>
|
||||
</f:then>
|
||||
<f:else></f:else>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<n:widget.paginate objects="{news}" as="paginatedNews" configuration="{settings.list.paginate}" initial="{offset:settings.offset,limit:settings.limit}">
|
||||
<f:for each="{paginatedNews}" as="newsItem" iteration="iterator">
|
||||
<f:render partial="List/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
|
||||
<f:if condition="{iterator.isLast}">
|
||||
<f:then>
|
||||
<li>
|
||||
<br><i class="fa fa-archive"></i>
|
||||
<f:link.action pageUid="{settings.listPid}">Archivio notizie</f:link.action>
|
||||
</li>
|
||||
</f:then>
|
||||
<f:else></f:else>
|
||||
</f:if>
|
||||
</f:for>
|
||||
</n:widget.paginate>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</ol>
|
||||
</div>
|
||||
</div>
|
||||
</f:else>
|
||||
<!-- [FINE] Lista ultime notizie -->
|
||||
|
||||
</f:if>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="no-news-found">
|
||||
<f:translate key="list_nonewsfound" />
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:section>
|
||||
11
public/fileadmin/templates/ext/news/Templates/News/List.ical
Normal file
11
public/fileadmin/templates/ext/news/Templates/News/List.ical
Normal file
@@ -0,0 +1,11 @@
|
||||
{namespace n=Tx_News_ViewHelpers}BEGIN:VCALENDAR
|
||||
VERSION:2.0
|
||||
PRODID:-//TYPO3/NONSGML News system (news)//EN
|
||||
<f:if condition="{news}"><f:for each="{news}" as="newsItem">BEGIN:VEVENT
|
||||
UID:news-{newsItem.uid}@{settings.domain}
|
||||
DTSTAMP:<n:format.date format="%Y%m%dT%H%M%S%Z" strftime="1">{newsItem.tstamp}</n:format.date>
|
||||
DTSTART:<n:format.date format="%Y%m%dT%H%M%S%Z" strftime="1">{newsItem.datetime}</n:format.date>
|
||||
DTEND:<n:format.date format="%Y%m%dT%H%M%S%Z" strftime="1"><f:if condition="{newsItem.archive}"><f:then>{newsItem.archive}</f:then><f:else>{newsItem.datetime}</f:else></f:if></n:format.date>
|
||||
SUMMARY:<n:format.hsc>{newsItem.title}</n:format.hsc>
|
||||
END:VEVENT
|
||||
</f:for></f:if>END:VCALENDAR
|
||||
31
public/fileadmin/templates/ext/news/Templates/News/List.xml
Normal file
31
public/fileadmin/templates/ext/news/Templates/News/List.xml
Normal file
@@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
{namespace n=Tx_News_ViewHelpers}<rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
|
||||
<channel>
|
||||
<title>{settings.list.rss.channel.title}</title>
|
||||
<link>{settings.list.rss.channel.link}</link>
|
||||
<description>{settings.list.rss.channel.description}</description>
|
||||
<language>{settings.list.rss.channel.language}</language>
|
||||
<f:if condition="{settings.list.rss.channel.copyright}">
|
||||
<copyright>{settings.list.rss.channel.copyright}</copyright>
|
||||
</f:if>
|
||||
<pubDate><n:format.date format="r" currentDate="1" strftime="0" /></pubDate>
|
||||
<lastBuildDate><n:format.date format="r" currentDate="1" strftime="0" /></lastBuildDate>
|
||||
<f:if condition="{settings.list.rss.channel.category}">
|
||||
<category>{settings.list.rss.channel.category}</category>
|
||||
</f:if>
|
||||
<atom:link href="<f:format.htmlentities><f:uri.page pageType="9818"/></f:format.htmlentities>" rel="self" type="application/rss+xml" />
|
||||
<generator>{settings.list.rss.channel.generator}</generator>
|
||||
<f:if condition="{news}">
|
||||
<f:for each="{news}" as="newsItem">
|
||||
<item>
|
||||
<guid isPermaLink="false">news-{newsItem.uid}</guid>
|
||||
<pubDate><n:format.date format="r" strftime="0">{newsItem.datetime}</n:format.date></pubDate>
|
||||
<title><n:format.hsc>{newsItem.title}</n:format.hsc></title>
|
||||
<link><f:format.htmlentities><n:link newsItem="{newsItem}" settings="{settings}" uriOnly="1" /></f:format.htmlentities></link>
|
||||
<description><n:format.hsc><n:format.striptags>{newsItem.teaser}</n:format.striptags></n:format.hsc></description>
|
||||
<content:encoded><f:format.cdata><f:format.html>{newsItem.bodytext}</f:format.html></f:format.cdata></content:encoded>
|
||||
</item>
|
||||
</f:for>
|
||||
</f:if>
|
||||
</channel>
|
||||
</rss>
|
||||
@@ -0,0 +1,31 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
<f:layout name="General" />
|
||||
<!--
|
||||
=====================
|
||||
Templates/News/SearchForm.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<div class="news-search-form">
|
||||
<f:form object="{search}" name="search" pageUid="{settings.listPid}">
|
||||
<fieldset>
|
||||
<div class="form-group">
|
||||
<label for="news-subject"><f:translate key="search-subject" /></label>
|
||||
<f:form.textfield id="news-subject" property="subject" class="form-control"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="news-minimumDate"><f:translate key="search-minimumDate" /></label>
|
||||
<f:form.textfield id="news-minimumDate" property="minimumDate" type="date" class="form-control"/>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="news-maximumDate"><f:translate key="search-maximumDate" /></label>
|
||||
<f:form.textfield id="news-maximumDate" property="maximumDate" type="date" class="form-control"/>
|
||||
</div>
|
||||
|
||||
<f:form.submit value="{f:translate(key:'search-start')}" class="btn btn-default"/>
|
||||
</fieldset>
|
||||
</f:form>
|
||||
</div>
|
||||
</f:section>
|
||||
@@ -0,0 +1,28 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
<f:layout name="General" />
|
||||
<!--
|
||||
=====================
|
||||
Templates/News/SearchResult.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<div class="news-search-result">
|
||||
<f:if condition="{search}">
|
||||
<f:if condition="{news}">
|
||||
<f:then>
|
||||
<div class="count-msg">
|
||||
<f:translate key="search-text" arguments="{0:'{f:count(subject:news)}',1:search.subject}" />
|
||||
</div>
|
||||
<f:for each="{news}" as="newsItem">
|
||||
<f:render partial="List/Item" arguments="{newsItem: newsItem, settings:settings, className:className, view:'list'}" />
|
||||
</f:for>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<div class="no-news-found">
|
||||
<f:translate key="search-noresult" />
|
||||
</div>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
</div>
|
||||
</f:section>
|
||||
31
public/fileadmin/templates/ext/news/Templates/Tag/List.html
Normal file
31
public/fileadmin/templates/ext/news/Templates/Tag/List.html
Normal file
@@ -0,0 +1,31 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
<f:layout name="General" />
|
||||
|
||||
<!--
|
||||
=====================
|
||||
Templates/Tag/List.html
|
||||
-->
|
||||
|
||||
<f:section name="content">
|
||||
<f:if condition="{tags}">
|
||||
<ul class="news-tags">
|
||||
<f:for each="{tags}" as="tag">
|
||||
<li>
|
||||
<f:if condition="{tag.uid} == {overwriteDemand.tags}">
|
||||
<f:then>
|
||||
<f:link.page class="active" pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
|
||||
{tag.title}
|
||||
</f:link.page>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:link.page pageUid="{settings.listPid}" additionalParams="{tx_news_pi1:{overwriteDemand:{tags: tag}}}">
|
||||
{tag.title}
|
||||
</f:link.page>
|
||||
</f:else>
|
||||
</f:if>
|
||||
|
||||
</li>
|
||||
</f:for>
|
||||
</ul>
|
||||
</f:if>
|
||||
</f:section>
|
||||
@@ -0,0 +1,15 @@
|
||||
<a href="{url}" style="display:block;width:{width}px;height:{height}px;" id="{uniqueDivId}"></a>
|
||||
<script type="text/javascript">
|
||||
flowplayer("{uniqueDivId}", "typo3conf/ext/news/Resources/Public/JavaScript/Contrib/flowplayer-3.2.16.swf", <![CDATA[{
|
||||
clip:{
|
||||
autoPlay:false,
|
||||
autoBuffering:true
|
||||
},
|
||||
plugins:{
|
||||
controls:{
|
||||
volume:true
|
||||
}
|
||||
}
|
||||
});
|
||||
]]>
|
||||
</script>
|
||||
@@ -0,0 +1,94 @@
|
||||
{namespace n=Tx_News_ViewHelpers}
|
||||
|
||||
<f:if condition="{configuration.insertAbove}">
|
||||
<f:render section="paginator" arguments="{pagination: pagination,configuration:configuration}" />
|
||||
</f:if>
|
||||
|
||||
<f:renderChildren arguments="{contentArguments}" />
|
||||
|
||||
<f:if condition="{configuration.insertBelow}">
|
||||
<f:render section="paginator" arguments="{pagination: pagination,configuration:configuration}" />
|
||||
</f:if>
|
||||
|
||||
<f:section name="paginator">
|
||||
<f:if condition="{pagination.numberOfPages} > 1">
|
||||
<f:if condition="{settings.list.paginate}">
|
||||
<f:if condition="{pagination.previousPage}">
|
||||
<f:if condition="{pagination.previousPage} > 1">
|
||||
<f:then>
|
||||
<n:headerData><link rel="prev" href="<f:widget.uri arguments="{currentPage: pagination.previousPage}" />" /></n:headerData>
|
||||
</f:then>
|
||||
<f:else>
|
||||
<n:headerData><link rel="prev" href="<f:widget.uri />" /></n:headerData>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
<f:if condition="{pagination.nextPage}">
|
||||
<n:headerData><link rel="next" href="<f:widget.uri arguments="{currentPage: pagination.nextPage}" />" /></n:headerData>
|
||||
</f:if>
|
||||
</f:if>
|
||||
|
||||
<!--
|
||||
<p>
|
||||
<f:translate key="paginate_overall" arguments="{0:pagination.current,1:pagination.numberOfPages}" />
|
||||
</p>
|
||||
-->
|
||||
<br>
|
||||
<div class="clearfix num_bar">
|
||||
|
||||
<f:if condition="{pagination.previousPage}">
|
||||
<f:if condition="{pagination.previousPage} > 1">
|
||||
<f:then>
|
||||
<f:widget.link arguments="{currentPage: pagination.previousPage}">
|
||||
<i class="fa fa-caret-left"></i>
|
||||
<f:translate key="paginate_previous" />
|
||||
</f:widget.link> |
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:widget.link>
|
||||
<i class="fa fa-caret-left"></i>
|
||||
<f:translate key="paginate_previous" />
|
||||
</f:widget.link> |
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:if>
|
||||
<f:if condition="{pagination.displayRangeStart} > 1">
|
||||
<f:widget.link>1</f:widget.link> |
|
||||
</f:if>
|
||||
<f:if condition="{pagination.hasLessPages}">
|
||||
.... |
|
||||
</f:if>
|
||||
<f:for each="{pagination.pages}" as="page">
|
||||
<f:if condition="{page.isCurrent}">
|
||||
<f:then>
|
||||
<f:widget.link class="current">{page.number}</f:widget.link> |
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:if condition="{page.number} > 1">
|
||||
<f:then>
|
||||
<f:widget.link arguments="{currentPage: page.number}">{page.number}</f:widget.link> |
|
||||
</f:then>
|
||||
<f:else>
|
||||
<f:widget.link>{page.number}</f:widget.link> |
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:else>
|
||||
</f:if>
|
||||
</f:for>
|
||||
<f:if condition="{pagination.hasMorePages}">
|
||||
.... |
|
||||
</f:if>
|
||||
<f:if condition="{pagination.displayRangeEnd} < {pagination.numberOfPages}">
|
||||
<f:widget.link arguments="{currentPage: pagination.numberOfPages}">{pagination.numberOfPages}</f:widget.link>
|
||||
</f:if>
|
||||
<f:if condition="{pagination.nextPage}">
|
||||
<f:widget.link arguments="{currentPage: pagination.nextPage}">
|
||||
<f:translate key="paginate_next" />
|
||||
<i class="fa fa-caret-right"></i>
|
||||
</f:widget.link>
|
||||
</f:if>
|
||||
|
||||
</div>
|
||||
|
||||
</f:if>
|
||||
</f:section>
|
||||
Reference in New Issue
Block a user