mark: A photo of Mark kneeling on top of the Taal Volcano in the Philippines. It was a long hike. (Default)
Mark Smith ([staff profile] mark) wrote in [site community profile] changelog2012-03-13 07:01 pm

[dw-free] Fix UI for community imports

[commit: http://hg.dwscoalition.org/dw-free/rev/40848a3f33dc]

Fix UI for community imports

The import status widget didn't mention the community that was being
imported. This should be more clear, although still not ideal. (It should
have user tags with the heads etc.)

Patch by [staff profile] mark.

Files modified:
  • bin/upgrading/en.dat
  • cgi-bin/LJ/Widget/ImportStatus.pm
--------------------------------------------------------------------------------
diff -r 82baebb440e9 -r 40848a3f33dc bin/upgrading/en.dat
--- a/bin/upgrading/en.dat	Tue Mar 13 18:56:57 2012 +0000
+++ b/bin/upgrading/en.dat	Tue Mar 13 19:02:58 2012 +0000
@@ -4769,6 +4769,8 @@
 
 widget.importstatus.whichaccount=Import from [[user]] at [[host]]
 
+widget.importstatus.whichaccount.comm=Import from [[comm]] (via [[user]]) at [[host]]
+
 widget.inbox.menu.delete.btn=Delete Selected
 
 widget.inbox.menu.delete_all.btn=Delete All
diff -r 82baebb440e9 -r 40848a3f33dc cgi-bin/LJ/Widget/ImportStatus.pm
--- a/cgi-bin/LJ/Widget/ImportStatus.pm	Tue Mar 13 18:56:57 2012 +0000
+++ b/cgi-bin/LJ/Widget/ImportStatus.pm	Tue Mar 13 19:02:58 2012 +0000
@@ -41,7 +41,19 @@
         foreach my $importid ( sort { $b <=> $a } keys %$items ) {
             my $import_item = $items->{$importid};
 
-            $ret .= "<tr><td colspan='4' class='table-header'>" . $class->ml( 'widget.importstatus.whichaccount', { user => $import_item->{user}, host => $import_item->{host} } ) . " | ";
+            $ret .= "<tr><td colspan='4' class='table-header'>";
+            if ( $import_item->{usejournal} ) {
+                $ret .= $class->ml( 'widget.importstatus.whichaccount.comm', {
+                    user => $import_item->{user},
+                    comm => $import_item->{usejournal},
+                    host => $import_item->{host}
+                } ) . " | ";
+            } else {
+                $ret .= $class->ml( 'widget.importstatus.whichaccount', {
+                    user => $import_item->{user},
+                    host => $import_item->{host}
+                } ) . " | ";
+            }
             $ret .= "<a href='$LJ::SITEROOT/tools/importer?authas=" . $u->user . "'>" . $class->ml( 'widget.importstatus.refresh' ) . "</a></td></tr>";
             foreach my $item ( sort keys %{$import_item->{items}} ) {
                 my $i = $import_item->{items}->{$item};
--------------------------------------------------------------------------------
afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)

[personal profile] afuna 2012-03-14 05:30 am (UTC)(link)
Hehe do you want me to do the pulling out into userheads? ;-)