Updated templates and objects to latest version of the news extension
authorjdegroot <jdegroot@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 14 May 2014 08:43:45 +0000 (08:43 +0000)
committerjdegroot <jdegroot@735d13b6-9817-0410-8766-e36946ffe9aa>
Wed, 14 May 2014 08:43:45 +0000 (08:43 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/roq_newsevent/branches/3.0.0@85254 735d13b6-9817-0410-8766-e36946ffe9aa

14 files changed:
Classes/Controller/EventController.php
Classes/Domain/Repository/EventRepository.php
Resources/Private/Partials/Detail/FalMediaContainer.html [new file with mode: 0644]
Resources/Private/Partials/Detail/FalMediaImage.html [new file with mode: 0644]
Resources/Private/Partials/Detail/FalMediaVideo.html [new file with mode: 0644]
Resources/Private/Partials/Detail/MediaContainer.html
Resources/Private/Partials/Detail/MediaDam.html [deleted file]
Resources/Private/Partials/Detail/MediaHtml.html [deleted file]
Resources/Private/Partials/Detail/MediaImage.html
Resources/Private/Partials/Detail/MediaVideo.html
Resources/Private/Partials/Detail/Opengraph.html
Resources/Private/Partials/EventList/Item.html
Resources/Private/Templates/News/EventList.html
ext_emconf.php

index 4b7c741..95f95f7 100644 (file)
@@ -189,6 +189,8 @@ class Tx_RoqNewsevent_Controller_EventController extends Tx_News_Controller_News
 
         $newsRecords = $this->eventRepository->findDemanded($demand);
 
+        //$this->view->setTemplatePathAndFilename('/var/www/sites/jochem/typo62.lan/html/typo3conf/ext/roq_newsevent/Resources/Private/Templates/News/EventList.html');
+
         $this->view->assignMultiple(array(
             'news' => $newsRecords,
             'overwriteDemand' => $overwriteDemand,
index 3f6e8dd..091798d 100644 (file)
@@ -64,7 +64,11 @@ class Tx_RoqNewsevent_Domain_Repository_EventRepository extends Tx_News_Domain_R
             );
         }
 
-            // archived
+        if ($demand->getAuthor()) {
+            $constraints[] = $query->equals('author', $demand->getAuthor());
+        }
+
+        // archived
         if ($demand->getArchiveRestriction() == 'archived') {
             $constraints[] = $query->logicalNot($this->createIsActiveConstraint($query));
             // non-archived (active)
@@ -72,26 +76,75 @@ class Tx_RoqNewsevent_Domain_Repository_EventRepository extends Tx_News_Domain_R
             $constraints[] = $this->createIsActiveConstraint($query);
         }
 
-            // top news
+        // Time restriction greater than or equal
+        $timeRestrictionField = $demand->getDateField();
+        $timeRestrictionField = (empty($timeRestrictionField)) ? 'datetime' : $timeRestrictionField;
+
+        if ($demand->getTimeRestriction()) {
+            $timeLimit = 0;
+            // integer = timestamp
+            if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($demand->getTimeRestriction())) {
+                $timeLimit = $GLOBALS['EXEC_TIME'] - $demand->getTimeRestriction();
+            } else {
+                // try to check strtotime
+                $timeFromString = strtotime($demand->getTimeRestriction());
+
+                if ($timeFromString) {
+                    $timeLimit = $timeFromString;
+                } else {
+                    throw new Exception('Time limit Low could not be resolved to an integer. Given was: ' . htmlspecialchars($timeLimit));
+                }
+            }
+
+            $constraints[] = $query->greaterThanOrEqual(
+                $timeRestrictionField,
+                $timeLimit
+            );
+        }
+
+        // Time restriction less than or equal
+        if ($demand->getTimeRestrictionHigh()) {
+            $timeLimit = 0;
+            // integer = timestamp
+            if (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($demand->getTimeRestrictionHigh())) {
+                $timeLimit = $GLOBALS['EXEC_TIME'] + $demand->getTimeRestrictionHigh();
+            } else {
+                // try to check strtotime
+                $timeFromString = strtotime($demand->getTimeRestrictionHigh());
+
+                if ($timeFromString) {
+                    $timeLimit = $timeFromString;
+                } else {
+                    throw new Exception('Time limit High could not be resolved to an integer. Given was: ' . htmlspecialchars($timeLimit));
+                }
+            }
+
+            $constraints[] = $query->lessThanOrEqual(
+                $timeRestrictionField,
+                $timeLimit
+            );
+        }
+
+        // top news
         if ($demand->getTopNewsRestriction() == 1) {
             $constraints[] = $query->equals('istopnews', 1);
         } elseif ($demand->getTopNewsRestriction() == 2) {
             $constraints[] = $query->equals('istopnews', 0);
         }
 
