kareila: (Default)
kareila ([personal profile] kareila) wrote in [site community profile] changelog2010-07-25 09:39 am

[dw-free] link "user icons" page from "manage userpics" page

[commit: http://hg.dwscoalition.org/dw-free/rev/9610286f219d]

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

Add link to the user's 'view icons' page from the 'edit icons' page.

Patch by [personal profile] ninetydegrees.

Files modified:
  • cgi-bin/LJ/User.pm
  • htdocs/editicons.bml
  • htdocs/editicons.bml.text
--------------------------------------------------------------------------------
diff -r 9786201db0cb -r 9610286f219d cgi-bin/LJ/User.pm
--- a/cgi-bin/LJ/User.pm	Fri Jul 23 09:35:07 2010 -0500
+++ b/cgi-bin/LJ/User.pm	Sun Jul 25 04:39:17 2010 -0500
@@ -6068,7 +6068,7 @@ sub activate_userpics {
 
 sub allpics_base {
     my $u = shift;
-    return $u->journal_base . "/icons";;
+    return $u->journal_base . "/icons";
 }
 
 # clears the internally cached mapping of userpics to keywords for this
diff -r 9786201db0cb -r 9610286f219d htdocs/editicons.bml
--- a/htdocs/editicons.bml	Fri Jul 23 09:35:07 2010 -0500
+++ b/htdocs/editicons.bml	Sun Jul 25 04:39:17 2010 -0500
@@ -488,7 +488,8 @@ use strict;
                 <div class='EditIconsStatus'>
             };
 
-        $body .= "<p><strong>" . BML::ml('.piclimitstatus', {current => scalar @userpics, max => $max}) . "</strong></p>";;
+        $body .= "<p><strong>" . BML::ml( '.piclimitstatus', { current => scalar @userpics, max => $max } ) . "</strong> ";
+        $body .= BML::ml( '.view.allicons', { aopts => "href='" . $u->allpics_base . "'" } ) . "</p>";
         if (scalar @userpics >= $max) {
             my $inline;
             if ($inline .= LJ::Hooks::run_hook("cprod_inline", $u, 'EditPics')) {
diff -r 9786201db0cb -r 9610286f219d htdocs/editicons.bml.text
--- a/htdocs/editicons.bml.text	Fri Jul 23 09:35:07 2010 -0500
+++ b/htdocs/editicons.bml.text	Sun Jul 25 04:39:17 2010 -0500
@@ -143,6 +143,8 @@
 
 .userpic=Userpic [[num]]: 
 
+.view.allicons=[<a [[aopts]]>View all uploaded icons</a>]
+
 .warning.keywords=One or more of your pictures do not have keywords defined and thus cannot currently be used
 
 .warning.keywords.faq=One or more of your pictures do not have <a [[aopts]]>keywords</a> defined and thus cannot currently be used
--------------------------------------------------------------------------------
ninetydegrees: Art & Text: heart with aroace colors, "you are loved" (Default)

Thanks!

[personal profile] ninetydegrees 2010-07-25 09:53 am (UTC)(link)
Oh it looks so much cleaner like this. *takes notes*