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

[ljcom] r12042: LJSUP-12150: New Repost feature (S2)

Committer: esavintcev
LJSUP-12150: New Repost feature (S2)
U   trunk/bin/upgrading/s2layers/3column/layout.s2
U   trunk/bin/upgrading/s2layers/component/layout.s2
U   trunk/bin/upgrading/s2layers/tranquilityii/layout.s2
Modified: trunk/bin/upgrading/s2layers/3column/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/3column/layout.s2	2012-05-31 13:09:39 UTC (rev 12041)
+++ trunk/bin/upgrading/s2layers/3column/layout.s2	2012-05-31 13:28:48 UTC (rev 12042)
@@ -134,6 +134,8 @@
     set i_untrackthread = "";
     property string i_trackingparent { des = "Icon: Parent Tracked"; note = "If you don't set this, a default image will be used."; }
     set i_trackingparent = "";
+    property string i_deleterepost { des = "Icon: Delete Repost"; note = "If you don't set this, a default image will be used."; }
+    set i_deleterepost = "";
 }
 
 propgroup text {
@@ -301,6 +303,7 @@
     if ($*i_trackthread == "")    { $*i_trackthread     = "$*IMGDIR/style/3column/trackcomments.gif"; } else { $*i_trackthread = clean_url($*i_trackthread); }
     if ($*i_untrackthread == "")  { $*i_untrackthread   = "$*IMGDIR/style/3column/untrackcomments.gif"; } else { $*i_untrackthread = clean_url($*i_untrackthread); }
     if ($*i_trackingparent == "") { $*i_trackingparent  = "$*IMGDIR/style/3column/trackingparent.gif"; } else { $*i_trackingparent = clean_url($*i_trackingparent); }
+    if ($*i_deleterepost == "") { $*i_deleterepost  = "$*IMGDIR/style/3column/deletecomment.gif"; } else { $*i_deleterepost = clean_url($*i_deleterepost); }
 
     if ($*control_strip_bgcolor.as_string == "") {
         $*control_strip_bgcolor = $*entries_bg;
@@ -718,6 +721,11 @@
         """width="$e.delayed_icon.width" height="$e.delayed_icon.height" """+
         """alt="$*text_icon_alt_delayed" title="$*text_icon_alt_delayed" class="i-posticon-flip" />""";
     }
+    if ($e.repost) {
+        $security = $security + """<img src="$e.repost_icon.url" align="right" """+
+        """width="$e.repost_icon.width" height="$e.repost_icon.height" """+
+        """alt="$*text_icon_alt_reposted" title="$*text_icon_alt_reposted" class="i-posticon-flip" />""";
+    }
 
     var UserLite name;
     var string pname;
@@ -790,9 +798,10 @@
 } else { "$e.subject"; }
 """
 </h1>
-<div class="aboutentry">$security $date ($time)
-""";
-
+<div class="aboutentry">$security $date ($time)""";
+    if ($e.reposted_by) {
+        """, <span class="entryrepost">$e.reposted_by</span>""";
+    }
     if(defined $e.mood_icon) {
         var Image i = $e.mood_icon;
         var string alttext = $e.metadata{"mood"};
@@ -822,7 +831,7 @@
         print safe """$comments_showspam""";
     }
     print safe """<a href="$e.permalink_url" title="$*t_perma"><img src="$*i_perma" border="0" alt="$*t_perma" title="$*t_perma" /></a>""";
-    var string{} my_captions = {"edit_entry" => "$*i_edit", "mem_add" => "$*i_mem", "edit_tags" => "$*i_tags", "watch_comments" => "$*i_tracknew", "unwatch_comments" => "$*i_untracknew", "share" => "$*i_share", "flag" => "$*i_flag"};
+    var string{} my_captions = {"edit_entry" => "$*i_edit", "mem_add" => "$*i_mem", "edit_tags" => "$*i_tags", "watch_comments" => "$*i_tracknew", "unwatch_comments" => "$*i_untracknew", "share" => "$*i_share", "flag" => "$*i_flag", "delete_repost" => "$*i_deleterepost"};
     var Link link;
 
     foreach var string key ($e.link_keyseq) {
@@ -1097,6 +1106,7 @@
         if ($e.poster.username != $e.journal.username) {
             $e.poster->print(); " ";
         }
+        if ($e.repost) {"$e.repost_icon ";}
         if ($e.sticky) {"$e.sticky_icon ";}
         if ($e.delayed) {"$e.delayed_icon ";}
         if ($e.security) {"$e.security_icon ";}

Modified: trunk/bin/upgrading/s2layers/component/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/component/layout.s2	2012-05-31 13:09:39 UTC (rev 12041)
+++ trunk/bin/upgrading/s2layers/component/layout.s2	2012-05-31 13:28:48 UTC (rev 12042)
@@ -2083,10 +2083,15 @@
     } else {
         $header = "$time " + $e.time->date_format("long");
     }
-    
+
+    if ($e.reposted_by) {
+        $header = $header + """, <span>$e.reposted_by</span> """;
+    }
+
     if ($e.security) { $header = $e.security_icon + " &nbsp; " + $header; }
     if ($e.sticky) { $header = $e.sticky_icon + " &nbsp; " + $header; }
     if ($e.delayed) { $header = $e.delayed_icon + " &nbsp; " + $header; }
+    if ($e.repost) { $header = $e.repost_icon + " &nbsp; " + $header; }
     var string link = ($p.view == "friends") ? $e.journal.username : "item";
 """
 
