Make WordPress Core

Changeset 9339


Ignore:
Timestamp:
10/25/2008 08:01:37 AM (16 years ago)
Author:
azaozz
Message:

2 column Tags page, needs more styling

Location:
trunk/wp-admin
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/css/colors-fresh.css

    r9328 r9339  
    770770}
    771771
     772.form-wrap .form-field {
     773    background-color: #f5f5f5;
     774}
     775
    772776/* Diff */
    773777
  • trunk/wp-admin/css/global.css

    r9328 r9339  
    5050}
    5151
     52/* 2 columns main area */
     53
     54#col-container {
     55    overflow: hidden;
     56    padding: 0;
     57    margin: 0;
     58}
     59
     60#col-left {
     61    padding: 0;
     62    margin: 0;
     63    overflow: hidden;
     64    width: 39%;
     65}
     66
     67#col-right {
     68    float: right;
     69    clear: right;
     70    overflow: hidden;
     71    padding: 0;
     72    margin: 0;
     73    width: 59%;
     74}
    5275
    5376/* styles for use by people extending the WordPress interface */
  • trunk/wp-admin/edit-tag-form.php

    r9032 r9339  
    77 */
    88
    9 if ( ! empty($tag_ID) ) {
    10     /**
    11      * @var string
    12      */
    13     $heading = '';
    14     $submit_text = __('Edit Tag');
    15     $form = '<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">';
    16     $action = 'editedtag';
    17     $nonce_action = 'update-tag_' . $tag_ID;
    18     do_action('edit_tag_form_pre', $tag);
    19 } else {
    20     $heading = '<h2>' . __('Add Tag') . '</h2>';
    21     $submit_text = __('Add Tag');
    22     $form = '<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">';
    23     $action = 'addtag';
    24     $nonce_action = 'add-tag';
    25     do_action('add_tag_form_pre', $tag);
     9if ( empty($tag_ID) ) { ?>
     10    <div id="message" class="updated fade"><p><strong><?php _e('A tag was not selected for editing.'); ?></strong></p></div>
     11<?php
     12    return;
    2613}
    27 ?>
     14
     15do_action('edit_tag_form_pre', $tag); ?>
    2816
    2917<div class="wrap">
    30 <?php echo $heading ?>
     18<h2><?php _e('Edit Tag'); ?></h2>
    3119<div id="ajax-response"></div>
    32 <?php echo $form ?>
    33 <input type="hidden" name="action" value="<?php echo $action ?>" />
     20<form name="edittag" id="edittag" method="post" action="edit-tags.php" class="validate">
     21<input type="hidden" name="action" value="editedtag" />
    3422<input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />
    35 <?php wp_original_referer_field(true, 'previous'); wp_nonce_field($nonce_action); ?>
     23<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('update-tag_' . $tag_ID); ?>
    3624    <table class="form-table">
    3725        <tr class="form-field form-required">
     
    4634        </tr>
    4735    </table>
    48 <p class="submit"><input type="submit" class="button" name="submit" value="<?php echo $submit_text ?>" /></p>
     36<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Edit Tag'); ?>" /></p>
    4937<?php do_action('edit_tag_form', $tag); ?>
    5038</form>
  • trunk/wp-admin/edit-tags.php

    r9328 r9339  
    155155<br class="clear" />
    156156
     157<div id="col-container">
     158
     159<div id="col-right">
     160<div class="col-wrap">
    157161<form id="posts-filter" action="" method="get">
    158162<div class="tablenav">
    159 
    160163<?php
    161164$pagenum = isset( $_GET['pagenum'] ) ? absint( $_GET['pagenum'] ) : 0;
     
    234237<br class="clear" />
    235238</form>
    236 
    237 </div>
    238 
    239 <?php if ( current_user_can('manage_categories') ) : ?>
    240 
    241 <br />
    242 <?php include('edit-tag-form.php'); ?>
     239</div>
     240</div><!-- /col-right -->
     241
     242<div id="col-left">
     243<div class="col-wrap">
     244<?php if ( current_user_can('manage_categories') ) {
     245    do_action('add_tag_form_pre', $tag); ?>
     246
     247<h3><?php _e('Add a New Tag'); ?></h3>
     248<div id="ajax-response"></div>
     249<form name="addtag" id="addtag" method="post" action="edit-tags.php" class="add:the-list: validate">
     250<input type="hidden" name="action" value="addtag" />
     251<input type="hidden" name="tag_ID" value="<?php echo $tag->term_id ?>" />
     252<?php wp_original_referer_field(true, 'previous'); wp_nonce_field('add-tag'); ?>
     253
     254<div class="form-wrap">
     255<div class="form-field form-required">
     256    <label for="name"><?php _e('Tag name') ?></label>
     257    <input name="name" id="name" type="text" value="<?php if ( isset( $tag->name ) ) echo attribute_escape($tag->name); ?>" size="40" aria-required="true" />
     258    <p><?php _e('The name is how the tag appears on your site.'); ?></p>
     259</div>
     260
     261<div class="form-field">
     262    <label for="slug"><?php _e('Tag slug') ?></label>
     263    <input name="slug" id="slug" type="text" value="<?php if ( isset( $tag->slug ) ) echo attribute_escape(apply_filters('editable_slug', $tag->slug)); ?>" size="40" />
     264    <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>
     265</div></div>
     266
     267<p class="submit"><input type="submit" class="button" name="submit" value="<?php _e('Add Tag'); ?>" /></p>
     268<?php
     269do_action('edit_tag_form', $tag);
     270
     271} ?>
     272</form>
     273
     274<div class="tagcloud">
     275<h3><?php _e('Popular Tags'); ?></h3>
     276<?php wp_tag_cloud(); ?>
     277</div>
     278
     279</div>
     280</div><!-- /col-left -->
     281
     282</div><!-- /col-container -->
     283</div><!-- /wrap -->
    243284<?php inline_edit_term_row('tag'); ?>
    244285
    245 <?php endif; ?>
    246 
    247286<?php
    248287break;
  • trunk/wp-admin/wp-admin.css

    r9330 r9339  
    11811181table.form-table td .updated {
    11821182    font-size: 13px;
     1183}
     1184
     1185/* divs for cats and tags pages */
     1186
     1187.col-wrap h3 {
     1188    margin: 12px 0;
     1189}
     1190
     1191.form-wrap {
     1192    margin: 8px 0 -8px;
     1193    font-size: 11px;
     1194    width: 90%;
     1195}
     1196
     1197.form-wrap label {
     1198    display: block;
     1199    padding: 2px;
     1200    font-weight: bold;
     1201}
     1202
     1203.form-wrap input {
     1204    width: 95%;
     1205}
     1206
     1207.form-wrap p {
     1208    margin: 2px 0 5px;
     1209    font-style: italic;
     1210}
     1211
     1212.form-wrap .form-field {
     1213    margin: 0 0 10px;
     1214    padding: 8px;
     1215}
     1216
     1217.col-wrap p.submit {
     1218    width: 90%;
     1219}
     1220
     1221.tagcloud {
     1222    width: 90%;
     1223    margin: 20px 5px 5px;
    11831224}
    11841225
Note: See TracChangeset for help on using the changeset viewer.