Make WordPress Core

Changeset 6878


Ignore:
Timestamp:
02/16/2008 10:08:13 PM (18 years ago)
Author:
ryan
Message:

Theme editor restyling from hansengel. see #5871

Location:
trunk/wp-admin
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/theme-editor.php

    r6772 r6878  
    66
    77wp_reset_vars(array('action', 'redirect', 'profile', 'error', 'warning', 'a', 'file', 'theme'));
     8wp_admin_css( 'css/theme-editor' );
    89
    910$themes = get_themes();
     
    7980<?php if (isset($_GET['a'])) : ?>
    8081 <div id="message" class="updated fade"><p><?php _e('File edited successfully.') ?></p></div>
    81 <?php endif; ?>
    82  <div class="wrap">
    83     <form name="theme" action="theme-editor.php" method="post">
    84         <?php _e('Select theme to edit:') ?>
    85         <select name="theme" id="theme">
    86     <?php
    87         foreach ($themes as $a_theme) {
    88         $theme_name = $a_theme['Name'];
    89         if ($theme_name == $theme) $selected = " selected='selected'";
    90         else $selected = '';
    91         $theme_name = attribute_escape($theme_name);
    92         echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>";
    93     }
     82<?php endif;
     83
     84$description = get_file_description($file);
     85$desc_header = ( $description != $file_show ) ? "$description</strong> (%s)" : "%s";
    9486?>
    95  </select>
    96  <input type="submit" name="Submit" value="<?php _e('Select &raquo;') ?>" class="button" />
    97  </form>
    98  </div>
    99 
    100  <div class="wrap">
    101   <?php
    102     if ( is_writeable($real_file) ) {
    103         echo '<h2>' . sprintf(__('Editing <code>%s</code>'), $file_show) . '</h2>';
    104     } else {
    105         echo '<h2>' . sprintf(__('Browsing <code>%s</code>'), $file_show) . '</h2>';
    106     }
    107     ?>
     87<div class="wrap">
     88<div class="bordertitle">
     89    <h2 style="border: none; padding-bottom: 0px;">Theme Editor</h2>
     90    <form id="themeselector" name="theme" action="theme-editor.php" method="post">
     91        <strong><?php _e('Select theme to edit: '); ?></strong>
     92        <select name="theme" id="theme" style="margin: 0; padding: 0;">
     93<?php
     94    foreach ($themes as $a_theme) {
     95    $theme_name = $a_theme['Name'];
     96    if ($theme_name == $theme) $selected = " selected='selected'";
     97    else $selected = '';
     98    $theme_name = attribute_escape($theme_name);
     99    echo "\n\t<option value=\"$theme_name\" $selected>$theme_name</option>";
     100}
     101?>
     102        </select>
     103        <input type="submit" name="Submit" value="<?php _e('Select') ?>" class="button" style="padding: 0px;" />
     104    </form>
     105</div>
     106<br style="clear: both;" />
     107<div class="tablenav" style="margin-right: 210px;">
     108<div style="float: left;">
     109<big><strong><?php echo sprintf($desc_header, $file_show); ?></big>
     110</div>
     111<br style="clear: both;" />
     112</div>
     113<br style="clear: both;" />
    108114    <div id="templateside">
    109     <h3><?php printf(__("<strong>'%s'</strong> theme files"), $theme) ?></h3>
     115    <h3 id="bordertitle" style="margin-bottom: 10px;"><?php _e("Theme Files"); ?></h3>
    110116
    111117<?php
    112118if ($allowed_files) :
    113119?>
     120    <h4 style="margin-bottom: 0px;"><?php _e('Templates'); ?></h4>
    114121    <ul>
    115 <?php foreach($allowed_files as $allowed_file) : ?>
    116          <li><a href="theme-editor.php?file=<?php echo "$allowed_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>"><?php echo get_file_description($allowed_file); ?></a></li>
     122<?php foreach($themes[$theme]['Template Files'] as $template_file) :
     123        $description = get_file_description($template_file);
     124        $template_show = basename($template_file);
     125        $filedesc = ( $description != $template_file ) ? "$description <span class='nonessential'>($template_show)</span></small>" : "$description";
     126        $filedesc = ( $template_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($template_show)</span></span>" : $filedesc;
     127        ?>
     128        <li><a href="theme-editor.php?file=<?php echo "$template_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>"><?php echo $filedesc ?></a></li>
     129<?php endforeach; ?>
     130    </ul>
     131    <h4 style="margin-bottom: 0px;"><?php _e('Styles'); ?></h4>
     132    <ul>
     133<?php foreach($themes[$theme]['Stylesheet Files'] as $style_file) :
     134        $description = get_file_description($style_file);
     135        $style_show = basename($style_file);
     136        $filedesc = ( $description != $style_file ) ? "$description <span class='nonessential'>($style_show)</span>" : "$description";
     137        $filedesc = ( $style_file == $file ) ? "<span class='highlight'>$description <span class='nonessential'>($style_show)</span></span>" : $filedesc;
     138        ?>
     139        <li><a href="theme-editor.php?file=<?php echo "$style_file"; ?>&amp;theme=<?php echo urlencode($theme) ?>"><?php echo $filedesc ?></a></li>
    117140<?php endforeach; ?>
    118141    </ul>
  • trunk/wp-admin/wp-admin.css

    r6868 r6878  
    379379#template, #template div, #editcat, #addcat {
    380380    zoom: 1;
    381 }
    382 
    383 #template textarea {
    384     font: small 'Courier New', Courier, monospace;
    385     width: 97%;
    386 }
    387 
    388 #templateside {
    389     float: right;
    390     width: 170px;
    391     overflow: hidden;
    392 }
    393 
    394 #templateside h3, #postcustom p.submit {
    395     margin: 0;
    396 }
    397 
    398 #templateside ol, #templateside ul {
    399     list-style: none;
    400     margin: .5em;
    401     padding: 0;
    402381}
    403382
     
    12201199}
    12211200
     1201.bordertitle {
     1202    padding-bottom: 5px;
     1203    border-bottom: 1px solid #dadada;
     1204}
     1205
    12221206/* Global classes */
    12231207.wp-hidden-children .wp-hidden-child { display: none; }
Note: See TracChangeset for help on using the changeset viewer.