-            // storage page
+        // storage page
         if ($demand->getStoragePage() != 0) {
-            $pidList = t3lib_div::intExplode(',', $demand->getStoragePage(), TRUE);
-            $constraints[]  = $query->in('pid', $pidList);
+            $pidList = \TYPO3\CMS\Core\Utility\GeneralUtility::intExplode(',', $demand->getStoragePage(), TRUE);
+            $constraints[] = $query->in('pid', $pidList);
         }
 
-            // month & year OR year only
+        // month & year OR year only
         if ($demand->getYear() > 0) {
             if (is_null($demand->getDateField())) {
                 throw new InvalidArgumentException('No Datefield is set, therefore no Datemenu is possible!');
             }
             if ($demand->getMonth() > 0) {
-                if (method_exists($demand, 'getDay') && ($demand->getDay() > 0)) {
+                if ($demand->getDay() > 0) {
                     $begin = mktime(0, 0, 0, $demand->getMonth(), $demand->getDay(), $demand->getYear());
                     $end = mktime(23, 59, 59, $demand->getMonth(), $demand->getDay(), $demand->getYear());
                 } else {
@@ -103,40 +156,35 @@ class Tx_RoqNewsevent_Domain_Repository_EventRepository extends Tx_News_Domain_R
                 $end = mktime(23, 59, 59, 12, 31, $demand->getYear());
             }
             $constraints[] = $query->logicalAnd(
-                    $query->greaterThanOrEqual($demand->getDateField(), $begin),
-                    $query->lessThanOrEqual($demand->getDateField(), $end)
-                );
+                $query->greaterThanOrEqual($demand->getDateField(), $begin),
+                $query->lessThanOrEqual($demand->getDateField(), $end)
+            );
         }
 
-            // Tags
-        if ($demand->getTags()) {
-            $constraints[] = $query->contains('tags', $demand->getTags());
-        }
+        // Tags
+        $tags = $demand->getTags();
+        if ($tags) {
+            $tagList = explode(',', $tags);
 
-            // dummy records, used for UnitTests only!
-        if ($demand->getIsDummyRecord()) {
-            $constraints[] = $query->equals('isDummyRecord', 1);
+            foreach ($tagList as $singleTag) {
+                $constraints[] = $query->contains('tags', $singleTag);
+            }
         }
 
-            // Search
-        if ($demand->getSearch() !== NULL) {
-            /* @var $searchObject Tx_News_Domain_Model_Dto_Search */
-            $searchObject = $demand->getSearch();
-
-            $searchFields = t3lib_div::trimExplode(',', $searchObject->getFields(), TRUE);
-            $searchConstraints = array();
-
-            if (count($searchFields) === 0) {
-                throw new UnexpectedValueException('No search fields defined', 1318497755);
-            }
+        // Search
+        $searchConstraints = $this->getSearchConstraints($query, $demand);
+        if (!empty($searchConstraints)) {
+            $constraints[] = $query->logicalAnd($searchConstraints);
+        }
 
-            $searchSubject = $searchObject->getSubject();
-            foreach($searchFields as $field) {
-                if (!empty($searchSubject)) {
-                $searchConstraints[] = $query->like($field, '%' . $searchSubject . '%');
-                }
-            }
-            $constraints[] = $query->logicalOr($searchConstraints);
+        // Exclude already displayed
+        if ($demand->getExcludeAlreadyDisplayedNews() && isset($GLOBALS['EXT']['news']['alreadyDisplayed']) && !empty($GLOBALS['EXT']['news']['alreadyDisplayed'])) {
+            $constraints[] = $query->logicalNot(
+                $query->in(
+                    'uid',
+                    $GLOBALS['EXT']['news']['alreadyDisplayed']
+                )
+            );
         }
 
             // events only
diff --git a/Resources/Private/Partials/Detail/FalMediaContainer.html b/Resources/Private/Partials/Detail/FalMediaContainer.html
new file mode 100644 (file)
index 0000000..58d1062
--- /dev/null
@@ -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>
+
+
diff --git a/Resources/Private/Partials/Detail/FalMediaImage.html b/Resources/Private/Partials/Detail/FalMediaImage.html
new file mode 100644 (file)
index 0000000..eb83a9c
--- /dev/null
@@ -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:'{mediaElement.uid}' treatIdAsReference:1 maxWidth:'800')}">
+                               <f:image src="{mediaElement.uid}" treatIdAsReference="1" title="{mediaElement.originalResource.title}" alt="{mediaElement.originalResource.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.originalResource.title}" alt="{mediaElement.originalResource.alternative}" maxWidth="{settings.detail.media.image.maxWidth}" maxHeight="{settings.detail.media.image.maxHeight}" />
+               </f:else>
+       </f:if>
+</div>
+<f:if condition="{mediaElement.originalResource.description}">
+       <p class="news-img-caption">
+               {mediaElement.originalResource.description}
+       </p>
+</f:if>
\ No newline at end of file
diff --git a/Resources/Private/Partials/Detail/FalMediaVideo.html b/Resources/Private/Partials/Detail/FalMediaVideo.html
new file mode 100644 (file)
index 0000000..3baeb8c
--- /dev/null
@@ -0,0 +1,17 @@
+{namespace n=Tx_News_ViewHelpers}
+
+<div class="mediaelement">
+       <div class="mediaelement-video">
+               <n:mediaFactory classes="{settings.interfaces.falMedia.video}" element="{mediaElement}" width="{settings.detail.media.video.width}"
+                       height="{settings.detail.media.video.height}" />
+       </div>
+
+
+       <f:if condition="{mediaElement.originalResource.description}">
+               <div class="medialement-alternative-content">
+                       <p class="news-img-caption">
+                               {mediaElement.originalResource.description}
+                       </p>
+               </div>
+       </f:if>
+</div>
index 558dff7..f940b8a 100644 (file)
@@ -2,18 +2,14 @@
        <!-- media files -->
        <div class="news-img-wrap">
                <f:for each="{media}" as="mediaElement">
-                       <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>
-                       <f:if condition="{mediaElement.type} == 2">
-                               <f:render partial="Detail/MediaHtml" arguments="{mediaElement: mediaElement, settings:settings}"/>
-                       </f:if>
-                       <f:if condition="{mediaElement.type} == 3">
-                               <f:render partial="Detail/MediaDam" arguments="{mediaElement: mediaElement, settings:settings}"/>
-                       </f:if>
+                       <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>
diff --git a/Resources/Private/Partials/Detail/MediaDam.html b/Resources/Private/Partials/Detail/MediaDam.html
deleted file mode 100644 (file)
index 39b9877..0000000
+++ /dev/null
@@ -1,16 +0,0 @@
-{namespace n=Tx_News_ViewHelpers}
-
-<div class="mediaelement">
-       <n:format.dam as="dam" uid="{mediaElement.uid}">
-               <f:if condition="{settings.detail.media.image.lightbox}">
-                       <f:then>
-                               <a rel="{settings.detail.media.image.lightbox}" title="{dam.caption}" href="{f:uri.image(src:'{dam.file_path}{dam.file_name}' maxWidth:'800')}">
-                                       <f:image src="{dam.file_path}{dam.file_name}" title="{dam.title}"  alt="{dam.alt_text}" maxWidth="{settings.detail.media.image.maxWidth}" />
-                               </a>
-                       </f:then>
-                       <f:else>
-                               <f:image src="{dam.file_path}{dam.file_name}" title="{dam.title}"  alt="{dam.alt_text}" maxWidth="{settings.detail.media.image.maxWidth}" />
-                       </f:else>
-               </f:if>
-       </n:format.dam>
-</div>
\ No newline at end of file
diff --git a/Resources/Private/Partials/Detail/MediaHtml.html b/Resources/Private/Partials/Detail/MediaHtml.html
deleted file mode 100644 (file)
index faa3e64..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-<div>
-       <f:format.html>{mediaElement.content}</f:format.html>
-</div>
-<f:if condition="{mediaElement.title}">
-       <p class="news-img-caption">
-               {mediaElement.title}
-       </p>
-</f:if>
\ No newline at end of file
index 5af7fb9..81de80f 100644 (file)
@@ -2,11 +2,11 @@
        <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}" />
