You are here

function theme_moderation_event in modr8 5

Same name and namespace in other branches
  1. 6 modr8_admin.inc \theme_moderation_event()
  2. 7 modr8_admin.inc \theme_moderation_event()
1 theme call to theme_moderation_event()
modr8_log_event in ./modr8_admin.inc

File

./modr8_admin.inc, line 520

Code

function theme_moderation_event($event) {
  $rows[] = array(
    array(
      'data' => l(t('Overview of all moderation log events for this post'), 'node/' . $event->nid . '/modr8/'),
      'colspan' => 2,
    ),
  );
  $rows[] = array(
    t('Action:'),
    t($event->action),
  );
  $rows[] = array(
    t('Date:'),
    format_date($event->timestamp, 'small'),
  );
  if ($event->action == 'Response') {
    $rows[] = array(
      t('Author:'),
      theme('username', $event),
    );
    $rows[] = array(
      t('Response title:'),
      $event->title,
    );
    $rows[] = array(
      'data' => array(
        t('Response message:'),
        $event->message,
      ),
      'style' => 'vertical-align:top;',
    );
    $rows[] = array(
      'data' => array(
        t('Teaser (as of response):'),
        $event->teaser,
      ),
      'style' => 'vertical-align:top;',
    );
  }
  else {
    $rows[] = array(
      t('Moderator:'),
      theme('username', $event),
    );
    $rows[] = array(
      'data' => array(
        t('E-mail message:'),
        $event->message,
      ),
      'style' => 'vertical-align:top;',
    );
    $rows[] = array(
      t('Author:'),
      theme('username', $event->author),
    );
    $rows[] = array(
      'data' => array(
        t('Teaser (as reviewed):'),
        $event->teaser,
      ),
      'style' => 'vertical-align:top;',
    );
  }
  return theme('table', NULL, $rows);
}