示例#1
0
 /**
  * @see Zupal_Grid_IGrid::render_grid()
  *
  * @param Zend_View $pView
  * @param unknown_type $pID
  * @param unknown_type $pStore_ID
  * @param array $pColumns
  */
 public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns)
 {
     Zupal_Grid_Maker::prep_view($pView);
     $columns = array();
     foreach ($pColumns as $k => $v) {
         $columns[$k] = $v;
     }
     // todo: add control buttons
     return Zupal_Grid_Maker::grid($pID, $pStore_ID, $columns, 'id', array('onRowClick' => 'role_row_click'));
 }
示例#2
0
 public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns)
 {
     Zupal_Grid_Maker::prep_view($pView);
     $columns = array('' => array('width' => 25, 'label' => ' ', 'get' => 'content_view'), 'content_edit' => array('width' => 25, 'label' => ' ', 'get' => 'content_edit'));
     foreach ($pColumns as $k => $v) {
         $columns[$k] = $v;
     }
     $columns['content_delete'] = array('width' => 25, 'label' => ' ', 'get' => 'content_delete');
     return Zupal_Grid_Maker::grid($pID, $pStore_ID, $columns);
 }
示例#3
0
 /**
  * @see Zupal_Grid_IGrid::render_grid()
  *
  * @param Zend_View $pView
  * @param unknown_type $pID
  * @param unknown_type $pStore_ID
  * @param array $pColumns
  */
 public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns)
 {
     Zupal_Grid_Maker::prep_view($pView);
     $columns = array();
     foreach ($pColumns as $k => $v) {
         $columns[$k] = $v;
     }
     return Zupal_Grid_Maker::querygrid($pID, $pStore_ID, $columns, 'id', array('onRowClick' => 'artist_row_click'));
     //, array('onRowClick' => 'artist_row_click'));
 }
示例#4
0
 public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns)
 {
     Zupal_Grid_Maker::prep_view($pView);
     $identifier = $this->table()->idField();
     $cache = Zupal_Bootstrap::$registry->cache;
     if (!$cache->test('user_grid')) {
         ob_start();
         Zupal_Grid_Maker::grid($pID, $pStore_ID, $pColumns, $this->table()->idField());
         $cache->save(ob_get_clean(), 'user_grid');
     }
     return $cache->load('user_grid');
 }
示例#5
0
    public function render_grid(Zend_View $pView, $pID, $pStore, array $pColumns)
    {
        Zupal_Grid_Maker::prep_view($pView);
        $identifier = $this->table()->idField();
        $cache = Zupal_Bootstrap::$registry->cache;
        if (!$cache->test('modules_grid')) {
            ?>
<table id="igrid_<?php 
            echo $pID;
            ?>
_modules_node" rowsPerPage="10"
	style="height: 400px" jsId="igrid_<?php 
            echo $pID;
            ?>
"
	dojoType="dojox.grid.DataGrid" clientSort="true"
	query="{ <?php 
            echo $identifier;
            ?>
 : '*' }"
	store="<?php 
            echo $pStore;
            ?>
">
	<thead>
		<tr>
			<th get="modules_view" width="25">&nbsp;</th>
			<th get="modules_edit" width="25">&nbsp;</th>
<?php 
            foreach ($pColumns as $key => $column) {
                ?>
	<?php 
                if (is_array($column)) {
                    ?>
		<?php 
                    echo $this->render_array_column($key, $column);
                } elseif (is_string($column)) {
                    ?>
			<th field="<?php 
                    echo $key;
                    ?>
"><?php 
                    echo $column;
                    ?>
</th>
<?php 
                } elseif (is_object($column)) {
                    // must have a __toString() method
                    ?>
			<?php 
                    echo $column;
                }
            }
            ?>
		</tr>
	</thead>
</table>

<?php 
        }
        return $cache->load('modules_grid');
    }
示例#6
0
 /**
  * @see Zupal_Grid_IGrid::render_grid()
  *
  * @param Zend_View $pView
  * @param unknown_type $pID
  * @param unknown_type $pStore_ID
  * @param array $pColumns
  */
 public function render_grid(Zend_View $pView, $pID, $pStore_ID, array $pColumns)
 {
     Zupal_Grid_Maker::prep_view($pView);
     $columns = array('artist_view' => array('width' => 25, 'label' => '&nbsp;', 'get' => 'artist_view'), 'artist_edit' => array('width' => 25, 'label' => '&nbsp;', 'get' => 'artist_edit'));
     foreach ($pColumns as $k => $v) {
         $columns[$k] = $v;
     }
     $columns['artist_delete'] = array('width' => 25, 'label' => '&nbsp;', 'get' => 'artist_delete');
     return Zupal_Grid_Maker::grid($pID, $pStore_ID, $columns, 'node_id', array('onRowClick' => 'artist_row_click'));
 }