+                               <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}" />
+                       <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>
index 88aa0b0..adc9a2c 100644 (file)
@@ -2,7 +2,8 @@
 
 <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}"  />
+               <n:mediaFactory classes="{settings.interfaces.media.video}" element="{mediaElement}" width="{settings.detail.media.video.width}"
+                       height="{settings.detail.media.video.height}" />
        </div>
 
 
index 5e4a1b7..73b3c94 100644 (file)
@@ -7,14 +7,35 @@
 <n:metaTag property="og:type" content="{settings.opengraph.type}" />\r
 <n:metaTag property="og:url" content="" useCurrentDomain="1" />\r
 <n:metaTag property="og:site_name" content="{settings.opengraph.site_name}" />\r
-<f:if condition="{newsItem.firstImagePreview.image}">\r
-       <n:metaTag\r
-               property="og:image"\r
-               content="{f:uri.image(src:'uploads/tx_news/{newsItem.firstImagePreview.image}' maxWidth:'100')}"\r
-               forceAbsoluteUrl="1" />\r
+<f:if condition="{newsItem.firstFalImagePreview}">\r
+       <f:then>\r
+               <n:metaTag\r
+                       property="og:image"\r
+                       content="{f:uri.image(src:'{newsItem.firstFalImagePreview.uid}' treatIdAsReference:1 maxWidth:'500')}"\r
+                       forceAbsoluteUrl="1" />\r
+       </f:then>\r
+       <f:else>\r
+               <f:if condition="{newsItem.firstImagePreview.image}">\r
+                       <n:metaTag\r
+                                       property="og:image"\r
+                                       content="{f:uri.image(src:'uploads/tx_news/{newsItem.firstImagePreview.image}' maxWidth:'500')}"\r
+                                       forceAbsoluteUrl="1" />\r
+               </f:if>\r
+       </f:else>\r
 </f:if>\r
