perazhog (perazhog) wrote in changelog,
perazhog
perazhog
changelog

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

Committer: egeraskin
LJSUP-14473: Admin pages' style and code refactoring
U   trunk/htdocs/admin/vgift/edit.bml
Modified: trunk/htdocs/admin/vgift/edit.bml
===================================================================
--- trunk/htdocs/admin/vgift/edit.bml	2013-01-15 12:04:05 UTC (rev 13110)
+++ trunk/htdocs/admin/vgift/edit.bml	2013-01-15 12:19:54 UTC (rev 13111)
@@ -7,6 +7,8 @@
 use LJ::FileStore;
 use LJ::SiteScheme;
 
+LJ::need_res("stc/admin/general.css");
+
 my $ret;
 my $mode = $FORM{'mode'} || $GET{'mode'};
 
@@ -152,8 +154,9 @@
 if ($mode eq "vgiftedit") {
     my $vgift = LJ::Pay::ShopVGift->new(id => $GET{vgift_id}, null_is_ok => 1); # new vgift has no id, but default options for it is ok
     
+    $ret .= "<div class='b-adminpage'>";
     $ret .= "<form name='editgift' action='/admin/vgift/edit.bml?mode=changevgift&cat_id=".$GET{cat_id}."' method='post' ENCTYPE='multipart/form-data'>";
-    $ret .= "<table border='1'>";
+    $ret .= "<table class='b-admin-table'>";
 	$ret .= "<tr><td>VGift Id</td><td><input type='hidden' name='vgift_id' value='" . $vgift->{vgift_id} . "'>" . $vgift->{vgift_id} . "</td></tr>";
 	$ret .= "<tr><td>Is Hidden</td><td><input type='checkbox' name='is_hidden'" . ($vgift->is_hidden eq '1' ? " checked = 'checked' " : "") . "></td></tr>";
 	$ret .= "<tr><td>Is Hidden for not logged in</td><td><input type='checkbox' name='is_hidden_for_not_logged_in'" . ($vgift->{is_hidden_for_not_logged_in} eq '1' ? " checked = 'checked' " : "") . "></td></tr>";
@@ -169,6 +172,7 @@
 	$ret .= "<tr><td>Date start</td><td><input type='text' name='date_start' value='" . $vgift->{date_start} . "'></td></tr>";
 	$ret .= "<tr><td>Date end</td><td><input type='text' name='date_end' value='" . $vgift->{date_end} . "'></td></tr>";
 	$ret .= "<tr><td>Perl class</td><td><input type='text' name='perl_class' value='" . $vgift->{perl_class} . "'></td></tr>";
+    $ret .= "</div>";
     
     my $fromuser = $vgift->{vgift_id} ? LJ::Lang::get_text($lang, "vgift.".$vgift->keyname.".fromuser", $domain->{'dmid'}) : '';
     my $anon     = $vgift->{vgift_id} ? LJ::Lang::get_text($lang, "vgift.".$vgift->keyname.".anon", $domain->{'dmid'}) : '';
@@ -280,7 +284,7 @@
 
     my $all_vgifts = $cat eq 'disabled' ? $dbh->selectall_arrayref('SELECT DISTINCT va.* FROM shop_vgifts va, vgift_in_cats vic WHERE va.vgift_id = vic.vgift_id AND va.is_disabled = 1', { Slice => {} } ) : $dbh->selectall_arrayref('SELECT va.* FROM shop_vgifts va, vgift_in_cats vic WHERE va.vgift_id = vic.vgift_id AND va.is_disabled = 0 AND vic.cat_id = ? ', { Slice => {} }, $cat_id );
 
-    $ret .= "<table border='1'>";
+    $ret .= "<table class='b-admin-table-min'>";
     foreach my $vgift_id (@$all_vgifts) {
         my $vgift = LJ::Pay::ShopVGift->new (id => $vgift_id->{vgift_id});
         $ret .= "<tr><td colspan=\"2\">ID: ".$vgift->id."<br>".LJ::Lang::get_text($lang,$vgift->display_name,$domain->{'dmid'})."</td><td rowspan=\"2\"><form method='get'><input type='hidden' name='cat_id' value='".$cat_id."'><input type='hidden' name='mode' value='vgiftedit'><input type='hidden' name='vgift_id' value='".$vgift_id->{vgift_id}."'><input type='submit' value='edit'></form></td></tr><tr><td><img src=\"".$vgift->small_img_url."\"></td><td><img src=\"".$vgift->large_img_url."\"></td></tr>";
@@ -295,7 +299,7 @@
         $ret .= "<input type='hidden' name='cat_id' value='" . $cat_id . "'>";
         $ret .= "</form>";
     }
-
+    
     return LJ::SiteScheme->render_page({
         body => $ret
     });

Tags: bml, egeraskin, ljcom, perazhog
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