[livejournal] r19169: LJSUP-8870: get_give_buttons replaced by...
Committer: mchervonniy
LJSUP-8870: get_give_buttons replaced by print_give_buttonsU trunk/bin/upgrading/s2layers/core1.s2 U trunk/bin/upgrading/s2layers/sixhtml/layout.s2 U trunk/bin/upgrading/s2layers/sturdygesture/layout.s2 U trunk/bin/upgrading/s2layers/tabularindent/layout.s2
Modified: trunk/bin/upgrading/s2layers/core1.s2
===================================================================
--- trunk/bin/upgrading/s2layers/core1.s2 2011-05-30 07:33:12 UTC (rev 19168)
+++ trunk/bin/upgrading/s2layers/core1.s2 2011-05-30 08:58:59 UTC (rev 19169)
@@ -334,8 +334,8 @@
function print_text() [fixed]
"Print the entry text. Doesn't print anything in some contexts, such as on a month view or in a collapsed comment.";
function builtin get_link (string key) : Link "Get a link to some action related to this entry or comment. You can iterate over [member[EntryLite.link_keyseq]] to get keys to pass in here to produce a 'toolbar' of links.";
- function builtin get_give_button (string type) : string "Get a button or link to Give features. Type can be 'button' or 'link'";
- function builtin get_give_button (string type, string img_url) : string "Get a button or link to Give features. Type can be 'button' or 'link'";
+ function builtin print_give_button (string type) : string "Get a button or link to Give features. Type can be 'button' or 'link'";
+ function builtin print_give_button (string type, string img_url) : string "Get a button or link to Give features. Type can be 'button' or 'link'";
function builtin get_plain_subject () : string "For Entries that can contain HTML subjects, this returns the subject without HTML. Comments can't have HTML in subjects, so this is equivalent to just using \$.subject. The returned 'plain' subject may still contain HTML entities, so don't do substring chops on it either.";
function builtin get_tags_text () : string "Returns a string containing a div of class 'ljtags' with the tags for the entry. If there are no tags on the entry, returns a blank string. The string is formatted according to the 'text_tags' property.";
function print_linkbar() "Print the link bar for this entry or comment.";
@@ -2552,7 +2552,7 @@
var Link link;
foreach var string k ($.link_keyseq) {
if ($k == "give_button") {
- print $this->get_give_button("button");
+ print $this->print_give_button("button");
} else {
$link = $this->get_link($k);
" $link ";
Modified: trunk/bin/upgrading/s2layers/sixhtml/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sixhtml/layout.s2 2011-05-30 07:33:12 UTC (rev 19168)
+++ trunk/bin/upgrading/s2layers/sixhtml/layout.s2 2011-05-30 08:58:59 UTC (rev 19169)
@@ -1149,10 +1149,8 @@
$link->print_raw();
}
if ($link_key == "give_button") {
- var string give_button = $this->get_give_button("string");
- if ($give_button != "") {
- print safe """ $sep $give_button""";
- }
+ print safe """ $sep """;
+ $this->print_give_button("string");
}
}
}
Modified: trunk/bin/upgrading/s2layers/sturdygesture/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/sturdygesture/layout.s2 2011-05-30 07:33:12 UTC (rev 19168)
+++ trunk/bin/upgrading/s2layers/sturdygesture/layout.s2 2011-05-30 08:58:59 UTC (rev 19169)
@@ -391,10 +391,9 @@
$l->lay_print_li($*text_entry_links{$ls});
}
if ($ls == "give_button") {
- var string give_button = $.entry->get_give_button("string");
- if ($give_button != "") {
- print safe """<li>$give_button</li>""";
- }
+ """<li>""";
+ $.entry->print_give_button("string");
+ """</li>""";
}
}
$l = $.entry->get_link("nav_prev");
Modified: trunk/bin/upgrading/s2layers/tabularindent/layout.s2
===================================================================
--- trunk/bin/upgrading/s2layers/tabularindent/layout.s2 2011-05-30 07:33:12 UTC (rev 19168)
+++ trunk/bin/upgrading/s2layers/tabularindent/layout.s2 2011-05-30 08:58:59 UTC (rev 19169)
@@ -606,10 +606,8 @@
$link->print_raw();
}
if ($link_key == "give_button") {
- var string give_button = $e->get_give_button("button");
- if ($give_button != "") {
- print safe """ $give_button""";
- }
+ """ """;
+ $e->print_give_button("button");
}
}
@@ -649,7 +647,7 @@
}
if ($link_key == "give_button") {
""" """;
- print $e->get_give_button("button");
+ $e->print_give_button("button");
}
}
