b2evolution PHP Cross Reference Blogging Systems

Source: /inc/items/views/_item_list_track.view.php - 202 lines - 5314 bytes - Text - Print

Description: This file implements the post browsing in tracker mode This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}. See also {@link http://sourceforge.net/projects/evocms/}.

   1  <?php
   2  /**
   3   * This file implements the post browsing in tracker mode
   4   *
   5   * This file is part of the b2evolution/evocms project - {@link http://b2evolution.net/}.
   6   * See also {@link http://sourceforge.net/projects/evocms/}.
   7   *
   8   * @copyright (c)2003-2014 by Francois Planque - {@link http://fplanque.com/}.
   9   * Parts of this file are copyright (c)2005 by Daniel HAHLER - {@link http://thequod.de/contact}.
  10   *
  11   * @license http://b2evolution.net/about/license.html GNU General Public License (GPL)
  12   *
  13   * @package admin
  14   *
  15   * {@internal Below is a list of authors who have contributed to design/coding of this file: }}
  16   * @author fplanque: Francois PLANQUE.
  17   *
  18   * @version $Id: _item_list_track.view.php 6136 2014-03-08 07:59:48Z manuel $
  19   */
  20  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  21  
  22  /**
  23   * @var Blog
  24   */
  25  global $Blog;
  26  /**
  27   * @var ItemList2
  28   */
  29  global $ItemList;
  30  
  31  global $edit_item_url, $delete_item_url;
  32  global $Session;
  33  
  34  if( $highlight = param( 'highlight', 'integer', NULL ) )
  35  {    // There are lines we want to highlight:
  36      $result_fadeout = array( 'post_ID' => array($highlight) );
  37  } 
  38  elseif ( $highlight = $Session->get( 'highlight_id' ) )
  39  {
  40      $result_fadeout = array( 'post_ID' => array($highlight) );
  41      $Session->delete( 'highlight_id' );
  42  }
  43  else
  44  {    // Nothing to highlight
  45      $result_fadeout = NULL;
  46  }
  47  
  48  
  49  // Display title depending on selection params:
  50  echo $ItemList->get_filter_title( '<h2>', '</h2>', '<br />', NULL, 'htmlbody' );
  51  
  52  /*
  53      **
  54       * Callback to add filters on top of the result set
  55       *
  56      function filter_on_post_title( & $Form )
  57      {
  58          global $pagenow, $post_filter;
  59  
  60          $Form->hidden( 'filter_on_post_title', 1 );
  61          $Form->text( 'post_filter', $post_filter, 20, T_('Task title'), '', 60 );
  62      }
  63      $ItemList->filters_callback = 'filter_on_post_title';
  64  */
  65  
  66  
  67  $ItemList->title = T_('Task list');
  68  
  69  $ItemList->cols[] = array(
  70                          'th' => /* TRANS: abbrev for Priority */ T_('P'),
  71                          'order' => 'priority',
  72                          'th_class' => 'shrinkwrap',
  73                          'td_class' => 'center tskst_$post_pst_ID$',
  74                          'td' => '$post_priority$',
  75                      );
  76  
  77  $ItemList->cols[] = array(
  78                          'th' => T_('Task'),
  79                          'order' => 'title',
  80                          'td_class' => 'tskst_$post_pst_ID$',
  81                          'td' => '<strong lang="@get(\'locale\')@">%task_title_link( {Obj} )%</strong>',
  82                      );
  83  
  84  $ItemList->cols[] = array(
  85                          'th' => T_('Visibility'),
  86                          'order' => 'status',
  87                          'th_class' => 'shrinkwrap',
  88                          'td_class' => 'shrinkwrap',
  89                          'td' => '%item_visibility( {Obj} )%',
  90                  );
  91  
  92  $ItemList->cols[] = array(
  93                          'th' => T_('Visibility'),
  94                          'order' => 'status',
  95                          'th_class' => 'shrinkwrap',
  96                          'td_class' => 'tskst_$post_pst_ID$ nowrap',
  97                          'td' => '@get( \'t_status\' )@',
  98                  );
  99  
 100  $ItemList->cols[] = array(
 101                          'th' => T_('Status'),
 102                          'order' => 'pst_ID',
 103                          'th_class' => 'shrinkwrap',
 104                          'td_class' => 'tskst_$post_pst_ID$ nowrap',
 105                          'td' => '@get(\'t_extra_status\')@',
 106                      );
 107  
 108  $ItemList->cols[] = array(
 109                          'th' => T_('Type'),
 110                          'order' => 'ptyp_ID',
 111                          'th_class' => 'shrinkwrap',
 112                          'td_class' => 'tskst_$post_pst_ID$ nowrap',
 113                          'td' => '@get(\'t_type\')@',
 114                      );
 115  
 116  $ItemList->cols[] = array(
 117                          'th' => T_('ID'),
 118                          'order' => 'ID',
 119                          'th_class' => 'shrinkwrap',
 120                          'td_class' => 'tskst_$post_pst_ID$ shrinkwrap',
 121                          'td_class' => 'center',
 122                          'td' => '$post_ID$',
 123                      );
 124  
 125  $ItemList->cols[] = array(
 126                          'th' => T_('Assigned'),
 127                          'order' => 'assigned_user_ID',
 128                          'th_class' => 'shrinkwrap',
 129                          'td' => '@get(\'t_assigned_to\')@',
 130                      );
 131  
 132  
 133  /**
 134   * Deadline
 135   */
 136  /*
 137  function deadline( $date )
 138  {
 139      global $localtimenow;
 140  
 141      $timestamp = mysql2timestamp( $date );
 142  
 143       if( $timestamp <= 0 )
 144      {
 145          return '&nbsp;';    // IE needs that crap in order to display cell border :/
 146      }
 147  
 148      $output = mysql2localedate( $date );
 149  
 150      if( $timestamp < $localtimenow )
 151      {
 152          $output =  '<span class="past_deadline">! '.$output.'</span>';
 153      }
 154  
 155      return $output;
 156  }
 157  $ItemList->cols[] = array(
 158                          'th' => T_('Deadline'),
 159                          'order' => 'post_datedeadline',
 160                          'td_class' => 'center tskst_$post_pst_ID$',
 161                          'td' => '%deadline( #post_datedeadline# )%',
 162                      );
 163  */
 164  
 165  $ItemList->cols[] = array(
 166          'th' => /* TRANS: abbrev for info */ T_('i'),
 167          'order' => 'datemodified',
 168          'default_dir' => 'D',
 169          'th_class' => 'shrinkwrap',
 170          'td_class' => 'shrinkwrap',
 171          'td' => '@history_info_icon()@',
 172      );
 173  
 174  $ItemList->cols[] = array(
 175          'th' => T_('Actions'),
 176          'td_class' => 'shrinkwrap',
 177          'td' => '%item_edit_actions( {Obj} )%',
 178      );
 179  
 180  if( $ItemList->is_filtered() )
 181  {    // List is filtered, offer option to reset filters:
 182      $ItemList->global_icon( T_('Reset all filters!'), 'reset_filters', '?ctrl=items&amp;blog='.$Blog->ID.'&amp;filter=reset', T_('Reset filters') );
 183  }
 184  
 185  if( $current_User->check_perm( 'blog_post_statuses', 'edit', false, $Blog->ID ) )
 186  {    // We have permission to add a post with at least one status:
 187      $ItemList->global_icon( T_('Create a new task...'), 'new', '?ctrl=items&amp;action=new&amp;blog='.$Blog->ID, T_('New task').' &raquo;', 3 ,4 );
 188  }
 189  
 190  
 191  // EXECUTE the query now:
 192  $ItemList->restart();
 193  
 194  // Initialize funky display vars now:
 195  global $postIDlist, $postIDarray;
 196  $postIDlist = $ItemList->get_page_ID_list();
 197  $postIDarray = $ItemList->get_page_ID_array();
 198  
 199  // DISPLAY table now:
 200  $ItemList->display( NULL, $result_fadeout );
 201  
 202  ?>

title

Description

title

Description

title

Description

title

title

Body