wisest owl (wisest_owl) wrote in changelog,
wisest owl
wisest_owl
changelog

[livejournal] r17767: LJSUP-7438. Make a beauty for admin tool

Committer: wisest-owl
LJSUP-7438. Make a beauty for admin tool

U   trunk/htdocs/admin/browse/add_category.bml
U   trunk/htdocs/admin/browse/add_community.bml
U   trunk/htdocs/admin/browse/add_verticals.bml
U   trunk/htdocs/admin/browse/edit_verticals.bml
U   trunk/htdocs/admin/browse/featured_communities.bml
U   trunk/htdocs/admin/browse/index.bml
U   trunk/htdocs/admin/browse/manage_category.bml
U   trunk/htdocs/admin/browse/moderate_community.bml
U   trunk/htdocs/admin/browse/recent_posts.bml
U   trunk/htdocs/admin/browse/remove_category.bml
U   trunk/htdocs/admin/browse/remove_community.bml
U   trunk/htdocs/admin/browse/remove_verticals.bml
U   trunk/htdocs/admin/browse/search_tags.bml
U   trunk/htdocs/admin/browse/top_entries_vertical.bml
Modified: trunk/htdocs/admin/browse/add_category.bml
===================================================================
--- trunk/htdocs/admin/browse/add_category.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/add_category.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -102,6 +102,7 @@
     my @categories = LJ::Browse->load_all($vertical);
     my @caturls = map { { text => $_->{pretty_name}, value => $_->url_path } } @categories;
 
+    $ret .= "<p>";
     $ret .= LJ::html_select({
                 name => 'parentcaturl',
                 selected => $parentcaturl },
@@ -111,7 +112,7 @@
             );
     $ret .= "</p>\n";
 
-    $ret .= "<p><b>New Category Details</b>";
+    $ret .= "<h2>New Category Details</h2>";
     $ret .= "<table>";
     $ret .= "<tr><td class='label'>*Display Name:</td><td>";
     $ret .= LJ::html_text( {
@@ -127,7 +128,7 @@
                 size => 40,
                 value => $POST{'newcaturl'} || '/'}
             );
-    $ret .= "<br /><i>example: '\/monkey_bars'</i></td></tr>\n";
+    $ret .= "<br /><i style='font-size:.8em;color:#666;'>example: '\/monkey_bars'</i></td></tr>\n";
     $ret .= "<tr><td colspan='2'>On unselected vertical & category case<br/>new category will be add to 'dummy' vertical</td></tr>";
 
     $ret .= "</table></p>\n";
@@ -136,6 +137,7 @@
 
     $ret .= LJ::html_hidden("vert_url_add", $vertical ? $vertical->uri : '');
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
     return "<body>$ret</body>";
 }

Modified: trunk/htdocs/admin/browse/add_community.bml
===================================================================
--- trunk/htdocs/admin/browse/add_community.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/add_community.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -114,6 +114,7 @@
     $ret .= "<p>" . LJ::html_submit('add', 'Add') . "</p>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
     return "<body>$ret</body>";
 }

Modified: trunk/htdocs/admin/browse/add_verticals.bml
===================================================================
--- trunk/htdocs/admin/browse/add_verticals.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/add_verticals.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -33,13 +33,14 @@
 
     $ret .= "<table border='0'>";
     $ret .= "<tr><td>Vertical name</td><td>Vertical Url</td></tr>";
-    $ret .= "<tr><td><input type='text' name='vert_name'></td><td><input type='text' name='vert_url'></td></tr>";
-    $ret .= "<tr><td></td><td>example: '/monkey_bars'</td></tr>";
+    $ret .= "<tr><td><input type='text' name='vert_name' style='width:200px;'/></td><td><input type='text' name='vert_url' style='width:200px;'/></td></tr>";
+    $ret .= "<tr><td></td><td style='color:#666;font-size:.8em;'>example: '/monkey_bars'</td></tr>";
     $ret .= "</table>";
 
     $ret .= "&nbsp;" . LJ::html_submit('go', 'Go') . "</p>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
 
     return "<body>$ret</body>";

Modified: trunk/htdocs/admin/browse/edit_verticals.bml
===================================================================
--- trunk/htdocs/admin/browse/edit_verticals.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/edit_verticals.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -34,7 +34,7 @@
     $ret .= "<form method='POST'>\n";
     $ret .= LJ::form_auth();
 