+\r
+<f:if condition="{newsItem.description}">\r
+       <f:then>\r
+               <n:metaTag name="description" content="{newsItem.description}" />\r
+               <n:metaTag property="og:description" content="{newsItem.description}" />\r
+       </f:then>\r
+       <f:else>\r
+               <n:metaTag name="description" content="{newsItem.teaser}" />\r
+               <n:metaTag property="og:description" content="{newsItem.teaser}" />\r
+       </f:else>\r
+</f:if>\r
+<n:metaTag name="keywords" content="{newsItem.keywords}" />\r
 <n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />\r
-<n:metaTag property="og:description" content="{newsItem.teaser}" />\r
 <n:metaTag property="fb:admins" content="{settings.opengraph.admins}" />\r
 <n:metaTag property="og:email" content="{settings.opengraph.email}" />\r
 <n:metaTag property="og:phone_number" content="{settings.opengraph.phone_number}" />\r
index b9a708b..e18768c 100644 (file)
                </h3>
        </div>
 
+       <f:if condition="{newsItem.falMedia}">
+               <!-- fal media preview element -->
+               <f:then>
+                       <div class="news-img-wrap">
+                               <f:if condition="{newsItem.falMediaPreviews}">
+                                       <f:then>
+                                               <e: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>
+                                               </e:link>
+                                       </f:then>
+                                       <f:else>
+                                               <f:if condition="{settings.displayDummyIfNoMedia}">
+                                                       <span class="no-media-element">
+                                                               <e: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}" />
+                                                               </e: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">
-                       <e:link newsItem="{newsItem}" settings="{settings}">
                                <f:if condition="{newsItem.mediaPreviews}">
                                        <f:then>
-                                               <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:if condition="{mediaElement.type} == 3">
-                                                               <n:format.dam as="dam" uid="{mediaElement.uid}">
-                                                                       <f:image src="{dam.file_path}{dam.file_name}" title="{dam.title}"  alt="{dam.alt_text}" maxWidth="{settings.detail.media.image.maxWidth}" />
-                                                               </n:format.dam>
-                                                       </f:if>
-                                               </f:alias>
+                        <e: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>
+                        </e:link>
                                        </f:then>
                                        <f:else>
                                                <f:if condition="{settings.displayDummyIfNoMedia}">
                                                        <span class="no-media-element">
-                                                                       <f:image
-                                                                               src="typo3conf/ext/news/Resources/Public/Images/dummy-preview-image.png"
-                                                                               title=""
-                                                                               alt=""
-                                                                               maxWidth="{settings.list.media.image.maxWidth}"
-                                                                               maxHeight="{settings.list.media.image.maxHeight}"
-                                                                       />
+                                                               <e: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}" />
+                                                               </e:link>
                                                        </span>
                                                </f:if>
                                        </f:else>
                                </f:if>
