UI cleanup, todo: i18n

git-svn-id: http://svn.automattic.com/wordpress/trunk@3617 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
matt 2006-03-06 02:52:18 +00:00
parent c3170f0c6b
commit adb8409d4d
1 changed files with 23 additions and 48 deletions

View File

@ -87,45 +87,29 @@ if ( isset($_GET['deleted']) ) {
?> ?>
<div class="wrap"> <div class="wrap">
<h2><?php _e('Bookmark Management'); ?></h2> <h2><?php _e('Bookmark Management'); ?></h2>
<form name="cats" method="post" action=""> <p><?php _e('Here you add links to sites that you visit often and share them on your blog. When you have a list of links in your sidebar to other blogs, it&#8217;s called a &#8220;blogroll.&#8221;'); ?></p>
<table width="75%" cellpadding="3" cellspacing="3"> <form id="cats" method="get" action="">
<tr> <p>Currently showing
<td> <?php $categories = get_categories("hide_empty=1&type=link"); ?>
<?php _e('<strong>Show</strong> bookmarks in category:'); ?><br /> <select name="cat_id">
</td> <option value="all" <?php echo ($cat_id == 'all') ? " selected='selected'" : ''; ?>><?php _e('All') ?></option>
<td> <?php foreach ($categories as $cat): ?>
<?php _e('<strong>Order</strong> by:');?> <option value="<?php echo $cat->cat_ID; ?>"<?php echo ($cat->cat_ID == $cat_id) ? " selected='selected'" : ''; ?>><?php echo wp_specialchars($cat->cat_name); ?>
</td> </option>
<td>&nbsp;</td> <?php endforeach; ?>
</tr> </select>
<tr> bookmarks ordered by
<td> <select name="order_by">
<?php $categories = get_categories("hide_empty=1&type=link"); ?> <option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option>
<select name="cat_id"> <option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option>
<option value="all" <?php echo ($cat_id == 'all') ? " selected='selected'" : ''; ?>><?php _e('All') ?></option> <option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('URI') ?></option>
<?php foreach ($categories as $cat): ?> </select>
<option value="<?php echo $cat->cat_ID; ?>"<?php echo ($cat->cat_ID == $cat_id) ? " selected='selected'" : ''; ?>><?php echo wp_specialchars($cat->cat_name); ?> <input type="submit" name="action" value="<?php _e('Update &raquo;') ?>" />
</option>
<?php endforeach; ?>
</select>
</td>
<td>
<select name="order_by">
<option value="order_id" <?php if ($order_by == 'order_id') echo " selected='selected'";?>><?php _e('Bookmark ID') ?></option>
<option value="order_name" <?php if ($order_by == 'order_name') echo " selected='selected'";?>><?php _e('Name') ?></option>
<option value="order_url" <?php if ($order_by == 'order_url') echo " selected='selected'";?>><?php _e('URI') ?></option>
<option value="order_desc" <?php if ($order_by == 'order_desc') echo " selected='selected'";?>><?php _e('Description') ?></option>
</select>
</td>
<td>
<input type="submit" name="action" value="<?php _e('Show') ?>" />
</td>
</tr>
</table>
</form> </form>
<form name="links" id="links" method="post" action="link.php"> <form id="links" method="post" action="link.php">
<input type="hidden" name="link_id" value="" /> <input type="hidden" name="link_id" value="" />
<input type="hidden" name="action" value="" /> <input type="hidden" name="action" value="" />
<input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" /> <input type="hidden" name="order_by" value="<?php echo wp_specialchars($order_by, 1); ?>" />
@ -138,7 +122,7 @@ if ( isset($_GET['deleted']) ) {
<th><?php _e('rel') ?></th> <th><?php _e('rel') ?></th>
<th><?php _e('Visible') ?></th> <th><?php _e('Visible') ?></th>
<th colspan="2"><?php _e('Action') ?></th> <th colspan="2"><?php _e('Action') ?></th>
<th>&nbsp;</th> <th><input type="checkbox" onclick="checkAll(document.getElementById('links'));" /></th>
</tr> </tr>
<?php <?php
if ( 'all' == $cat_id ) if ( 'all' == $cat_id )
@ -186,7 +170,7 @@ if ($links)
echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>'; echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=edit" class="edit">'.__('Edit').'</a></td>';
echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=delete"'." class='delete' onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the &quot;%s&quot; bookmark to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars($link->link_name, 1), wp_specialchars($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>'; echo '<td><a href="link.php?link_id='.$link->link_id.'&amp;action=delete"'." class='delete' onclick=\"return deleteSomething( 'link', $link->link_id , '".sprintf(__("You are about to delete the &quot;%s&quot; bookmark to %s.\\n&quot;Cancel&quot; to stop, &quot;OK&quot; to delete."), wp_specialchars($link->link_name, 1), wp_specialchars($link->link_url)).'\' );" class="delete">'.__('Delete').'</a></td>';
echo '<td><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>'; echo '<td align="center"><input type="checkbox" name="linkcheck[]" value="'.$link->link_id.'" /></td>';
echo "\n </tr>\n"; echo "\n </tr>\n";
} }
?> ?>
@ -194,16 +178,7 @@ if ($links)
<div id="ajax-response"></div> <div id="ajax-response"></div>
<table width="100%" cellpadding="3" cellspacing="3"> <p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Bookmarks') ?>" onclick="return confirm('<?php _e("You are about to delete these bookmarks permanently \\n \'Cancel\' to stop, \'OK\' to delete.") ?>')" /></p>
<tr>
<td>
<p class="submit"><input type="submit" class="button" name="deletebookmarks" id="deletebookmarks" value="<?php _e('Delete Checked Bookmarks') ?>" onclick="return confirm('<?php _e("You are about to delete these bookmarks permanently \\n \'Cancel\' to stop, \'OK\' to delete.") ?>')" /></p>
</td>
<td align="right">
<a href="#" onclick="checkAll(document.getElementById('links')); return false; "><?php _e('Toggle Checkboxes') ?></a>
</td>
</tr>
</table>
</div> </div>
</form> </form>