Commits

Franck Paul committed 1be5371

Add status icon after page's title, fixes #1352

Comments (0)

Files changed (1)

plugins/pages/page.php

 foreach ($core->blog->getAllPostStatus() as $k => $v) {
 	$status_combo[$v] = (string) $k;
 }
+$img_status_pattern = '<img class="img_select_option" alt="%1$s" title="%1$s" src="images/%2$s" />';
 
 # Formaters combo
 foreach ($core->getFormaters() as $v) {
 echo '<h2>'.html::escapeHTML($core->blog->name).
 ' &rsaquo; <a href="'.$p_url.'">'.__('Pages').'</a> &rsaquo; <span class="page-title">'.$page_title; 
 	if ($post_id) {
-		echo ' &ldquo;'.$post_title.'&rdquo;';
+		switch ($post_status) {
+			case 1:
+				$img_status = sprintf($img_status_pattern,__('published'),'check-on.png');
+				break;
+			case 0:
+				$img_status = sprintf($img_status_pattern,__('unpublished'),'check-off.png');
+				break;
+			case -1:
+				$img_status = sprintf($img_status_pattern,__('scheduled'),'scheduled.png');
+				break;
+			case -2:
+				$img_status = sprintf($img_status_pattern,__('pending'),'check-wrn.png');
+				break;
+			default:
+				$img_status = '';
+		}
+		echo ' &ldquo;'.$post_title.'&rdquo;'.' '.$img_status;
 	}
 echo	'</span></h2>';