-    $ret .= "<table border='1' cellspacing='0' cellpadding='2'>";
+    $ret .= "<table style='border-collapse:collapse;margin:0 0 10px;'>";
     $ret .= "<tr><th>Vertical name</th><th>Vertical Url</th><th>Vertical Journal</th></tr>";
     foreach my $vert (@verticals) {
         my $vert_name    = $vert->{name};
@@ -42,15 +42,16 @@
         my $vert_id      = $vert->{vert_id};
         my $vert_journal = $vert->{journal};
         $ret .= "<tr>
-            <td><input type='text' name='$vert_id-name' value='$vert_name'></td>
-            <td><input type='text' name='$vert_id-url' value='$vert_url'></td>
-            <td><input type='text' name='$vert_id-journal' value='$vert_journal'></td>
+            <td style='padding:5px 5px 5px 0;'><input type='text' name='$vert_id-name' value='$vert_name'></td>
+            <td style='padding:5px 5px 5px 0;'><input type='text' name='$vert_id-url' value='$vert_url'></td>
+            <td style='padding:5px 5px 5px 0;'><input type='text' name='$vert_id-journal' value='$vert_journal'></td>
         </tr>";
     }
     $ret .= "</table>";
-    $ret .= "<br/><input type='submit' value='Save'>";
+    $ret .= "<input type='submit' value='Save'>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
 
     return "<body>$ret</body>";

Modified: trunk/htdocs/admin/browse/featured_communities.bml
===================================================================
--- trunk/htdocs/admin/browse/featured_communities.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/featured_communities.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -49,15 +49,14 @@
 <form method="post">
 <input type="hidden" name="vert_id" value="$vert_id">
 <table>
-    <caption>Enter community URL for adding:</caption>
+    <th colspan='2' style='padding:5px;'>Enter community URL for adding:</caption>
     <tr>
-        <td>URL:</td><td colspan="2"><input type="text" size="50" name="url"></td>
-        <td colspan="2"><input type="submit" name="add" value="Add"></td>
+        <td style='padding:5px;'>URL:</td>
+	<td style='padding:5px;'><input type="text" size="50" name="url"></td>
+        <td style='padding:5px;'><input type="submit" name="add" value="Add"></td>
     </tr>
 </table>
 </form>
-<br/>
-<br/>
 ADDPOST
 
     }
@@ -71,21 +70,24 @@
     }
 
     if (LJ::did_post() && $vertical) {
-        $ret .= "<b><div>Added Communities</div></p>";
+        $ret .= "<h2>Added Communities</h2>";
         my $comms = $vertical->load_communities( count => '100', is_random => 0 );
 
+        $ret .= "<ul style='list-style:none;line-height:1.6em;padding:0;'>";
         foreach (@$comms) {
             my $comm = LJ::load_userid($_->{journalid});
             my $url = $comm->journal_base;
             $ret .= "<li><a href='".$url."'>".$comm->display_name."</a>";
-            $ret .= "<form method='POST'>\n";
+            $ret .= "<form method='POST' style='display:inline;padding:0 0 0 10px;'>\n";
             $ret .= LJ::form_auth();
             $ret .= "<input type='hidden' name='rec_id' value='".$comm->userid."'>";
             $ret .= "<input type='hidden' name='vert_id' value='".$vertical->vert_id."'>";
-            $ret .= "<input type='submit' name='delete_comm' value='Remove post'>";
+            $ret .= "<input type='submit' name='delete_comm' value='Remove post' style='font-size:.8em;text-transform:lowercase;'>";
             $ret .= "</form>";
         }
+        $ret .= "</ul>";
     }
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
 
     return "<body>$ret</body>";

Modified: trunk/htdocs/admin/browse/index.bml
===================================================================
--- trunk/htdocs/admin/browse/index.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/index.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -17,27 +17,27 @@
     $title = "Verticals And Community Directory Admin";
     my $ret = "";
 
