kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2009-09-25 02:01 am

[dw-free] add ?mode=full link to the profile

[commit: http://hg.dwscoalition.org/dw-free/rev/491eaf27c733]

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

Add link to full profile from default profile view, and vice versa.

Patch by [personal profile] yvi.

Files modified:
  • htdocs/userinfo.bml
  • htdocs/userinfo.bml.text
--------------------------------------------------------------------------------
diff -r 712a215e4459 -r 491eaf27c733 htdocs/userinfo.bml
--- a/htdocs/userinfo.bml	Thu Sep 24 18:16:29 2009 +0000
+++ b/htdocs/userinfo.bml	Thu Sep 24 21:01:08 2009 -0500
@@ -416,6 +416,15 @@ body<=
     # other statistics
     $ret .= q{ <p> };
     $ret .= join( ', ', ( $profile->entry_stats, $profile->tag_stats, $profile->memory_stats, $profile->userpic_stats ) );
+    $ret .= "</p>";
+
+    #extended profile link
+    $ret .= "<p>";
+    if ( $is_full ) {
+        $ret .= BML::ml( '.details.profile.default', { aopts => "href='" . $u->profile_url . "'" } );
+    } else {
+        $ret .= BML::ml( '.details.profile.full', { aopts => "href='" . $u->profile_url . "?mode=full'" } );
+    }
     $ret .= q{ </p></div></div></div></div> };
 
 ################################################################################
diff -r 712a215e4459 -r 491eaf27c733 htdocs/userinfo.bml.text
--- a/htdocs/userinfo.bml.text	Thu Sep 24 18:16:29 2009 +0000
+++ b/htdocs/userinfo.bml.text	Thu Sep 24 21:01:08 2009 -0500
@@ -109,6 +109,10 @@
 .details.memories=[[num]] <a [[aopts]]>[[?num|Memory|Memories]]</a>
 
 .details.memories2=[[num_comma]] <a [[aopts]]>[[?num_raw|Memory|Memories]]</a>
+
+.details.profile.default=<a [[aopts]]>View default profile</a>
+
+.details.profile.full=<a [[aopts]]>View extended profile</a>
 
 .details.search=Search
 
--------------------------------------------------------------------------------