-                       </e:link>
+
                </div>
                </f:then>
                <f:else>
                                        <div class="news-img-wrap">
                                                <e:link newsItem="{newsItem}" settings="{settings}">
                                                        <span class="no-media-element">
-                                                               <f:image
-                                                                       src="typo3conf/ext/news/Resources/Public/Images/dummy-preview-image.png"
-                                                                       title=""
-                                                                       alt=""
-                                                                       maxWidth="{settings.list.media.image.maxWidth}"
-                                                                       maxHeight="{settings.list.media.image.maxHeight}"
-                                                               />
+                                                               <f:image src="{settings.list.media.dummyImage}" title="" alt="" maxWidth="{settings.list.media.image.maxWidth}" maxHeight="{settings.list.media.image.maxHeight}" />
                                                        </span>
                                                </e:link>
                                        </div>
                </f:else>
        </f:if>
 
+               </f:else>
+       </f:if>
+
+
        <!-- teaser text -->
        <div class="teaser-text">
                <f:if condition="{newsItem.teaser}">
             <f:then>
-                <f:format.html>{newsItem.teaser}</f:format.html>
+                               <f:format.html><f:format.crop maxCharacters="{settings.cropMaxCharacters}" respectWordBoundaries="1">{newsItem.teaser}</f:format.crop></f:format.html>
             </f:then>
             <f:else>
-                <f:format.html><f:format.crop maxCharacters="{settings.cropMaxCharacters}" respectWordBoundaries="true">{newsItem.bodytext}</f:format.crop></f:format.html>
+                               <f:format.html><f:format.crop maxCharacters="{settings.cropMaxCharacters}" respectWordBoundaries="1">{newsItem.bodytext}</f:format.crop></f:format.html>
             </f:else>
                </f:if>
 
         <span class="news-list-date">
             <f:render partial="Event/Item" arguments="{newsItem: newsItem, settings:settings}"/>
         </span>
+        
+        <div>
+        <e:link newsItem="{newsItem}" settings="{settings}" class="more">
+            <f:translate key="more-link" />
+        </e:link>
+        </div>
        </div>
 
        <!-- footer information -->
 
                        </span>
 
-                       <!-- first category -->
                        <f:if condition="{newsItem.firstCategory}">
-                               <span class="hidden">. </span>
+                       <!-- 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="hidden">. </span>
                                <span class="news-list-author">
                                        <f:translate key="author" arguments="{0:newsItem.author}"/>
                                </span>
index 77fef4b..f55ff44 100644 (file)
                <div class="news-list-view">
                        <f:if condition="{settings.hidePagination}">
                                <f:then>
-                                       <f:for each="{news}" as="newsItem">
-                                               <f:render partial="EventList/Item" arguments="{newsItem: newsItem, settings:settings}"/>
+                                               <f:for each="{news}" as="newsItem" iteration="iterator">
+                                                       <f:render partial="EventList/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}">
-                                               <f:for each="{paginatedNews}" as="newsItem">
-                                                       <f:render partial="EventList/Item" arguments="{newsItem: newsItem, settings:settings}"/>
+                                               <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="EventList/Item" arguments="{newsItem: newsItem,settings:settings,iterator:iterator}" />
                                                </f:for>
                                        </n:widget.paginate>
                                </f:else>
index e4835e3..dec7531 100644 (file)
@@ -15,7 +15,7 @@ $EM_CONF[$_EXTKEY] = array (
        'description' => 'Event extension based on the versatile news system extension and Extbase & Fluid. Supplies additional event functionality to news records.',
        'category' => 'plugin',
        'shy' => 0,
-       'version' => '2.1.3',
+       'version' => '3.0.0-dev',
        'dependencies' => 'extbase,fluid,news',
        'conflicts' => '',
        'priority' => '',
@@ -38,8 +38,8 @@ $EM_CONF[$_EXTKEY] = array (
                array (
                        'extbase' => '1.3',
                        'fluid' => '1.3',
-                       'typo3' => '4.5.0-6.1.99',
-                       'news' => '2.0.0',
+                       'typo3' => '6.2.1-6.2.99',
+                       'news' => '3.0.0',
                ),
                'conflicts' => 
                array (
@@ -53,4 +53,4 @@ $EM_CONF[$_EXTKEY] = array (
        ),
 );
 
-?>
\ No newline at end of file
+?>