afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote in [site community profile] changelog2009-08-22 07:05 pm

[dw-free] "network" view should be in lang_viewname and $p.view_url

[commit: http://hg.dwscoalition.org/dw-free/rev/9f85b88308b4]

http://bugs.dwscoalition.org/show_bug.cgi?id=1328

Add network view text properties; add network link to views for paid
accounts.

Patch by [personal profile] foxfirefey.

Files modified:
  • bin/upgrading/s2layers/core1.s2
  • bin/upgrading/s2layers/core2.s2
  • bin/upgrading/s2layers/core2base/layout.s2
  • bin/upgrading/s2layers/drifting/layout.s2
  • bin/upgrading/s2layers/negatives/layout.s2
  • cgi-bin/LJ/S2.pm
  • cgi-bin/LJ/S2Theme.pm
--------------------------------------------------------------------------------
diff -r 0c18f326ab15 -r 9f85b88308b4 bin/upgrading/s2layers/core1.s2
--- a/bin/upgrading/s2layers/core1.s2	Sat Aug 22 18:20:19 2009 +0000
+++ b/bin/upgrading/s2layers/core1.s2	Sat Aug 22 19:04:17 2009 +0000
@@ -1888,6 +1888,7 @@ function lang_viewname(string viewid) [n
     if ($viewid == "reply") { return "Post Comment"; }
     if ($viewid == "tags") { return "Tags"; }
     if ($viewid == "memories") { return $*text_view_memories; }
+    if ($viewid == "network") { return $*text_view_friendsfriends; }
     return "Unknown View";
 }
 
diff -r 0c18f326ab15 -r 9f85b88308b4 bin/upgrading/s2layers/core2.s2
--- a/bin/upgrading/s2layers/core2.s2	Sat Aug 22 18:20:19 2009 +0000
+++ b/bin/upgrading/s2layers/core2.s2	Sat Aug 22 19:04:17 2009 +0000
@@ -657,7 +657,7 @@ class FriendsPage extends RecentPage
     "A user-selected title for their friends page.";
 
     var string friends_mode
-    "The 'mode' of this view. An empty string indicates a normal friends view, while 'friendsfriends' indicates the Friends-of-friends view.";
+    "The 'mode' of this view. An empty string indicates a normal friends view, while 'network' indicates the network view.";
 
     var bool filter_active
     "If true, some kind of filter is in effect. If this filter has a name, it will be included in [member[FriendsPage.filter_name]]";
@@ -1852,7 +1852,7 @@ property string text_view_friends_comm {
     "size" = 15;
     example = "Members' Journals";
 }
-property string text_view_friendsfriends {
+property string text_view_network {
     des = "Title of the 'Network' view";
     maxlength = 40;
     "size" = 15;
@@ -1864,7 +1864,7 @@ property string text_view_friends_filter
     "size" = 15;
     example = "Subscriptions (Custom filter)";
 }
-property string text_view_friendsfriends_filter {
+property string text_view_network_filter {
     des = "Title of a Network page with an unnamed filter in effect";
     maxlength = 40;
     "size" = 15;
@@ -1891,7 +1891,7 @@ property string text_view_memories {
 }
 
 property string text_view_tags {
-    des = "Text used to link to the Tags page";
+    des = "Text used to link to the 'Tags' page";
     maxlength = 40;
     "size" = 15;
     example = "My Tags";
@@ -1901,8 +1901,8 @@ set text_view_friends = "Reading";
 set text_view_friends = "Reading";
 set text_view_friends_comm = "Reading";
 set text_view_friends_filter = "Reading (Custom filter)";
-set text_view_friendsfriends = "Network";
-set text_view_friendsfriends_filter = "Network (Custom filter)";
+set text_view_network = "Network";
+set text_view_network_filter = "Network (Custom filter)";
 set text_view_archive = "Archive";
 set text_view_userinfo = "Profile";
 set text_view_memories = "Memories";
@@ -2667,6 +2667,7 @@ function lang_viewname(string viewid) [n
     if ($viewid == "recent") { return $*text_view_recent; }
     if ($viewid == "archive") { return $*text_view_archive; }
     if ($viewid == "read") { return $*text_view_friends; }
+    if ($viewid == "network") { return $*text_view_network; }
     if ($viewid == "day") { return "Day"; }
     if ($viewid == "month") { return "Month"; }
     if ($viewid == "userinfo") { return $*text_view_userinfo; }
@@ -2674,6 +2675,7 @@ function lang_viewname(string viewid) [n
     if ($viewid == "reply") { return "Post Comment"; }
     if ($viewid == "tags") { return "$*text_view_tags"; }
     if ($viewid == "memories") { return $*text_view_memories; }
+    if ($viewid == "network") { return $*text_view_network; }
     return "Unknown View";
 }
 
@@ -3044,14 +3046,14 @@ function FriendsPage::view_title() : str
     elseif ($.friends_mode == "network") {
         if ($.filter_active) {
             if ($.filter_name != "") {
-                return $*text_view_friendsfriends+" ("+$.filter_name+")";
-            }
-            else {
-                return $*text_view_friendsfriends_filter;
+                return $*text_view_network+" ("+$.filter_name+")";
+            }
+            else {
+                return $*text_view_network_filter;
             }
         }
         else {
-            return $*text_view_friendsfriends;
+            return $*text_view_network;
         }
     }
     else {
diff -r 0c18f326ab15 -r 9f85b88308b4 bin/upgrading/s2layers/core2base/layout.s2
--- a/bin/upgrading/s2layers/core2base/layout.s2	Sat Aug 22 18:20:19 2009 +0000
+++ b/bin/upgrading/s2layers/core2base/layout.s2	Sat Aug 22 19:04:17 2009 +0000
@@ -213,6 +213,7 @@ propgroup text {
 
     property use text_view_recent;
     property use text_view_friends;
+    property use text_view_network;
     property use text_view_archive;
     property use text_view_userinfo;
     property use text_view_memories;
diff -r 0c18f326ab15 -r 9f85b88308b4 bin/upgrading/s2layers/drifting/layout.s2
--- a/bin/upgrading/s2layers/drifting/layout.s2	Sat Aug 22 18:20:19 2009 +0000
+++ b/bin/upgrading/s2layers/drifting/layout.s2	Sat Aug 22 19:04:17 2009 +0000
@@ -88,6 +88,7 @@ propgroup text
 {
     property use text_view_recent;
     property use text_view_friends;
+    property use text_view_network;
     property use text_view_friends_comm;
     property use text_view_friends_filter;
     property use text_view_archive;
diff -r 0c18f326ab15 -r 9f85b88308b4 bin/upgrading/s2layers/negatives/layout.s2
--- a/bin/upgrading/s2layers/negatives/layout.s2	Sat Aug 22 18:20:19 2009 +0000
+++ b/bin/upgrading/s2layers/negatives/layout.s2	Sat Aug 22 19:04:17 2009 +0000
@@ -196,6 +196,7 @@ propgroup text {
 
     property use text_view_recent;
     property use text_view_friends;
+    property use text_view_network;
     property use text_view_friends_comm;
     property use text_view_friends_filter;
     property use text_view_archive;
diff -r 0c18f326ab15 -r 9f85b88308b4 cgi-bin/LJ/S2.pm
--- a/cgi-bin/LJ/S2.pm	Sat Aug 22 18:20:19 2009 +0000
+++ b/cgi-bin/LJ/S2.pm	Sat Aug 22 19:04:17 2009 +0000
@@ -2020,6 +2020,7 @@ sub Page
             userinfo => $u->profile_url,
             archive  => "$base_url/calendar",
             read     => "$base_url/read",
+            network  => "$base_url/network",
             tags     => "$base_url/tag",
             memories => "$LJ::SITEROOT/tools/memories?user=$u->{user}",
         },
@@ -2076,7 +2077,8 @@ sub Page
     }
 
     # Identity (type I) accounts only have read views
-    $p->{'views_order'} = [ 'read', 'userinfo' ] if $u->is_identity;
+    $p->{views_order} = [ 'read', 'userinfo' ] if $u->is_identity;
+    $p->{views_order} = [ 'recent', 'archive', 'read', 'network', 'tags', 'memories', 'userinfo' ] if $u->is_paid;
 
     return $p;
 }
diff -r 0c18f326ab15 -r 9f85b88308b4 cgi-bin/LJ/S2Theme.pm
--- a/cgi-bin/LJ/S2Theme.pm	Sat Aug 22 18:20:19 2009 +0000
+++ b/cgi-bin/LJ/S2Theme.pm	Sat Aug 22 19:04:17 2009 +0000
@@ -720,6 +720,7 @@ sub navigation_props {
         text_view_friends
         text_view_friends_comm
         text_view_friends_filter
+        text_view_network
         text_view_memories
         text_view_recent
         text_view_userinfo
--------------------------------------------------------------------------------
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)

[personal profile] ninetydegrees 2009-08-22 09:27 pm (UTC)(link)
Yay!
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)

Extra line in core.s2

[personal profile] ninetydegrees 2010-07-17 10:57 am (UTC)(link)
Fu, is there a reason why if ($viewid == "network") { return $*text_view_network; } is there twice? It seems to me it's a mistake but I can't test Network on my DH since I don't have Memcache.
fu: Close-up of Fu, bringing a scoop of water to her mouth (Default)

Re: Extra line in core.s2

[personal profile] fu 2010-07-17 02:14 pm (UTC)(link)
*looks* I'm pretty sure that was a mistake!