Committer: esavintcev
LJSUP-9117: S2 ExpandU trunk/bin/upgrading/s2layers/3column/layout.s2 U trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2 U trunk/bin/upgrading/s2layers/component/layout.s2 U trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 U trunk/bin/upgrading/s2layers/nebula/layout.s2
Modified: trunk/bin/upgrading/s2layers/3column/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/3column/layout.s2 2011-06-20 03:42:18 UTC (rev 10661) +++ trunk/bin/upgrading/s2layers/3column/layout.s2 2011-06-20 06:58:31 UTC (rev 10662) @@ -691,7 +691,7 @@ # if ($c.thread_url != "" and defined $expand_link) { if ($c.thread_url != "") { # print " " + $c->expand_link() + $*t_divider; - $c->print_expand_collapse_links(); + " ("; $c->print_expand_collapse_links(); ")"; } print """</div></div></div></div>"""; ### $this->print_comments($c.replies); Modified: trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2 2011-06-20 03:42:18 UTC (rev 10661) +++ trunk/bin/upgrading/s2layers/anovelconundrum/layout.s2 2011-06-20 06:58:31 UTC (rev 10662) @@ -1183,7 +1183,9 @@ # if (defined $expand_link) { # " · " + $c->expand_link(); # } - $c->print_expand_collapse_links(); + if ($c.parent_url != "" and size $c.replies > 0) { + " · "; $c->print_expand_collapse_links(); + } } $c->print_linkbar(); if ($this.multiform_on) { @@ -1207,12 +1209,11 @@ if ($c.metadata{"poster_ip"}) { "(" + $c.metadata{"poster_ip"} + ") "; } if($subj) { """replied, <a href="$c.permalink_url">“$c.subject”</a>"""; } else { """posted <a href="$c.permalink_url">a reply</a>"""; } - "."; var Link expand_link = $c->get_link("expand_comments"); # if ($c.thread_url != "" and defined $expand_link) { if ($c.thread_url != "") { # " " + $c->expand_link(); - $c->print_expand_collapse_links(); + " · "; $c->print_expand_collapse_links(); } "</div>"; } Modified: trunk/bin/upgrading/s2layers/component/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/component/layout.s2 2011-06-20 03:42:18 UTC (rev 10661) +++ trunk/bin/upgrading/s2layers/component/layout.s2 2011-06-20 06:58:31 UTC (rev 10662) @@ -2806,7 +2806,7 @@ print_comment_content_top($c); "$content"; if ($c.thread_url != "") { - $c->print_expand_collapse_links(); + " ("; $c->print_expand_collapse_links(); ")"; } print_comment_content_bottom(); } @@ -2830,14 +2830,14 @@ function EntryPage::print_comment (Comment c) { var Page p = get_page(); + var int margin = ($c.depth - 1) * 25; """<div id="$c.dom_id">"""; """<a name="$c.anchor"></a>"""; if ($c.screened and not $c.full and not viewer_is_owner()) { - """<strong>$*text_comment_screened</strong>"""; + """<div style="margin:3px 0 3px """ + $margin + """px;"><strong>$*text_comment_screened</strong></div>"""; } elseif ($c.deleted) { - """<strong>$*text_comment_deleted</strong>"""; + """<div style="margin:3px 0 3px """ + $margin + """px;"><strong>$*text_comment_deleted</strong></div>"""; } elseif (($c.spam) and (not $p.showspam) and (not $c.can_marked_as_spam) and (size($c.replies) > 0)) { - var int margin = ($c.depth - 1) * 25; print "<div style=\"margin:3px 0 3px " + $margin + "px;border:1px solid #D6D6D6;\" class=\"entry\"><strong>$*text_spam_comment</strong></div>"; } elseif ($c.full) { $this->print_comment_full($c); @@ -2968,7 +2968,9 @@ if ($c.parent_url != "") { "(<a href=\"$c.parent_url\">Parent</a>) "; } if (($c.thread_url != "") and (not $c.spam)) { "(<a href=\"$c.thread_url\">Thread</a>) "; - $c->print_expand_collapse_links(); + if ($c.parent_url != "" and size $c.replies > 0) { + "("; $c->print_expand_collapse_links(); ")"; + } } if (not $c.frozen) { $c->print_reply_container({"class" => "quickreply"}); Modified: trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 2011-06-20 03:42:18 UTC (rev 10661) +++ trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2 2011-06-20 06:58:31 UTC (rev 10662) @@ -2363,7 +2363,9 @@ { """(<a href="$comment.thread_url">$*text_comment_thread</a>) """; var Link expand_link = $comment->get_link("expand_comments"); - $comment->print_expand_collapse_links(); + if ($comment.parent_url != "" and size $comment.replies > 0) { + "("; $comment->print_expand_collapse_links(); ") "; + } } @@ -2393,7 +2395,7 @@ var string poster = isnull $c.poster ? $*text_poster_anonymous : $c.poster->as_string(); print safe """<a href="$c.permalink_url">$subject</a> - $poster on $date"""; - $c->print_expand_collapse_links(); + " ("; $c->print_expand_collapse_links(); ")"; } # ----------------------------------- Modified: trunk/bin/upgrading/s2layers/nebula/layout.s2 =================================================================== --- trunk/bin/upgrading/s2layers/nebula/layout.s2 2011-06-20 03:42:18 UTC (rev 10661) +++ trunk/bin/upgrading/s2layers/nebula/layout.s2 2011-06-20 06:58:31 UTC (rev 10662) @@ -1716,7 +1716,9 @@ # if (defined $expand_link) { # println "(" + $c->expand_link() + ") "; # } - $c->print_expand_collapse_links(); + if ($c.parent_url != "" and size $c.replies > 0) { + "("; $c->print_expand_collapse_links(); ") "; + } } if (not $c.frozen) { $c->print_reply_container({"class" => "quickreply"}); @@ -1733,7 +1735,7 @@ # if ($c.thread_url != "" and defined $expand_link) { if ($c.thread_url != "") { # " "; $c->print_expand_link(); - $c->print_expand_collapse_links(); + " ("; $c->print_expand_collapse_links(); ")"; } }