You are here

function theme_moderation_event in modr8 7

Same name and namespace in other branches
  1. 5 modr8_admin.inc \theme_moderation_event()
  2. 6 modr8_admin.inc \theme_moderation_event()

Theming for moderation event.

1 theme call to theme_moderation_event()
modr8_log_event in ./modr8_admin.inc
Moderation event log.

File

./modr8_admin.inc, line 782
Admin pages for moderation

Code

function theme_moderation_event($variables) {
  $event = $variables['0'];
  $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, 'short'),
  );
  if ($event->action == 'Response') {
    $rows[] = array(
      t('Author:'),
      theme('username', array(
        'account' => $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', array(
        'account' => $event,
      )),
    );
    $rows[] = array(
      'data' => array(
        t('E-mail message:'),
        $event->message,
      ),
      'style' => 'vertical-align:top;',
    );
    $rows[] = array(
      t('Author:'),
      theme('username', array(
        'account' => $event->author,
      )),
    );
    $rows[] = array(
      'data' => array(
        t('Teaser (as reviewed):'),
        $event->teaser,
      ),
      'style' => 'vertical-align:top;',
    );
  }
  return theme('table', array(
    'header' => NULL,
    'rows' => $rows,
  ));
}