-    $ret .= "<h2>Manage Verticals</h2><blockquote>";
-    $ret .= "<p><a href='./add_verticals.bml'>Add Verticals</a></p>";
-    $ret .= "<p><a href='./edit_verticals.bml'>Edit Verticals</a></p>";
-    $ret .= "<p><a href='./remove_verticals.bml'>Remove Verticals</a></p>";
-    $ret .= "<p><a href='./recent_posts.bml'>Manage Recent Posts</a></p>";
-    $ret .= "<p><a href='./top_entries_vertical.bml'>Top Entries in communities</a></p>";
-    $ret .= "<p><a href='./featured_communities.bml'>Featured Communities</a></p>";
-    $ret .= "<p><a href='./search_tags.bml'>Editing Search Tags</a></p>";
-    $ret .= "</blockquote>";
+    $ret .= "<h2>Manage Verticals</h2><ul style='list-style:none;line-height:1.6em;padding:0 0 0 20px;'>";
+    $ret .= "<li><a href='./add_verticals.bml'>Add Verticals</a></li>";
+    $ret .= "<li><a href='./edit_verticals.bml'>Edit Verticals</a></li>";
+    $ret .= "<li><a href='./remove_verticals.bml'>Remove Verticals</a></li>";
+    $ret .= "<li><a href='./recent_posts.bml'>Manage Recent Posts</a></li>";
+    $ret .= "<li><a href='./top_entries_vertical.bml'>Top Entries in communities</a></li>";
+    $ret .= "<li><a href='./featured_communities.bml'>Featured Communities</a></li>";
+    $ret .= "<li><a href='./search_tags.bml'>Editing Search Tags</a></li>";
+    $ret .= "</ul>";
 
-    $ret .= "<h2>Manage Categories</h2><blockquote>";
-    $ret .= "<p><a href='./add_category.bml'>Add Category</a></p>";
-    $ret .= "<p><a href='./manage_category.bml'>Move Categories</a></p>";
-    $ret .= "<p><a href='./remove_category.bml'>Remove Category</a></p>";
-    $ret .= "</blockquote>";
+    $ret .= "<h2>Manage Categories</h2><ul style='list-style:none;line-height:1.6em;padding:0 0 0 20px;'>";
+    $ret .= "<li><a href='./add_category.bml'>Add Category</a></li>";
+    $ret .= "<li><a href='./manage_category.bml'>Move Categories</a></li>";
+    $ret .= "<li><a href='./remove_category.bml'>Remove Category</a></li>";
+    $ret .= "</ul>";
 
-    $ret .= "<h2>Manage Communities</h2><blockquote>";
-    $ret .= "<p><a href='./moderate_community.bml'>Moderate Community Submissions</a></p>";
-    $ret .= "<p><a href='./add_community.bml'>Add Community to Category</a></p>";
-    $ret .= "<p><a href='./remove_community.bml'>Remove Community from Category</a></p>";
-    $ret .= "</blockquote>";
+    $ret .= "<h2>Manage Communities</h2><ul style='list-style:none;line-height:1.6em;padding:0 0 0 20px;'>";
+    $ret .= "<li><a href='./moderate_community.bml'>Moderate Community Submissions</a></li>";
+    $ret .= "<li><a href='./add_community.bml'>Add Community to Category</a></li>";
+    $ret .= "<li><a href='./remove_community.bml'>Remove Community from Category</a></li>";
+    $ret .= "</ul>";
 
     $ret .= "<p><a href='./load_all_structure.bml'>Load All Structure</a></p>";
 

Modified: trunk/htdocs/admin/browse/manage_category.bml
===================================================================
--- trunk/htdocs/admin/browse/manage_category.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/manage_category.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -99,6 +99,7 @@
     $ret .= "<p>" . LJ::html_submit('move', 'Move') . "</p>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
     return "<body>$ret</body>";
 }

Modified: trunk/htdocs/admin/browse/moderate_community.bml
===================================================================
--- trunk/htdocs/admin/browse/moderate_community.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/moderate_community.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -95,6 +95,7 @@
     $ret .= "<p>" . LJ::html_submit('update', 'Update') . "</p>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
     return "<body>$ret</body>";
 }

Modified: trunk/htdocs/admin/browse/recent_posts.bml
===================================================================
--- trunk/htdocs/admin/browse/recent_posts.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/recent_posts.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -29,7 +29,7 @@
     my @vert_ids = map { { value => $_->vert_id, text => $_->name } } @verticals;
     @vert_ids = sort { $a cmp $b } @vert_ids;
 
