snusmubrik (snusmubrik) wrote in changelog,
snusmubrik
snusmubrik
changelog

[ljcom] r12992: LJSUP-14473: Admin pages' style and code...

Committer: aeremenko
LJSUP-14473: Admin pages' style and code refactoring
U   trunk/htdocs/admin/accounts/paidsearch.bml
U   trunk/htdocs/admin/accounts/wallet-history.bml
U   trunk/htdocs/admin/accounts/wallet-stat.bml
U   trunk/htdocs/admin/sendmail/query.bml
U   trunk/htdocs/admin/sendmail/send.bml
Modified: trunk/htdocs/admin/accounts/paidsearch.bml
===================================================================
--- trunk/htdocs/admin/accounts/paidsearch.bml	2012-12-04 12:29:46 UTC (rev 12991)
+++ trunk/htdocs/admin/accounts/paidsearch.bml	2012-12-04 13:26:21 UTC (rev 12992)
@@ -1,11 +1,12 @@
-<html>
-<head><title>Paid Search</title></head>
-<body>
+<?page
+body<=
 <?_code
 {
     use strict;
     use vars qw(%GET);
 
+    LJ::need_res('stc/admin/general.css');
+
     my $remote = LJ::get_remote();
     return "You must first <a href=\"/login.bml?ret=1\">login</a>."
         unless $remote;
@@ -20,9 +21,9 @@
     my $ret;
 
     my $user = $GET{'user'};
-    $ret .= "<h1>Search for payments.</h1>\n";
-    $ret .= "<form method='get'>";
-    $ret .= "Search method: ";
+    $ret .= "<h1>Search for payments</h1>\n";
+    $ret .= "<div class='b-adminpage'><div class='b-adminpage-header'><form class='b-adminpage-form' method='get'>";
+    $ret .= "<span class='b-adminpage-form-col'>Search method: ";
     $ret .= LJ::html_select({ 'name' => 'method', 'selected' => $GET{'method'} },
                             'user' => "Username",
                             'lastname' => "Last Name",
@@ -33,11 +34,12 @@
 #                         'pplastname' => "PayPal - last name",
 #                         'handemail' => "Manually entered email",
                             );
+    $ret .= "</span>";
     $ret .= " Search value: ";
     $ret .= LJ::html_text({ 'name' => 'value', 
                             'value' => $GET{'value'},
                             'size' => 30 });
-    $ret .= "<input type=\"submit\" value=\"Search\"></form><hr>";
+    $ret .= "<input type=\"submit\" value=\"Search\"></form></div>";
     
     return $ret unless $GET{'method'};
 
@@ -138,7 +140,7 @@
                          "WHERE p.payid IN ($in) ORDER BY p.payid");
     $sth->execute;
     
-    $ret .= "<table cellpadding=4 cellspacing=1 border=1><tr><td><b>Pay ID#</b></td><td><b>User</b></td><td><b>Date Sent/Recv</b><td><b>Amount</b></td><td><b>Months</b></td><td><b>Used/Mailed</b></td><td><b>Method</b></td></tr>\n";
+    $ret .= "<table class='b-admin-table'><tr><td><b>Pay ID#</b></td><td><b>User</b></td><td><b>Date Sent/Recv</b><td><b>Amount</b></td><td><b>Months</b></td><td><b>Used/Mailed</b></td><td><b>Method</b></td></tr>\n";
     while (my $row = $sth->fetchrow_hashref) 
     {
         my $amount = sprintf("\$%.02f", $row->{'amount'});
@@ -153,7 +155,9 @@
     $ret .= "</table>\n";
 
     return $ret;
+
+    $ret .= "</div>\n";
 }
 _code?>
-</body>
-</html>
+<=body
+page?>

