Андрей (andy) wrote in changelog,
Андрей
andy
changelog

[ljcom] r9580: LJSUP-6941 (Add indentation between 10th...

Committer: ailyin
LJSUP-6941 (Add indentation between 10th tweet and "Read more")
U   trunk/cgi-bin/LJ/TwitterDigest.pm
U   trunk/templates/TwitterDigest.tmpl
Modified: trunk/cgi-bin/LJ/TwitterDigest.pm
===================================================================
--- trunk/cgi-bin/LJ/TwitterDigest.pm	2010-10-01 10:02:01 UTC (rev 9579)
+++ trunk/cgi-bin/LJ/TwitterDigest.pm	2010-10-01 10:24:06 UTC (rev 9580)
@@ -264,13 +264,19 @@
     @tweets_display =
         splice @tweets_under_cut, 0, $LJ::TWITTER_DIGEST_CUT_AFTER;
 
+    my @tweets_chunks;
+    while (@tweets_under_cut) {
+        my @chunk = splice @tweets_under_cut, 0, $LJ::TWITTER_DIGEST_CUT_AFTER;
+        push @tweets_chunks, { 'chunk' => \@chunk };
+    }
+
     my $template = LJ::HTML::Template->new(
         'filename' => 'templates/TwitterDigest.tmpl',
     );
 
     $template->param(
         'tweets'            => \@tweets_display,
-        'tweets_under_cut'  => \@tweets_under_cut,
+        'tweets_under_cut'  => \@tweets_chunks,
     );
 
     my $evt = $template->output;

Modified: trunk/templates/TwitterDigest.tmpl
===================================================================
--- trunk/templates/TwitterDigest.tmpl	2010-10-01 10:02:01 UTC (rev 9579)
+++ trunk/templates/TwitterDigest.tmpl	2010-10-01 10:24:06 UTC (rev 9580)
@@ -9,13 +9,15 @@
 
 <TMPL_IF tweets_under_cut>
     <lj-cut>
-        <ul>
-            <TMPL_LOOP tweets_under_cut>
-                <li>
-                    <a href="<TMPL_VAR url>"><em><TMPL_VAR time></em></a>:
-                    <TMPL_VAR text>
-                </li>
-            </TMPL_LOOP>
-        </ul>
+        <TMPL_LOOP tweets_under_cut>
+            <ul>
+                <TMPL_LOOP chunk>
+                    <li>
+                        <a href="<TMPL_VAR url>"><em><TMPL_VAR time></em></a>:
+                        <TMPL_VAR text>
+                    </li>
+                </TMPL_LOOP>
+            </ul>
+        </TMPL_LOOP>
     </lj-cut>
 </TMPL_IF>

Tags: andy, ljcom, pm, tmpl
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments