Dotclear

Changeset 933:16f917091b24


Ignore:
Timestamp:
10/29/12 13:50:52 (13 years ago)
Author:
franck <carnet.franck.paul@…>
Branch:
default
Message:

Add post status icon after his title on edit entry page, (may be) fixes #814

File:
1 edited

Legend:

Unmodified
Added
Removed
  • admin/post.php

    r916 r933  
    6666     $status_combo[$v] = (string) $k; 
    6767} 
     68$img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />'; 
    6869 
    6970# Formaters combo 
     
    320321 
    321322echo '<h2>'.html::escapeHTML($core->blog->name).' &rsaquo; '.'<a href="posts.php">'.__('Entries').'</a> &rsaquo; <span class="page-title">'.$page_title; 
    322  
    323      if ($post_id) { 
    324           echo ' &ldquo;'.$post_title.'&rdquo;'; 
    325      } 
     323if ($post_id) { 
     324     switch ($post_status) { 
     325          case 1: 
     326               $img_status = sprintf($img_status_pattern,__('published'),'check-on.png'); 
     327               break; 
     328          case 0: 
     329               $img_status = sprintf($img_status_pattern,__('unpublished'),'check-off.png'); 
     330               break; 
     331          case -1: 
     332               $img_status = sprintf($img_status_pattern,__('scheduled'),'scheduled.png'); 
     333               break; 
     334          case -2: 
     335               $img_status = sprintf($img_status_pattern,__('pending'),'check-wrn.png'); 
     336               break; 
     337          default: 
     338               $img_status = ''; 
     339     } 
     340     echo ' &ldquo;'.$post_title.'&rdquo;'.' '.$img_status; 
     341} 
    326342echo '</span></h2>'; 
    327343 
Note: See TracChangeset for help on using the changeset viewer.

Sites map