Снорк (nely_snork) wrote in changelog,
Снорк
nely_snork
changelog

[ljcom] r8241: LJSV-605: Add "lock comments" feature to...

Committer: narefieva
LJSV-605: Add "lock comments" feature to community journals.
U   trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
U   trunk/bin/upgrading/s2layers/voxhtml/layout.s2
Modified: trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2	2010-03-03 11:36:04 UTC (rev 8240)
+++ trunk/bin/upgrading/s2layers/flexiblesquares/layout.s2	2010-03-03 12:22:20 UTC (rev 8241)
@@ -1996,7 +1996,7 @@
             if ($k == "mood" and defined $.mood_icon)
                 {
                 var Image i = $.mood_icon;
-                $val = $i->as_string_ex($i.alttext, "align='middle' ") + $val;
+                $val = "<img src='$i.url' width='$i.width' height='$i.height' align='middle' alt='' /> $val";
                 }
             $currents = $currents + """<div class="current$k"><strong>$text:</strong> $val</div>""";
         }
@@ -2086,7 +2086,11 @@
         $comments_count = get_plural_phrase($.entry.comments.count, "text_read_comments");
     }
     if ($.entry.comments.count > 0) {
-        $comments_count = """$comments_count — """;
+		if (not $.entry.comments.locked) {
+        	$comments_count = """$comments_count — """;
+		} else {
+			$comments_count = """$comments_count""";
+		}
     } else {
         $comments_count = "";
     }
@@ -2100,7 +2104,9 @@
              $.comment_pages->print();
             """
             <b>( $comments_count""";
-            $this->print_reply_link({"target" => "topcomment", "linktext" => "Post a new comment"});
+			if (not $.entry.comments.locked) {
+            	$this->print_reply_link({"target" => "topcomment", "linktext" => "Post a new comment"});
+			}
             """ )</b></center>""";
             $this->print_reply_container({"target" => "topcomment"});
             $this->print_comments($.comments);
@@ -2116,7 +2122,11 @@
         $this->print_multiform_end();
             """
             <center>
-            <b>( $comments_count<a href="$.entry.comments.post_url">Post a new comment</a> )</b>""";
+            <b>( $comments_count""";
+			if (not $.entry.comments.locked) {
+            	$this->print_reply_link({"target" => "topcomment", "linktext" => "Post a new comment"});
+			}
+            """ )</b>""";
             $.comment_pages->print();
             """
                <br />
@@ -2369,9 +2379,13 @@
     if (not $.enabled) { return; }
     if ($.count > 0 or $.screened) {
         $this->print_readlink();
-        " | ";
+		if (not $.locked) {
+			" | ";
+		}
     }
-    $this->print_postlink();
+	if (not $.locked) {
+    	$this->print_postlink();
+	}
 }
 
 

Modified: trunk/bin/upgrading/s2layers/voxhtml/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2010-03-03 11:36:04 UTC (rev 8240)
+++ trunk/bin/upgrading/s2layers/voxhtml/layout.s2	2010-03-03 12:22:20 UTC (rev 8241)
@@ -1942,7 +1942,11 @@
             $comments_count = get_plural_phrase($.entry.comments.count, "text_read_comments");
         }
         if ($.entry.comments.count > 0) {
-            $comments_count = """$comments_count — """;
+			if (not $.entry.comments.locked) {
+				$comments_count = """$comments_count — """;
+			} else {
+				$comments_count = """$comments_count""";
+			}
         } else {
             $comments_count = "";
         }
@@ -1953,7 +1957,11 @@
             <h2 class="comments-header page-header2">$*text_comments</h2>
             <div class="comments-body">
               <div class="comments-nav">
-                ( $comments_count"""; $this->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment}); """ )""";
+                ( $comments_count""";
+	if (not $.entry.comments.locked) { 
+		$this->print_reply_link({"target" => "topcomment", "linktext" => $*text_post_comment}); 
+	}
+	""" ) """;
     $this->print_reply_container({"target" => "topcomment"});
     """</div>""";
 
@@ -1982,7 +1990,11 @@
 
 """
               <div class="comments-nav">
-                ( $comments_count"""; $this->print_reply_link({"target" => "bottomcomment", "linktext" => $*text_post_comment}); """ )""";
+                ( $comments_count""";
+	if (not $.entry.comments.locked) {
+		$this->print_reply_link({"target" => "bottomcomment", "linktext" => $*text_post_comment});
+	}
+	""" )""";
     $this->print_reply_container({"target" => "bottomcomment"});
 
 """

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

  • 2 comments