wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[ljcom] r10169: LJSV-1412. Gift details

Committer: gprochaev
LJSV-1412. Gift details

U   trunk/htdocs/gift-details.bml
A   trunk/htdocs/gift-details.bml.text.local
Modified: trunk/htdocs/gift-details.bml
===================================================================
--- trunk/htdocs/gift-details.bml	2011-03-03 07:26:38 UTC (rev 10168)
+++ trunk/htdocs/gift-details.bml	2011-03-03 08:12:05 UTC (rev 10169)
@@ -6,7 +6,7 @@
                      mode => 'word');
 
     my $giftid = $GET{'g'};
-    $title = "Virtual Gift";
+    $title = $ML{'.title'};
 
     my $err = sub {
         $body = "<?h2 Error h2?>";
@@ -41,13 +41,13 @@
     
     $rhs .= "<b>" . $gift->name . "</b><br >";
     
-    $rhs .= "<b>To:</b> " . $u->ljuser_display . "<br />";
+    $rhs .= "<b>$ML{'.to'}</b>" . $u->ljuser_display . "<br />";
     if ($gift->anonymous) {
-        $rhs .= "<b>From:</b> <i>Anonymous</i><br />";
+        $rhs .= "<b>$ML{'.from'}</b> <i>Anonymous</i><br />";
     } elsif (my $fu = $gift->from) {
-        $rhs .= "<b>From:</b> " . $fu->ljuser_display . "<br />";
+        $rhs .= "<b>$ML{'.from'}</b> " . $fu->ljuser_display . "<br />";
     }
-    $rhs .= "<b>Date:</b> " . scalar(gmtime($gift->daterecv_unix)) . "<br />";
+    $rhs .= "<b>$ML{'.date'}</b> " . scalar(gmtime($gift->daterecv_unix)) . "<br />";
 
     if (my $note = $gift->note_html) {
         $rhs .= "<p style='margin-top: 2em'>$note</p>";
@@ -60,16 +60,17 @@
 
     my $killit = "";
     if ($is_owner) {
-        my $ejs = LJ::ehtml("return confirm('Delete this gift permanently?');");
-        $killit .= "<form style='float:right; padding: 3px' method='POST' action='gift-details.bml?uid=$u->{userid}&g=$giftid'><input type='hidden' name='mode' value='delete' /><input onclick=\"$ejs\" type='submit' value='Delete Permanently' /></form>";
+        my $ejs = LJ::ehtml("return confirm('$ML{'.delete.permanently.question'}');");
+        $killit .= "<form style='float:right; padding: 3px' method='POST' action='gift-details.bml?uid=$u->{userid}&g=$giftid'><input type='hidden' name='mode' value='delete' /><input onclick=\"$ejs\" type='submit' value='$ML{'.delete.permanently.button'}' /></form>";
     }
     if ($is_owner && ! $gift->is_removed_from_profile) {
-        my $ejs = LJ::ehtml("return confirm('Remove this gift from your profile page?');");
-        $killit .= "<form style='float:right; padding: 3px' method='POST' action='gift-details.bml?uid=$u->{userid}&g=$giftid'><input type='hidden' name='mode' value='kill' /><input onclick=\"$ejs\" type='submit' value='Remove from Profile' /></form>";
+        my $ejs = LJ::ehtml("return confirm('$ML{'.delete.from_profile.question'}');");
+        $killit .= "<form style='float:right; padding: 3px' method='POST' action='gift-details.bml?uid=$u->{userid}&g=$giftid'><input type='hidden' name='mode' value='kill' /><input onclick=\"$ejs\" type='submit' value='$ML{'.delete.from_profile.button'}' /></form>";
     }
 
     my $tracking = $gift->tracking($remote) || "";
 
+    my $link_buy = BML::ml('.link.buy_gift_for_friend', { href => "href='$LJ::SITEROOT/shop/vgift.bml'" });
     $body = <<END;
 
 <table><tr valign='top'>
@@ -79,7 +80,7 @@
 </td>
 </tr></table>
 $killit
-<a href="$LJ::SITEROOT/shop/vgift.bml">Buy a virtual gift</a> for a friend.
+$link_buy
 
 END
 return;

Added: trunk/htdocs/gift-details.bml.text.local
===================================================================
--- trunk/htdocs/gift-details.bml.text.local	                        (rev 0)
+++ trunk/htdocs/gift-details.bml.text.local	2011-03-03 08:12:05 UTC (rev 10169)
@@ -0,0 +1,19 @@
+.title=Virtual Gift
+
+.to=To:
+
+.from=From:
+
+.date=Date:
+
+.delete.permanently.question=Delete this gift permanently?
+
+.delete.permanently.button=Delete Permanently
+
+.delete.from_profile.question=Remove this gift from your profile page?
+
+.delete.from_profile.button=Remove from Profile
+
+.link.buy_gift_for_friend=<a [[href]]>Buy a virtual gift</a> for a friend.
+
+

Tags: bml, ljcom, local, wisest-owl
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