/[drupal]/contributions/modules/indexpage/indexpage.module
ViewVC logotype

Diff of /contributions/modules/indexpage/indexpage.module

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8.2.6.2.19, Thu May 21 20:04:25 2009 UTC revision 1.8.2.6.2.20, Sun May 31 17:41:09 2009 UTC
# Line 1  Line 1 
1  <?php  <?php
2  // $Id: indexpage.module,v 1.8.2.6.2.18 2009/05/21 18:00:03 nancyw Exp $  // $Id: indexpage.module,v 1.8.2.6.2.19 2009/05/21 20:04:25 nancyw Exp $
3    
4  /**  /**
5   * @file   * @file
# Line 433  function indexpage_page_list($type, $fil Line 433  function indexpage_page_list($type, $fil
433      'language' => array('data' => t('Language'), 'field' => 'language', 'class' => 'center'),      'language' => array('data' => t('Language'), 'field' => 'language', 'class' => 'center'),
434      'uid' => array('data' => t('Author')), 'field' => 'uid', 'class' => 'left',      'uid' => array('data' => t('Author')), 'field' => 'uid', 'class' => 'left',
435      'authors' => array('data' => t('Authors / Editors'), 'field' => 'uid', 'class' => 'left'),      'authors' => array('data' => t('Authors / Editors'), 'field' => 'uid', 'class' => 'left'),
436      'terms' => array('data' => t('Terms'), 'field' => 'taxonomy', 'class' => 'left'),      'terms' => array('data' => t('Terms'), /*'field' => 'taxonomy',*/ 'class' => 'left'),
437      'created' => array('data' => t('Created'), 'field' => 'created', 'class' => 'center'),      'created' => array('data' => t('Created'), 'field' => 'created', 'class' => 'center'),
438      'changed' => array('data' => t('Updated'), 'field' => 'changed', 'class' => 'center'),      'changed' => array('data' => t('Updated'), 'field' => 'changed', 'class' => 'center'),
439      'status' => array('data' => t('Published'), 'field' => 'status', 'class' => 'center'),      'status' => array('data' => t('Published'), 'field' => 'status', 'class' => 'center'),
# Line 441  function indexpage_page_list($type, $fil Line 441  function indexpage_page_list($type, $fil
441      'sticky' => array('data' => t('Sticky'), 'field' => 'sticky', 'class' => 'center'),      'sticky' => array('data' => t('Sticky'), 'field' => 'sticky', 'class' => 'center'),
442      );      );
443    if ($weight_avail) {    if ($weight_avail) {
444      $fields['weight'] = array('data' => t('Weight'), 'field' => 'node_weight', 'class' => 'center');      $fields['weight'] = array('data' => t('Weight'), /*'field' => 'node_weight',*/ 'class' => 'center');
445    }    }
446    
447    $max_results = variable_get('indexpage_maxresults', 10);    $max_results = variable_get('indexpage_maxresults', 10);
# Line 463  function indexpage_page_list($type, $fil Line 463  function indexpage_page_list($type, $fil
463      }      }
464    
465      foreach ($show_fields as $key => $value) {      foreach ($show_fields as $key => $value) {
466        $field_value = $node->{$fields[$key]['field']};        switch ($key) {
467            case 'terms':
468              $field_value = $node->taxonomy;
469              break;
470            case 'weight':
471              $field_value = $node->node_weight;
472              break;
473            default:
474              $field_value = $node->{$fields[$key]['field']};
475          }
476        $field_align = $fields[$key]['class'];        $field_align = $fields[$key]['class'];
477        switch ($key) {        switch ($key) {
478          case 'title':          case 'title':
# Line 504  function indexpage_page_list($type, $fil Line 513  function indexpage_page_list($type, $fil
513            else {            else {
514              $items[] = t('- none -');              $items[] = t('- none -');
515            }            }
516            $field_value = decode_entities(theme('item_list', $items));            if (count($items) > 1) {
517                $field_value = decode_entities(theme('item_list', $items));
518              }
519              else {
520                $field_value = $items[0];
521              }
522            break;            break;
523    
524          case 'authors':          case 'authors':

Legend:
Removed from v.1.8.2.6.2.19  
changed lines
  Added in v.1.8.2.6.2.20

  ViewVC Help
Powered by ViewVC 1.1.2