Modified: trunk/htdocs/admin/accounts/wallet-history.bml
===================================================================
--- trunk/htdocs/admin/accounts/wallet-history.bml	2012-12-04 12:29:46 UTC (rev 12991)
+++ trunk/htdocs/admin/accounts/wallet-history.bml	2012-12-04 13:26:21 UTC (rev 12992)
@@ -6,6 +6,8 @@
     use strict;
     use vars qw(%GET %POST $title $headextra @errors @warnings);
 
+    LJ::need_res('stc/admin/general.css');
+
     use LJ::Pay::Wallet;
     use LJ::Pay::Wallet::Log qw(:bits);
     use LJ::Pay::Wallet::Stats;
@@ -155,42 +157,43 @@
     );
 
     my $form = qq{
-        <div class="form">
-        <form action="" method="get">
+        <form class="b-adminpage-form" action="" method="get">
             $hidden
-            <table>
+            <table class="b-admin-table">
                 <tr>
                     <td>
-                        <?p
-                            $ML{'.label.mintime'}
-                            $inputs{'mintime'}
-                            $ML{'.label.maxtime'}
-                            $inputs{'maxtime'}
-                        p?>
-                        <?p
-                            <label for="username">$ML{'.label.username'}</label>
-                            $inputs{'username'}
-                        p?>
+                        $ML{'.label.mintime'}
+                        $inputs{'mintime'}
                     </td>
                     <td>
-                        <table>
-                            <tr>
-                                <td>$checkboxes{'sup'}</td>
-                                <td>$checkboxes{'paid'}</td>
-                            </tr>
-                            <tr>
-                                <td>$checkboxes{'nonsup'}</td>
-                                <td>$checkboxes{'nonpaid'}</td>
-                            </tr>
-                        </table>
+                        $ML{'.label.maxtime'}
+                        $inputs{'maxtime'}
                     </td>
                     <td>
+                        $checkboxes{'sup'}
+                    </td>
+                    <td>
+                        $checkboxes{'paid'}
+                    </td>
+                    <td rowspan="2">
                         $btn_submit
                     </td>
                 </tr>
+                <tr>
+                    <td colspan="2">
+                        <label for="username">$ML{'.label.username'}</label>
+                        $inputs{'username'}
+                    </td>
+                    <td>
+                        $checkboxes{'nonsup'}
+                    </td>
+                    <td>
+                        $checkboxes{'nonpaid'}
+                    </td>
+                    
+                </tr>
             </table>
         </form>
-        </div>
         @warnings
     };
 
@@ -219,8 +222,20 @@
     }
 
     return qq{
-        $form
-        $widget
+        <div class="b-adminpage">
+            <table class="b-admin-table">
+                <tr>
+                    <td>
+                        $form
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        $widget
+                    </td>
+                </tr>
+            </table>
+        </div>
     };
 }
 _code?>

Modified: trunk/htdocs/admin/accounts/wallet-stat.bml
===================================================================
--- trunk/htdocs/admin/accounts/wallet-stat.bml	2012-12-04 12:29:46 UTC (rev 12991)
+++ trunk/htdocs/admin/accounts/wallet-stat.bml	2012-12-04 13:26:21 UTC (rev 12992)
@@ -6,6 +6,8 @@
     use strict;
     use vars qw(%GET %POST $title $headextra @errors @warnings);
 
+    LJ::need_res('stc/admin/general.css');
+
     use LJ::Pay::Wallet;
     use LJ::Pay::Wallet::Log qw(:bits);
     use LJ::Pay::Wallet::Stats;
@@ -158,30 +160,38 @@
         <div class="form">
         <form action="" method="get">
             $hidden
-            <table>
+            <table class="b-admin-table">
                 <tr>
                     <td>
                         $ML{'.label.mintime'}
                         $inputs{'mintime'}
+                    </td>
+                    <td>
                         $ML{'.label.maxtime'}
                         $inputs{'maxtime'}
                     </td>
                     <td>
