*/ $current_user = user_load($node->revision_uid); $edit_icon = '<span class="tinyicon t_editicon"></span>'; $rev_icon = '<span class="tinyicon t_revisionicon"></span>'; $edit_state_icon = '<span class="tinyicon t_changestateicon"></span>'; $delete_icon = '<span class="tinyicon t_deleteicon"></span>'; $view_icon = '<span class="tinyicon t_viewicon"></span>'; /* actions */ if (_content_moderation_statechange_allowed($node->vid)) { $edit_state = l($edit_state_icon, $links['edit_state'], array('html' => true, 'attributes' => array('title' => t('Edit the state of this revision.')))); } if ($live != NULL) { $view_live_link = l($view_icon, $links['live_view'], array('html' => true, 'attributes' => array('title' => t('View live revision')))); } $check_revisions = _content_moderation_get_latest_revisions($node->nid, 2); $rev_url = _content_moderation_determine_revision_url($check_revisions, $node->nid, $node->vid, FALSE); $view_current_link = l($view_icon, $rev_url, array('html' => true, 'attributes' => array('title' => t('View this revision.')))); $current_rev_link = l($node->vid, $rev_url, array('html' => true, 'attributes' => array('title' => t('View this revision.')))); if (module_exists('diff')) { $compare_live = l($rev_icon, $links['compare_with_live'], array('html' => true, 'attributes' => array('title' => t('Compare this revision with the live revision.')))); $compare = l($rev_icon, $links['compare'], array('html' => true, 'attributes' => array('title' => t('List all revisions.')))); } // TODO: first see how revision deleting, esp. the live ones, should be handled //$delete_current = l($delete_icon,$links['delete_revision'],array('html' => true, 'attributes' => array( 'title' => t('Delete this revision') ) )); ?> <div id="content_moderation"> <h4><?php print t('Live'); ?> </h4>
<?php } else { ?> <div class="info live_info"><?php print t('nothing approved yet'); ?> </div> <?php } ?> <?php if ($is_scheduled) { $schedule = content_moderation_load_scheduled($node); $schedule_state = t('Scheduled'); $scheduled_rev_url = _content_moderation_determine_revision_url($check_revisions, $schedule['nid'], $schedule['vid'], FALSE); $current_scheduled_rev_link = l($schedule['vid'], $scheduled_rev_url, array('html' => true, 'attributes' => array('title' => t('View this revision')))); $cancel_schedule_link = l($delete_icon, 'node/' . $node->nid . '/cancel-schedule', array('html' => true, 'attributes' => array('title' => t('Cancel this schedule')))); $schedule_user = user_load($schedule['uid']); ?> <h4><?php print t('Scheduled'); ?> </h4> <div class="info"><label><?php print $current_scheduled_rev_link; ?> :</label> (<?php print $schedule_state; ?> ) <?php