@@ -2566,6 +2571,7 @@
         if ($e.poster.username != $e.journal.username) {
             $e.poster->print(); " ";
         }
+        if ($e.repost) { "$e.repost_icon "; }
         if ($e.delayed) { "$e.delayed_icon "; }
         if ($e.sticky) { "$e.sticky_icon "; }
         if ($e.security) { "$e.security_icon"; }
@@ -3001,6 +3007,7 @@
     if ($.entry.security) { $posttime = $.entry.security_icon + " &nbsp; " + $posttime; }
     if ($.entry.sticky) { $posttime = $.entry.sticky_icon + " &nbsp; " + $posttime; }
     if ($.entry.delayed) { $posttime = $.entry.delayed_icon + " &nbsp; " + $posttime; }
+    if ($.entry.repost) { $posttime = $.entry.repost_icon + " &nbsp; " + $posttime; }
 
     var string subject = ($.replyto.subject ? "$.replyto.subject" : "");
     var string poster = defined $.replyto.poster ? $.replyto.poster->as_string() : "<i>(Anonymous)</i>";

Modified: trunk/bin/upgrading/s2layers/tranquilityii/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/tranquilityii/layout.s2	2012-05-31 13:09:39 UTC (rev 12041)
+++ trunk/bin/upgrading/s2layers/tranquilityii/layout.s2	2012-05-31 13:28:48 UTC (rev 12042)
@@ -1038,6 +1038,7 @@
     if ( not $*menu_disable_summary ) {
         foreach var Entry e ( $.entries ) {
             var string posticon = "";
+            if ($e.repost) { $posticon = $posticon + "$e.repost_icon "; }
             if ($e.delayed) { $posticon = $posticon + "$e.delayed_icon "; }
             if ($e.sticky) { $posticon = $posticon + "$e.sticky_icon "; }
             if ($e.security) { $posticon = $posticon + "$e.security_icon "; }
@@ -1060,6 +1061,7 @@
     if ( not $*menu_disable_summary ) {
         foreach var Entry e ( $.entries ) {
             var string posticon = "";
+            if ($e.repost) { $posticon = $posticon + "$e.repost_icon "; }
             if ($e.delayed) { $posticon = $posticon + "$e.delayed_icon "; }
             if ($e.sticky) { $posticon = $posticon + "$e.sticky_icon "; }
             if ($e.security) { $posticon = $posticon + "$e.security_icon "; }
@@ -1154,6 +1156,7 @@
 
         print "<h2>";
 
+        if ($e.repost) { "$e.repost_icon "; }
         if ($e.delayed) { "$e.delayed_icon "; }
         if ($e.sticky) { "$e.sticky_icon "; }
         if ($e.security) { "$e.security_icon "; }
@@ -1190,6 +1193,9 @@
             print "<br />";
         }
         print "<b>$datetime</b><br />";
+        if ($e.reposted_by) {
+            """<span>$e.reposted_by</span><br />""";
+        }
         print safe "$metadata";
         if ( $poster != "" ) {
             print "$poster";
@@ -1595,6 +1601,7 @@
                         $e.poster->print(); " : ";
                     }
 
+                    if ($e.repost) { "$e.repost_icon "; }
                     if ($e.delayed) { "$e.delayed_icon "; }
                     if ($e.sticky) { "$e.sticky_icon "; }
                     if ($e.security) { "$e.security_icon "; }

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