-                        <table>
-                            <tr>
-                                <td>$checkboxes{'sup'}</td>
-                                <td>$checkboxes{'paid'}</td>
-                            </tr>
-                            <tr>
-                                <td>$checkboxes{'nonsup'}</td>
-                                <td>$checkboxes{'nonpaid'}</td>
-                            </tr>
-                        </table>
+                        $checkboxes{'sup'}
                     </td>
                     <td>
+                        $checkboxes{'paid'}
+                    </td>
+                    <td rowspan="2">
                         $btn_submit
                     </td>
                 </tr>
+                <tr>
+                    <td colspan="2">
+                        
+                    </td>
+                    <td>
+                        $checkboxes{'nonsup'}
+                    </td>
+                    <td colspan="2">
+                        $checkboxes{'nonpaid'}
+                    </td>
+                    
+                </tr>
             </table>
         </form>
         </div>
@@ -223,19 +233,19 @@
     my $html_toptokensout = $stat_table_inner->($stats_toptokensout);
 
     return qq{
-        $form
+        <div class="b-adminpage b-adminpage-wide">
+            $form
 
-        <div class="general">
-            <?p
-                <strong>$ML{'.stat.label.general.in'}</strong>:
-                $stats_general->{'in'}
-            p?>
-            <?p
-                <strong>$ML{'.stat.label.general.out'}</strong>:
-                $stats_general->{'out'}
-            p?>
-            <blockquote><small>
-                <table>
+            <div class="general">
+                <?p
+                    <strong>$ML{'.stat.label.general.in'}</strong>:
+                    $stats_general->{'in'}
+                p?>
+                <?p
+                    <strong>$ML{'.stat.label.general.out'}</strong>:
+                    $stats_general->{'out'}
+                p?>
+                <table class="b-admin-table">
                     <tr>
                         <td>$ML{'.stat.label.general.vgifts'}</td>
                         <td>$stats_bkdown->{'vgift'}</td>
@@ -261,70 +271,70 @@
                         <td>$stats_bkdown->{'other'}</td>
                     </tr>
                 </table>
-            </small></blockquote>
-        </div>
+            </div>
 
-        <div class="tables">
-            <table cellspacing="20">
-                <tr>
-                    <td valign="top">
-                        <?h2 $ML{'.stat.heading.wallets'} h2?>
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>$ML{'.stat.th.username'}</th>
-                                    <th>$ML{'.stat.th.balance'}</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                $html_topwallets
-                            </tbody>
-                        </table>
-                    </td>
-                    <td valign="top">
-                        <?h2 $ML{'.stat.heading.activity'} h2?>
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>$ML{'.stat.th.username'}</th>
-                                    <th>$ML{'.stat.th.transactions'}</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                $html_topactivity
-                            </tbody>
-                        </table>
-                    </td>
-                    <td valign="top">
-                        <?h2 $ML{'.stat.heading.tokens_in'} h2?>
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>$ML{'.stat.th.username'}</th>
-                                    <th>$ML{'.stat.th.tokens'}</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                $html_toptokensin
-                            </tbody>
-                        </table>
-                    </td>
-                    <td valign="top">
-                        <?h2 $ML{'.stat.heading.tokens_out'} h2?>
-                        <table>
-                            <thead>
-                                <tr>
-                                    <th>$ML{'.stat.th.username'}</th>
-                                    <th>$ML{'.stat.th.tokens'}</th>
-                                </tr>
-                            </thead>
-                            <tbody>
-                                $html_toptokensout
-                            </tbody>
-                        </table>
-                    </td>
-                </tr>
-            </table>
+            <div class="tables">
+                <table class="b-admin-table">
+                    <tr>
+                        <td valign="top">
+                            <?h2 $ML{'.stat.heading.wallets'} h2?>
+                            <table>
+                                <thead>
+                                    <tr>
+                                        <th>$ML{'.stat.th.username'}</th>
+                                        <th>$ML{'.stat.th.balance'}</th>
+                                    </tr>
+                                </thead>
+                                <tbody>
+                                    $html_topwallets
+                                </tbody>
+                            </table>
+                        </td>
+                        <td valign="top">
+                            <?h2 $ML{'.stat.heading.activity'} h2?>
+                            <table>
+                                <thead>
+                                    <tr>
+                                        <th>$ML{'.stat.th.username'}</th>
+                                        <th>$ML{'.stat.th.transactions'}</th>
+                                    </tr>
+                                </thead>
+                                <tbody>
+                                    $html_topactivity
+                                </tbody>
+                            </table>
+                        </td>
+                        <td valign="top">
+                            <?h2 $ML{'.stat.heading.tokens_in'} h2?>
+                            <table>
+                                <thead>
+                                    <tr>
+                                        <th>$ML{'.stat.th.username'}</th>
+                                        <th>$ML{'.stat.th.tokens'}</th>
+                                    </tr>
+                                </thead>
+                                <tbody>
+                                    $html_toptokensin
+                                </tbody>
+                            </table>
+                        </td>
+                        <td valign="top">
+                            <?h2 $ML{'.stat.heading.tokens_out'} h2?>
+                            <table>
+                                <thead>
+                                    <tr>
+                                        <th>$ML{'.stat.th.username'}</th>
+                                        <th>$ML{'.stat.th.tokens'}</th>
+                                    </tr>
+                                </thead>
+                                <tbody>
+                                    $html_toptokensout
+                                </tbody>
+                            </table>
+                        </td>
+                    </tr>
+                </table>
+            </div>
         </div>
     };
 }

