added date display for episodes
This commit is contained in:
@@ -34,9 +34,24 @@ if($node->workflow == 3){
|
||||
$scheduled_transitions = WorkflowScheduledTransition::load('node', $node->nid, NULL, 1);
|
||||
$transition = false;
|
||||
if(count($scheduled_transitions)){
|
||||
// dsm($scheduled_transitions, "scheduled_transitions");
|
||||
// if($node->type == "episode"){
|
||||
// dsm($scheduled_transitions, "scheduled_transitions");
|
||||
// }
|
||||
$transition = $scheduled_transitions[0];
|
||||
}
|
||||
$vars['wf_stamp'] = $transition ? $transition->scheduled : false;
|
||||
|
||||
if($node->type == "episode" && $transition){
|
||||
// dsm($transition, "transition");
|
||||
// dsm($vars['content'], "content");
|
||||
// $vars['content']['transition'] = array(
|
||||
// "#type"=> "markup",
|
||||
// "#markup"=> format_date($transition->scheduled, 'custom', "d F Y"),
|
||||
// "#prefix"=>"<span class='date'>",
|
||||
// "#suffix"=>"</span>"
|
||||
// );
|
||||
$vars['content']['title_field'][0]['#markup'] .= "<span class='date'>".format_date($transition->scheduled, 'custom', "d F Y")."</span>";
|
||||
}
|
||||
|
||||
|
||||
$vars["classes_array"][] = "node-".$node->nid;
|
||||
|
||||
Reference in New Issue
Block a user