-    $ret .= "<p>Select vertical:";
+    $ret .= "<p>Select vertical: ";
     $ret .= LJ::html_select({
                 name => 'vert_id',
                 selected => $vert_id },
@@ -53,7 +53,7 @@
     if ($vert_id) {
         my $vertical = LJ::Vertical->load_by_id($vert_id);
         my $cats = $vertical->get_categories;
-        $ret .= "<b><div>Recent Posts</div></p>";
+        $ret .= "<h2>Recent Posts</h2>";
         my @communities = ();
         foreach my $cat (@$cats) {
             my $c = LJ::Browse->load_by_id($cat->{catid});
@@ -67,20 +67,23 @@
 
         my @posts = LJ::Browse->search_posts( comms => \@communities, page_size => "$skip,$page_size", vertical => $vertical );
 
+        $ret .= "<ul style='list-style:none;line-height:1.6em;padding:0;'>";
         foreach (@posts) {
             my $url = $_->url;
             my $subject = $_->subject_text;
             my $jitemid = $_->jitemid;
             my $commid = $_->journalid;
             $ret .= "<li><a href='".$url."'>".($subject ? $subject : '...')."</a>";
-            $ret .= "<form method='POST'>\n";
+            $ret .= "<form method='POST' style='display:inline;padding:0 0 0 10px;'>\n";
             $ret .= LJ::form_auth();
             $ret .= "<input type='hidden' name='vert_id' value='".$vertical->vert_id."'>";
             $ret .= "<input type='hidden' name='rec_id' value='$jitemid-$commid'>";
-            $ret .= "<input type='submit' name='delete_post' value='Remove post'>";
-            $ret .= "</form>";
+            $ret .= "<input type='submit' name='delete_post' value='Remove post' style='font-size:.8em;text-transform:lowercase;'>";
+            $ret .= "</form></li>";
         }
+        $ret .= "</ul>";
     }
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
 
     return "<body>$ret</body>";

Modified: trunk/htdocs/admin/browse/remove_category.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_category.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/remove_category.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -98,6 +98,7 @@
     $ret .= "<p>" . LJ::html_submit('remove', 'Remove') . "</p>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
     return "<body>$ret</body>";
 }

Modified: trunk/htdocs/admin/browse/remove_community.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_community.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/remove_community.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -140,6 +140,7 @@
     }
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
     return "<body>$ret</body>";
 }

Modified: trunk/htdocs/admin/browse/remove_verticals.bml
===================================================================
--- trunk/htdocs/admin/browse/remove_verticals.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/remove_verticals.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -32,17 +32,18 @@
     $ret .= "<form method='POST'>\n";
     $ret .= LJ::form_auth();
 
-    $ret .= "<table border='1'>";
-    $ret .= "<tr><td>Vertical name</td><td>Vertical Url</td></tr>";
+    $ret .= "<table style='border-collapse:collapse;'>";
+    $ret .= "<tr><th style='border:1px solid #000;padding:5px;'>Vertical name</td><th style='border:1px solid #000;padding:5px;'>Vertical Url</td><th style='border:1px solid #000;padding:5px;'></td></tr>";
     foreach my $vert (@verticals) {
         my $vert_name = $vert->{name};
         my $vert_url  = $vert->{url};
         my $vert_id   = $vert->{vert_id};
-        $ret .= "<tr><td>$vert_name</td><td>$vert_url</td><td><input type='submit' name='delete_vert_$vert_id' value='Delete'></tr>";
+        $ret .= "<tr><td style='border:1px solid #000;padding:5px;'>$vert_name</td><td style='border:1px solid #000;padding:5px;'>$vert_url</td><td style='border:1px solid #000;padding:5px;'><input type='submit' name='delete_vert_$vert_id' value='Delete'></tr>";
     }
     $ret .= "</table>";
 
     $ret .= "</form>";
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
 
     return "<body>$ret</body>";

Modified: trunk/htdocs/admin/browse/search_tags.bml
===================================================================
--- trunk/htdocs/admin/browse/search_tags.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/search_tags.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -94,11 +94,12 @@
         $body .= '<input type="hidden" name="vert_id" value="'.$vertical->vert_id.'">';
         $body .= '</form>';
         # preview
-        $body .= '</div><div style="float:right;width:650px;">';
+        $body .= '</div><div style="float:right;width:650px;" class="appwidget-browse"><div class="vertical_view">';
 
         $body .= LJ::Widget::Search->render(vertical => $vertical, type => "tags", view => 'communities');
-        $body .= '</div>';
+        $body .= '</div></div>';
     }