Modified: trunk/htdocs/admin/sendmail/query.bml
===================================================================
--- trunk/htdocs/admin/sendmail/query.bml	2012-12-04 12:29:46 UTC (rev 12991)
+++ trunk/htdocs/admin/sendmail/query.bml	2012-12-04 13:26:21 UTC (rev 12992)
@@ -5,6 +5,8 @@
  use strict;
  use vars qw(%GET);
 
+ LJ::need_res('stc/admin/general.css');
+
  my ($ret, $sth, $where, $body);
  my $status = {
      'S' => "Sent (does not guarantee that the message didn't bounce)",
@@ -52,7 +54,7 @@
      if ($canview{$mail->{'type'}}) {
          $ret .= "<?h1 Viewing Message #$mail->{'mailid'} h1?>";
 
-	 $ret .= "<table style='border-spacing: 5px'>";
+	 $ret .= "<table class='b-admin-table'>";
 
 	 $ret .= "<tr><th style='text-align: left; white-space: nowrap'>Mail ID:</th>";
 	 $ret .= "<td>$mail->{'mailid'}</td></tr>";
@@ -99,11 +101,11 @@
          $ret .= LJ::bad_input('You are not authorized to view this message');
      }
  } else {
-     $ret .= "<?h1 Search Sent Emails h1?>\n";
+     $ret .= "<div class='b-adminpage b-adminpage-wide'>\n";
      $ret .= '<form method="GET" action="query.bml">';
      $ret .= '<input type="hidden" name="mode" value="list" />';
 
-     $ret .= "<table cellpadding='4' cellspacing='2'><tr valign='top'>";
+     $ret .= "<table class='b-admin-table b-admin-table-min' cellpadding='4' cellspacing='2'><tr valign='top'>";
      $ret .= "<tr valign='top'><th align='right'>Restrict:</th><td>";
 
      my @type = ("", "All");
@@ -134,7 +136,6 @@
 
      if ($GET{'mode'} eq "list") {
          my $dbr = LJ::get_db_reader();
-         $ret .= "<?hr?><?h1 Results h1?>";
 
          # Default condition of nothing versus everything
          my $where = "WHERE 0";
@@ -212,7 +213,7 @@
          }
          if ($row_ct eq 0) { $ret .= "<?p No Results Returned p?>"; return $ret; }
 
-         $ret .= "<?p <table cellpadding='4' cellspacing='1' border='1'>";
+         $ret .= "<?p <table class='b-admin-table' cellpadding='4' cellspacing='1'>";
          $ret .= "<tr><th>Details</th><th>Sent By</th><th>Request #</th>";
          $ret .= "<th>Status</th><th>From</th><th>Sent</th><th>Recipient</th><th>Subject</th></tr>";
          $ret .= $row_html;
@@ -233,6 +234,7 @@
      } else {
          $ret .= "<?p Please select a search criteria p?>";
      }
