Fixed bug #14212: Better styling of BE login news (thanks to Georg Ringer)
authorSteffen Kamper <info@sk-typo3.de>
Fri, 30 Apr 2010 10:28:33 +0000 (10:28 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Fri, 30 Apr 2010 10:28:33 +0000 (10:28 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7456 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/index.php
typo3/sysext/t3skin/templates/login.html

index fde538a..1108763 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-04-30  Steffen Kamper  <info@sk-typo3.de>
 
+       * Fixed bug #14212: Better styling of BE login news (thanks to Georg Ringer)
        * Fixed bug #14116: Selecting/deselecting all records does not work with translated records (thanks to Reinhard F├╝hricht)
 
 2010-04-29  Jeff Segars  <jeff@webempoweredchurch.org>
index 5b14a54..8dfca62 100644 (file)
@@ -566,12 +566,22 @@ class SC_index {
                        $newsItemTemplate = t3lib_parsehtml::getSubpart($newsContent, '###NEWS_ITEM###');
 
                        $newsItemContent = '';
+                       $count = 1;
                        foreach ($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'] as $newsItem) {
+                               $additionalClass = '';
+                               if ($count == 1) {
+                                       $additionalClass = ' first-item';
+                               } elseif($count == count($GLOBALS['TYPO3_CONF_VARS']['BE']['loginNews'])) {
+                                       $additionalClass = ' last-item';
+                               }
                                $newsItemMarker = array(
                                        '###HEADER###'  => htmlspecialchars($newsItem['header']),
                                        '###DATE###'    => htmlspecialchars($newsItem['date']),
-                                       '###CONTENT###' => trim($newsItem['content'])
+                                       '###CONTENT###' => trim($newsItem['content']),
+                                       '###CLASS###'   => $additionalClass
                                );
+                               
+                               $count++;
                                $newsItemContent .= t3lib_parsehtml::substituteMarkerArray($newsItemTemplate, $newsItemMarker);
                        }
 
index a35b559..22cd661 100644 (file)
@@ -62,7 +62,7 @@
        <div class="t3-login-box-body">
                <dl id="t3-login-news">
                        <!-- ###NEWS_ITEM### begin -->
-                       <div class="t3-login-news-item">
+                       <div class="t3-login-news-item###CLASS###">
                                <dt>
                                        <span class="t3-news-date">###DATE###: </span>
                                        <span class="t3-news-title">###HEADER###</span>