Савинцев Егор 🚶 (savintsev_egor) wrote in changelog,
Савинцев Егор 🚶
savintsev_egor
changelog

[livejournal] r19684: LJSUP-9404: Anchors

Committer: esavintcev
LJSUP-9404: Anchors
U   trunk/bin/upgrading/s2layers/tabularindent/layout.s2
Modified: trunk/bin/upgrading/s2layers/tabularindent/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/tabularindent/layout.s2	2011-08-10 08:07:46 UTC (rev 19683)
+++ trunk/bin/upgrading/s2layers/tabularindent/layout.s2	2011-08-10 08:21:37 UTC (rev 19684)
@@ -591,7 +591,7 @@
     if ($footer) {
         #TODO - rewrite with this.save
         print  "<tr><td style='white-space: nowrap'>$*text_left_comments";
-        $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment});
+        $p->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment, "reply_url" => $e.comments.post_url+"#$*text_addcomment_id"});
         " $footer";
         
         if ($p.view == "entry")
@@ -669,9 +669,14 @@
     print_box_close($footer, $e);
 }
 
+function print_header (string header, string header_id)
+{
+    print safe "<h3 class='page-header'" + ($header_id != "" ? "id='$header_id'" : "") + ">$header</h3>";
+}
+
 function print_header (string header)
 {
-    print safe "<h3 class='page-header'>$header</h3>";
+    print_header($header, "");
 }
 
 function print_genericbox_open () {
@@ -763,7 +768,7 @@
         $footer = $footer + "$*text_left_comments";
         if ($e.comments.show_readlink) {
             $footer = $footer +
-                      "<a href=\"$e.comments.read_url\">" +
+                      "<a href=\"$e.comments.read_url#$*text_comments_id\">" +
                       get_plural_phrase($e.comments.count, $p.view == "friends" ? "text_read_comments_friends" : "text_read_comments") +
                       "</a>";
         }
@@ -782,7 +787,7 @@
                     $footer = "";
                 } else {
                     $footer = $footer +
-                        "<a href=\"$e.comments.post_url\">" +
+                        "<a href=\"$e.comments.post_url#$*text_addcomment_id\">" +
                         ($p.view == "friends" ? $*text_post_comment_friends : $*text_post_comment) +
                         "</a>";
                 }
@@ -998,12 +1003,12 @@
     {
         $this->print_multiform_start();
 
-        print_header("Comments:");
+        print_header("Comments:", $*text_comments_id);
 	if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
 		if ($p.showspam) {
 		    print """<p width='95%' style='text-align:center;'>""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</p>""";
 		} else {
-		    print """<p width='95%' style='text-align:center;'><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></p>""";
+		    print """<p width='95%' style='text-align:center;'><a href=\"$e.comments.read_spam_url#$*text_comments_id\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></p>""";
 		}
 	}
         if ($.comment_pages.total_subitems > 0) {
@@ -1166,7 +1171,7 @@
     }
     print_ebox($.entry);
 
-    print_header("Reply:");
+    print_header("$*text_post_comment:", $*text_addcomment_id);
 
     print_genericbox_open();
     $.form->print();

Tags: livejournal, s2, savintsev_egor
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