+     $ret .= "</div>\n";
  }
  return $ret;
 _code?>

Modified: trunk/htdocs/admin/sendmail/send.bml
===================================================================
--- trunk/htdocs/admin/sendmail/send.bml	2012-12-04 12:29:46 UTC (rev 12991)
+++ trunk/htdocs/admin/sendmail/send.bml	2012-12-04 13:26:21 UTC (rev 12992)
@@ -90,6 +90,8 @@
     use LJ::Sendmail::Stock;
     use LJ::JSON;
 
+    LJ::need_res('stc/admin/general.css');
+
     my $body = "";
 
     my $remote = LJ::get_remote();
@@ -125,10 +127,10 @@
     my $compose = sub {
         my $edit_mode = shift;
 
-        $body .= "<?h1 Compose Message h1?>\n";
-        $body .= "<form action='send.bml?action=preview' method='post'>\n";
+        $body .= "<div class='b-adminpage b-adminpage-wide'>\n";
+        $body .= "<form class='b-adminpage-form' action='send.bml?action=preview' method='post'>\n";
 
-        $body .= "<table>\n";
+        $body .= "<table class='b-admin-table' cellpadding='8'>\n";
         $body .= "<tr><td><label for='from'>From:</label></td><td>";
 
         my @from = ("", "-- Select One --");
@@ -151,7 +153,7 @@
         $body .= "<br /><br /></td></tr>";
 
         $body .= "<tr><td>Mail to:<br /><font color='gray' size='1'>Limit One<br />Mode</font></td><td>";
-        $body .= "<table><tr><td>";
+        $body .= "<table class='b-admin-table' cellpadding='8'><tr><td>";
 
         # Since we expose the address we'd be sending to
         # don't let them mail by user or community maints
@@ -161,7 +163,7 @@
 
             my $user = $edit_mode == 1 ? $POST{'user'} : $GET{'user'};
             $body .= LJ::html_text({ 'name' => 'user', 'type' => 'text',
-                                     'raw' => 'style="background: url('.$LJ::IMGPREFIX.'/userinfo.gif?v=17080) no-repeat; background-position: 0px 1px; padding-left: 18px;" size="37"',
+                                     'raw' => 'style="background: #fff url('.$LJ::IMGPREFIX.'/userinfo.gif?v=17080) no-repeat; background-position: 0px 1px; padding-left: 18px;" size="37"',
                                      'value' => $user});
             $body .= "<font color='gray' size='1'><i>comma-separated</i></font></font>";
             $body .= "</td></tr>";
@@ -170,7 +172,7 @@
 
             my $maints = $edit_mode == 1 ? $POST{'maints'} : $GET{'maints'};
             $body .= LJ::html_text({ 'name' => 'maints', 'type' => 'text',
-                                     'raw' => 'style="background: url('.$LJ::IMGPREFIX.'/community.gif?v=556) no-repeat; background-position: 0px 1px; padding-left: 18px;" size="37"',
+                                     'raw' => 'style="background: #fff url('.$LJ::IMGPREFIX.'/community.gif?v=556) no-repeat; background-position: 0px 1px; padding-left: 18px;" size="37"',
                                      'value' => $maints});
             $body .= "</td></tr><tr><td>";
         }
@@ -245,6 +247,7 @@
 
         $body .= "</table>";
         $body .= "</form>";
+        $body .= "</div>\n";
     };
 
     my $preview = sub {

Tags: aeremenko, bml, ljcom, snusmubrik
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 0 comments