2 column Tags page, needs more styling

git-svn-id: http://svn.automattic.com/wordpress/trunk@9339 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-10-25 08:01:37 +00:00
parent 8f7da19ebb
commit b3e5e7a718
5 changed files with 124 additions and 29 deletions

View File

@ -769,6 +769,10 @@ div#media-upload-error, .file-error, abbr.required, .widget-control-remove:hover
color: #333;
}
.form-wrap .form-field {
background-color: #f5f5f5;
}
/* Diff */
table.diff .diff-deletedline {

View File

@ -49,6 +49,29 @@
margin-right: 305px;
}
/* 2 columns main area */
#col-container {
overflow: hidden;
padding: 0;
margin: 0;
}
#col-left {
padding: 0;
margin: 0;
overflow: hidden;
width: 39%;
}
#col-right {
float: right;
clear: right;
overflow: hidden;
padding: 0;
margin: 0;
width: 59%;
}
/* styles for use by people extending the WordPress interface */

View File

@ -6,33 +6,21 @@
* @subpackage Administration
*/
if ( ! empty($tag_ID) ) {
/**
* @var string
*/
$heading = '';
$submit_text = __('Edit Tag');
$form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">';
$action = 'editedtag';
$nonce_action = 'update-tag_' . $tag_ID;
do_action('edit_tag_form_pre', $tag);
} else {
$heading = '<h2>' . __('Add Tag') . '</h2>';
$submit_text = __('Add Tag');
$form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">';
$action = 'addtag';
$nonce_action = 'add-tag';
do_action('add_tag_form_pre', $tag);
if ( empty($tag_ID) ) { ?>
<div id="message" class="updated fade"><p><strong><?php _e('A tag was not selected for editing.'); ?></strong></p></div>
<?php
return;
}
?>
do_action('edit_tag_form_pre', $tag); ?>
<div class="wrap">
<?php echo $heading ?>
<h2><?php _e('Edit Tag'); ?></h2>
<div id="ajax-response"></div>
<?php echo $form ?>
<input type="hidden" name="action" value="<?php echo $action ?>" />
<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">
<input type="hidden" name="action" value="editedtag" />
<input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?>
<table class="form-table">
<tr class="form-field form-required">
<th scope="row" valign="top"><label for="name"><?php _e('Tag name') ?></label></th>
@ -45,7 +33,7 @@ if ( ! empty($tag_ID) ) {
<p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p></td>
</tr>
</table>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Edit Tag'); ?>" /></p>
<?php do_action('edit_tag_form', $tag); ?>
</form>
</div>

View File

@ -154,9 +154,12 @@ endif; ?>
</form>
<br class="clear" />
<div id="col-container">
<div id="col-right">
<div class="col-wrap">
<form id="posts-filter" action="" method="get">
<div class="tablenav">
<?php
$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0;
if ( empty($pagenum) )
@ -233,17 +236,53 @@ if ( $page_links )
<br class="clear" />
</form>
</div>
</div><!-- /col-right -->
<div id="col-left">
<div class="col-wrap">
<?php if ( current_user_can('manage_categories') ) {
do_action('add_tag_form_pre', $tag); ?>
<h3><?php _e('Add a New Tag'); ?></h3>
<div id="ajax-response"></div>
<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">
<input type="hidden" name="action" value="addtag" />
<input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />
<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('add-tag'); ?>
<div class="form-wrap">
<div class="form-field form-required">
<label for="name"><?php _e('Tag name') ?></label>
<input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo attribute_escape($tag->name); ?>" size="40" aria-required="true" />
<p><?php _e('The name is how the tag appears on your site.'); ?></p>
</div>
<?php if ( current_user_can('manage_categories') ) : ?>
<div class="form-field">
<label for="slug"><?php _e('Tag slug') ?></label>
<input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
<p><?php _e('The &#8220;slug&#8221; is the URL-friendly version of the name. It is usually all lowercase and contains only letters, numbers, and hyphens.'); ?></p>
</div></div>
<br />
<?php include('edit-tag-form.php'); ?>
<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Tag'); ?>" /></p>
<?php
do_action('edit_tag_form', $tag);
} ?>
</form>
<div class="tagcloud">
<h3><?php _e('Popular Tags'); ?></h3>
<?php wp_tag_cloud(); ?>
</div>
</div>
</div><!-- /col-left -->
</div><!-- /col-container -->
</div><!-- /wrap -->
<?php inline_edit_term_row('tag'); ?>
<?php endif; ?>
<?php
break;
}

View File

@ -1182,6 +1182,47 @@ table.form-table td .updated {
font-size: 13px;
}
/* divs for cats and tags pages */
.col-wrap h3 {
margin: 12px 0;
}
.form-wrap {
margin: 8px 0 -8px;
font-size: 11px;
width: 90%;
}
.form-wrap label {
display: block;
padding: 2px;
font-weight: bold;
}
.form-wrap input {
width: 95%;
}
.form-wrap p {
margin: 2px 0 5px;
font-style: italic;
}
.form-wrap .form-field {
margin: 0 0 10px;
padding: 8px;
}
.col-wrap p.submit {
width: 90%;
}
.tagcloud {
width: 90%;
margin: 20px 5px 5px;
}
/* Post Screen */
#normal-sortables {