+    $body .= "<p style='clear:both;'><a href='/admin/browse/'>Back to main page</a></p>";
 
     return $body;
 

Modified: trunk/htdocs/admin/browse/top_entries_vertical.bml
===================================================================
--- trunk/htdocs/admin/browse/top_entries_vertical.bml	2010-11-24 07:25:08 UTC (rev 17766)
+++ trunk/htdocs/admin/browse/top_entries_vertical.bml	2010-11-24 07:46:39 UTC (rev 17767)
@@ -64,29 +64,30 @@
 <form method="post">
 <input type="hidden" name="vert_id" value="$vert_id">
 <table>
-    <caption>Enter URL for adding featured post:</caption>
+    <tr><th colspan="3" style='padding:5px;'>Enter URL for adding featured post</th></tr>
     <tr>
-        <td>URL:</td><td colspan="2"><input type="text" size="50" name="url"></td>
-        <td colspan="2"><input type="submit" name="add" value="Add"></td>
+        <td style='padding:5px;'>URL:</td><td colspan="2"><input type="text" name="url" style='width:288px;'></td>
+        <td colspan="2" style='padding:5px;'><input type="submit" name="add" value="Add"></td>
     </tr>
 </table>
 </form>
-<br/>
-<br/>
 <form method="post">
 <input type="hidden" name="vert_id" value="$vert_id">
 <table>
     <tr>
-        <td>Number of shown entries: <input type="text" size="3" name="show_entries" value="$show_entries"></td>
+        <td style='padding:5px;'>Number of shown entries:</td><td style='padding:5px;' colspan='2'><input type="text" size="3" name="show_entries" value="$show_entries"></td>
     </tr>
     <tr>
-        <td>Number of entries, that can not be deleted: <input type="text" size="3" name="not_deleted" value="$not_deleted"> <input type="submit" name="store" value="Store"></td>
+        <td style='padding:5px;'>Number of entries, that can not be deleted:</td><td style='padding:5px;' colspan='2'><input type="text" size="3" name="not_deleted" value="$not_deleted"> </td>
     </tr>
     <tr>
-        <td>Remove post from widget after: <input type="text" size="3" name="remove_after" value="$remove_after"></td>
+        <td style='padding:5px;'>Remove post from widget after:</td><td style='padding:5px;'><input type="text" size="3" name="remove_after" value="$remove_after"></td><td style='padding:5px;'> hours</td>
     </tr>
+    <tr>
+    	<td style='padding:5px;' colspan='3'><input type="submit" name="store" value="Store"></td>
+    </tr>
 </table>
-</form><br/><br/>
+</form>
 ADDPOST
 
     }
@@ -100,9 +101,10 @@
     }
 
     if (LJ::did_post() && $vertical) {
-        $ret .= "<b><div>Added Posts</div></p>";
+        $ret .= "<h2>Added Posts</h2>";
         my $posts = $vertical->load_vertical_posts( count => '100', is_random => 0 );
 
+        $ret .= "<ul style='list-style:none;line-height:1.6em;padding:0;'>";
         foreach (@$posts) {
             my $entry = LJ::Entry->new ($_->{journalid}, jitemid => $_->{jitemid});
             my $url = $entry->url;
@@ -110,14 +112,16 @@
             my $jitemid = $entry->jitemid;
             my $commid = $entry->journalid;
             $ret .= "<li><a href='".$url."'>".($subject ? $subject : '...')."</a>";
-            $ret .= "<form method='POST'>\n";
+            $ret .= "<form method='POST' style='display:inline;padding:0 0 0 10px;'>\n";
             $ret .= LJ::form_auth();
             $ret .= "<input type='hidden' name='rec_id' value='$jitemid-$commid'>";
             $ret .= "<input type='hidden' name='vert_id' value='".$vertical->vert_id."'>";
-            $ret .= "<input type='submit' name='delete_post' value='Remove post'>" if scalar @$posts > $vertical->not_deleted;
+            $ret .= "<input type='submit' name='delete_post' value='Remove post' style='font-size:.8em;text-transform:lowercase;'>" if scalar @$posts > $vertical->not_deleted;
             $ret .= "</form>";
         }
+        $ret .= "</ul>";
     }
+    $ret .= "<p><a href='/admin/browse/'>Back to main page</a></p>";
 
 
     return "<body>$ret</body>";

Tags: bml, livejournal, wisest-owl
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