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

[ljcom] r10670: LJSUP-8917: iPad Minimalism

Committer: esavintcev
LJSUP-8917: iPad Minimalism
U   trunk/bin/upgrading/s2layers/sup/themes.s2
Modified: trunk/bin/upgrading/s2layers/sup/themes.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sup/themes.s2	2011-06-21 02:53:03 UTC (rev 10669)
+++ trunk/bin/upgrading/s2layers/sup/themes.s2	2011-06-21 03:11:42 UTC (rev 10670)
@@ -566,7 +566,9 @@
                 </div>
             </div>
 """;
+    if ($.view == "recent") {
             _Sidebar();
+    }
 """
         </div>
         </div>
@@ -693,3 +695,163 @@
 """;
 }
 
+function ItemRange::print() {
+    if ($.all_subitems_displayed) { return; }
+    
+    """<ul class="comments-pages">""";
+    
+    var string url_prev = $this->url_of($.current - 1);
+    if ($.current != 1) {
+        """<li class="comments-pages-prev"><a href="$url_prev#comments" class="comments-pages-arr"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" /></a></li>""";
+    } else {
+        """<li class="comments-pages-prev comments-pages-prev-dis"><span class="comments-pages-arr"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&laquo;" /></span></li>""";
+    }
+    
+    foreach var int i (1..$.total) {
+        var string class_first = ($i == 1 ? " comments-pages-first" : "");
+        if ($i == $.current) {
+            """<li class="comments-pages-item comments-pages-current$class_first">$i</li>""";
+        }
+        else {
+            var string url_of = $this->url_of($i);
+            """<li class="comments-pages-item$class_first"><a href="$url_of#comments">$i</a></li>""";
+        }
+    }
+
+    var string url_next = $this->url_of($.current + 1);
+    if ($.current != $.total) {
+        """<li class="comments-pages-next"><a href="$url_next#comments" class="comments-pages-arr"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" /></a></li>""";
+    } else {
+        """<li class="comments-pages-next comments-pages-next-dis"><span class="comments-pages-arr"><img src="$*IMGDIR/spacer.gif" width="7" height="13" alt="&raquo;" /></span></li>""";
+    }
+    
+    """</ul>""";
+}
+
+
+function EntryPage::print_body {
+    var Page p = get_page();
+    var Entry e = $.entry;
+
+    _print_entry($e);
+    
+    if ($.entry.comments.enabled) {
+"""
+                    <div class="entry-wrap entry-comments" id="comments">
+                    <div class="entry">
+                        <div class="entry-text"><div class="entry-comments-text">
+""";
+        var string comments_count = string($e.comments.count);
+        if ($.viewing_thread or $p.showspam) {
+            var string toplink = (($.comment_pages.total > 1) ? ($.comment_pages->url_of($.comment_pages.current)) : $e.permalink_url) + "#comments";
+            $comments_count = """<a href="$toplink">"""+ get_plural_phrase($e.comments.count, "text_read_all_comments") +"""</a>""";
+        } else {
+            $comments_count = get_plural_phrase($e.comments.count, "text_read_comments");
+        }
+        if (not $.entry.comments.locked) {
+            $comments_count = """<span class="comments-count">$comments_count</span>""";
+        } else {
+            $comments_count = "";
+        }
+        var string comments_showspam = "";
+        if ($e.comments.spam_counter > 0 and $e.comments.read_spam_url != "") {
+            if ($p.showspam) {
+                $comments_showspam = """<br /><span class="comments-hidespam">""" + get_plural_phrase($e.comments.spam_counter, "text_read_spam_comments") + """</span>""";
+            } else {
+                $comments_showspam = """<br /><span class="comments-showspam"><a href=\"$e.comments.read_spam_url\">""" + get_plural_phrase($e.comments.spam_counter, "text_read_all_spam_comments") + """</a></span>""";
+            }
+        } else {
+            $comments_showspam = "";
+        }
+        """<div class="comments-links">$comments_count$comments_showspam</div>""";
+
+        if ($.comment_pages.total_subitems > 0) {
+            $.comment_pages->print();
+        }
+        
+        if (not $.entry.comments.locked) {
+            """
+            <div class="comments-reply">
+                <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "topcomment" });"""</p>
+                """;
+                """
+            </div>
+            """;
+            $this->print_reply_container({ "target" => "topcomment" });
+        }
+
+        if ($.comment_pages.total_subitems > 0) {
+            $this->print_multiform_start();
+
+            $this->print_comments($.comments);
+
+            $this->print_multiform_actionline();
+            $this->print_multiform_end();
+
+            if (not $.entry.comments.locked) { 
+                """
+                <div class="comments-reply">
+                    <p class="replylink">"""; $this->print_reply_link({ "linktext" => $*text_post_comment, "target" => "bottomcomment" });"""</p>
+                    """;
+                    """
+                </div>
+                """;
+                $this->print_reply_container({ "target" => "bottomcomment" });
+            }
+
+            $.comment_pages->print();
+        }
+
+"""
+                        </div></div>
+                    </div>
+                    </div>
+""";
+    }
+}
+
+function EntryPage::print_comment_full (Comment c) {
+    var Page p = get_page();
+    var string poster = defined $c.poster ? _user_print($c.poster, "microformatted") : "<em>$*text_poster_anonymous</em>";
+    var string evenodd = $c.depth % 2 ? "odd" : "even";
+    if (defined $c.userpic and $*comment_userpic_style != "off") {
+        var int w = $c.userpic.width;
+        var int h = $c.userpic.height;
+        """<div class="comment-head $evenodd"><div class="comment-upic"><img src="$c.userpic.url" width="$w" height="$h" alt="$c.userpic.alttext" /></div>""";
+    } else {
+        """<div class="comment-head $evenodd cwoup">""";
+    }
+    """<div class="comment-head-in">""";
+    if (defined $c.subject_icon or $c.subject != "") {
+        """<h3>$c.subject_icon $c.subject</h3>""";
+    }
+    """<p>$poster <a class="comment-permalink" href="$c.permalink_url">""" + $c->time_display() +    "</a>";
+    if ($this.multiform_on) {
+        print safe """ <label for="ljcomsel_$c.talkid">$*text_multiform_check</label>""";
+        $c->print_multiform_check();
+    }
+    $c->print_linkbar();
+    if ($c.metadata{"poster_ip"}) { " (" + $c.metadata{"poster_ip"} + ")"; }
+    "</p>";
+    "</div></div>";
+
+    """<div class="comment-text""" + (defined $c.userpic and $*comment_userpic_style != "off" ? "" : " comment-text-cwoup") + """\">"""; $c->print_text(); "</div>";
+    """<div class="comment-menu">""";
+    """<ul>""";
+    if ($c.frozen) {
+        print safe "<li>$*text_comment_frozen</li>";
+    } elseif($c.screened) {
+        var Link link = $c->get_link("unscreen_to_reply");
+        """<li><a class="unscreen-to-reply" href="$link.url" title="$link.caption">$link.caption</a></li>""";
+    } elseif ((not $c.spam) or ($p.showspam)) {
+        """<li>"""; $c->print_reply_link({"linktext" => $*text_comment_reply}); """</li>""";
+    }
+    if ($c.parent_url != "") { print safe """<li><a href="$c.parent_url">$*text_comment_parent</a></li>"""; }
+    if (($c.thread_url != "") and (not $c.spam)) {
+        print safe """<li><a href="$c.thread_url">$*text_comment_thread</a></li>""";
+        """<li>"""; $c->print_expand_collapse_links(); """</li>""";
+    }
+    """</ul>""";
+    """</div><div class="hr"><hr /></div>""";
+}
+

Tags: ljcom, 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