Make WordPress Core

Changeset 8300


Ignore:
Timestamp:
07/09/2008 07:50:05 AM (16 years ago)
Author:
mdawaffe
Message:

crazyhorse: fix up edit comments page

Location:
branches/crazyhorse/wp-admin
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/crazyhorse/wp-admin/edit-form-comment.php

    r7883 r8300  
    1515<div id="poststuff">
    1616
    17 <div class="submitbox" id="submitcomment">
    18 
    19 <div id="previewview">
    20 <a href="<?php echo get_comment_link(); ?>" target="_blank"><?php _e('View this Comment'); ?></a>
    21 </div>
    22 
    23 <div class="inside">
    24 
    25 <p><strong><label for='comment_status'><?php _e('Approval Status') ?></label></strong></p>
    26 <p>
    27 <select name='comment_status' id='comment_status'>
    28 <option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option>
    29 <option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option>
    30 <option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option>
    31 </select>
     17<p id="big-add-button">
     18<span id="previewview">
     19<a href="<?php echo get_comment_link(); ?>" class="button" target="_blank"><?php _e('View this Comment'); ?></a>
     20</span>
    3221</p>
    3322
    34 <?php
    35 $stamp = __('%1$s at %2$s');
    36 $date = mysql2date(get_option('date_format'), $comment->comment_date);
    37 $time = mysql2date(get_option('time_format'), $comment->comment_date);
    38 ?>
    39 <p class="curtime"><?php printf($stamp, $date, $time); ?>
    40 &nbsp;<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><?php _e('Edit') ?></a></p>
    41 
    42 <div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
    43 
    44 </div>
    45 
    46 <p class="submit">
    47 <input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
    48 <?php
    49 echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
    50 ?>
    51 </p>
    52 
     23<!-- crazyhorse
    5324<div class="side-info">
    5425<h5><?php _e('Related') ?></h5>
     
    6233<?php do_action('submitcomment_box'); ?>
    6334</div>
     35-->
    6436
    65 <div id="post-body">
    66 <div id="namediv" class="stuffbox">
    67 <h3><label for="name"><?php _e('Name') ?></label></h3>
    68 <div class="inside">
    69 <input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" />
    70 </div>
    71 </div>
     37<div id="side-info-column" class="inner-sidebar">
    7238
    7339<div id="emaildiv" class="stuffbox">
     
    8551</div>
    8652
     53<div id="statusdiv" class="stuffbox">
     54<h3><label for='comment_status'><?php _e('Approval Status') ?></label></h3>
     55<div class="inside">
     56<select name='comment_status' id='comment_status'>
     57<option<?php selected( $comment->comment_approved, '1' ); ?> value='1'><?php _e('Approved') ?></option>
     58<option<?php selected( $comment->comment_approved, '0' ); ?> value='0'><?php _e('Moderated') ?></option>
     59<option<?php selected( $comment->comment_approved, 'spam' ); ?> value='spam'><?php _e('Spam') ?></option>
     60</select>
     61</div>
     62</div>
     63
     64</div>
     65
     66<div id="post-body" class="has-sidebar">
     67<div id="post-body-content" class="has-sidebar-content">
     68
     69<div id="namediv" class="stuffbox">
     70<h3><label for="name"><?php _e('Name') ?></label></h3>
     71<div class="inside">
     72<input type="text" name="newcomment_author" size="30" value="<?php echo attribute_escape( $comment->comment_author ); ?>" tabindex="1" id="name" />
     73</div>
     74</div>
     75
     76
    8777<div id="postdiv" class="postarea">
    8878<h3><label for="content"><?php _e('Comment') ?></label></h3>
    8979<?php the_editor($comment->comment_content, 'content', 'newcomment_author_url', false, 4); ?>
    9080<?php wp_nonce_field( 'closedpostboxes', 'closedpostboxesnonce', false ); ?>
     81</div>
     82
     83<div id="submitpost" class="submitbox">
     84<div id="comment-time-info" class="alignleft">
     85<?php
     86$stamp = __('Timestamp: <span class="timestamp">%1$s at %2$s %3$s</span>');
     87$date = mysql2date(get_option('date_format'), $comment->comment_date);
     88$time = mysql2date(get_option('time_format'), $comment->comment_date);
     89$edit = '<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js">' . __('(Change)') . '</a>';
     90
     91?>
     92<p class="curtime"><?php printf($stamp, $date, $time, $edit); ?></p>
     93
     94<div id='timestampdiv' class='hide-if-js'><?php touch_time(('editcomment' == $action), 0, 5); ?></div>
     95</div>
     96
     97<p class="submit alignright">
     98<?php
     99echo "<a class='submitdelete' href='" . wp_nonce_url("comment.php?action=deletecomment&amp;c=$comment->comment_ID&amp;_wp_original_http_referer=" . wp_get_referer(), 'delete-comment_' . $comment->comment_ID) . "' onclick=\"if ( confirm('" . js_escape(__("You are about to delete this comment. \n  'Cancel' to stop, 'OK' to delete.")) . "') ) { return true;}return false;\">" . __('Delete comment') . "</a>";
     100?>
     101<input type="submit" name="save" value="<?php _e('Save'); ?>" tabindex="4" class="button button-highlighted" />
     102</p>
     103
     104<br class="clear" />
     105
    91106</div>
    92107
     
    98113<?php wp_original_referer_field(true, 'previous'); ?>
    99114<input type="hidden" name="noredir" value="1" />
     115
     116</div>
    100117</div>
    101118</div>
  • branches/crazyhorse/wp-admin/js/comment.js

    r7529 r8300  
    1212        if (jQuery('#timestampdiv').is(":hidden")) {
    1313            jQuery('#timestampdiv').slideDown("normal");
    14             jQuery('.edit-timestamp').text(commentL10n.cancel);
     14            jQuery('.timestamp').hide();
    1515        } else {
    1616            jQuery('#timestampdiv').hide();
     
    2020            jQuery('#hh').val(jQuery('#hidden_hh').val());
    2121            jQuery('#mn').val(jQuery('#hidden_mn').val());
    22             jQuery('.edit-timestamp').text(commentL10n.edit);
     22            jQuery('.timestamp').show();
    2323        }
    2424        return false;
    25     });
     25
     26    });
     27    jQuery('.save-timestamp').click(function () { // crazyhorse - multiple ok cancels
     28        jQuery('#timestampdiv').hide();
     29        var link = jQuery('.timestamp a').clone( true );
     30        jQuery('.timestamp').show().html(
     31            jQuery( '#mm option[value=' + jQuery('#mm').val() + ']' ).text() + ' ' +
     32            jQuery('#jj').val() + ', ' +
     33            jQuery('#aa').val() + ' @ ' +
     34            jQuery('#hh').val() + ':' +
     35            jQuery('#mn').val() + ' '
     36        ).append( link );
     37        return false;
     38    });
    2639});
  • branches/crazyhorse/wp-admin/wp-admin.css

    r8293 r8300  
    284284}
    285285
    286 #namediv, #poststuff #namediv {
    287     margin-top: 10px;
     286#emaildiv input, #uridiv input {
     287    width: 94%;
    288288}
    289289
Note: See TracChangeset for help on using the changeset viewer.