Example #1
0
 /**
  *
  * @return string
  */
 public function __toString()
 {
     if ($this->_label == '') {
         return parent::__toString();
     }
     switch ($this->get_placement()) {
         case self::PLACEMENT_HORIZONTAL:
             return sprintf(self::HI, parent::__toString(), $this->get_label());
             break;
         case self::PLACEMENT_VERTICAL:
             return sprintf(self::VI, parent::__toString(), $this->get_label());
             break;
         case self::PLACEMENT_NONE:
             return sprintf(self::NI, parent::__toString());
             break;
     }
 }
Example #2
0
?>
/people/item/edit/id/' +  people_identity(id, item)  + '">'
		+ '<?php 
echo Zupal_Image::icon('edit');
?>
</a>';
	}


	function people_delete(id, item)
	{
		if (!item) return this.defaultValue;

		var g = dijit.byId('igrid_<?php 
echo $pID;
?>
_people_node');

	//	id = g.store.getValue(item, 'id');

	return '<a href="<?php 
echo Zend_Controller_Front::getInstance()->getBaseUrl();
?>
/people/item/delete/id/' +  people_identity(id, item)  + '">'
		+ '<?php 
echo Zupal_Image::icon('x');
?>
</a>';
	}

</script>
function modules_edit(id, item)
{
	if (!item) return this.defaultValue;

	var g = dijit.byId('igrid_<?php 
echo $pID;
?>
_modules_node');

//	id = g.store.getValue(item, 'id');

return '<a href="<?php 
echo Zend_Controller_Front::getInstance()->getBaseUrl();
?>
/admin/modules/edit/name/' +  modules_identity(id, item)  + '">'
	+ '<?php 
echo Zupal_Image::icon('edit');
?>
</a>';
}

function format_bool(b)
{

	if (b) return '<div style="background-color: green; text-align: center; padding: 3px; color: #CFC; font-weight: bold">Y</div>';
	return '<div style="background-color: red; text-align: center; padding: 3px; color: #FCC; font-weight: bold">N</div>';
}

function format_bold(v){ return '<b>' + v + '</b>'; }
Example #4
0
    public function render_script($pID, array $pParams = NULL)
    {
        ?>

	function content_identity(id, item)
	{

		var g = dijit.byId('<?php 
        echo $pID;
        ?>
');

		return g.store.getValue(item, 'id');

	}

	function content_view(id, item)
	{
		if (!item) return '';

		var g = dijit.byId('<?php 
        echo $pID;
        ?>
');

		content_id = content_identity(id, item);
		url = '<?php 
        echo Zend_Controller_Front::getInstance()->getBaseUrl();
        ?>
/content/admin/view/id/';
		icon = '<?php 
        echo Zupal_Image::icon('view');
        ?>
';
	return '<a href="' + url + content_id + '">' + icon + '</a>';
	}


	function content_edit(id, item)
	{
		if (!item) return this.defaultValue;

		var g = dijit.byId('<?php 
        echo $pID;
        ?>
');

	//	id = g.store.getValue(item, 'id');

	return '<a href="<?php 
        echo Zend_Controller_Front::getInstance()->getBaseUrl();
        ?>
/content/admin/edit/id/' +  content_identity(id, item)  + '">'
		+ '<?php 
        echo Zupal_Image::icon('edit');
        ?>
</a>';
	}


	function content_delete(id, item)
	{
		if (!item) return this.defaultValue;

		var g = dijit.byId('<?php 
        echo $pID;
        ?>
');

	//	id = g.store.getValue(item, 'id');

	return '<a href="<?php 
        echo Zend_Controller_Front::getInstance()->getBaseUrl();
        ?>
/content/admin/delete/id/' +  content_identity(id, item)  + '">'
		+ '<?php 
        echo Zupal_Image::icon('x');
        ?>
</a>';
	}

<?php 
    }
Example #5
0
    public function render_script(array $pData = NULL)
    {
        $cache = Zupal_Bootstrap::$registry->cache;
        if (!$cache->test('employee_grid_script')) {
            ?>
<script language="javascript">

	function employee_identity(id, item)
	{

		var g = dijit.byId('igrid_<?php 
            echo $pID;
            ?>
_employee_node');

		return g.store.getValue(item, 'eid');

	}

	function employee_view(id, item)
	{
		if (!item) return this.defaultValue;

		var g = dijit.byId('igrid_<?php 
            echo $pID;
            ?>
_employee_node');

	//	id = g.store.getValue(item, 'id');

	return '<a href="<?php 
            echo Zend_Controller_Front::getInstance()->getBaseUrl();
            ?>
/people/employee/view/id/' + employee_identity(id, item) + '">'
		+ '<?php 
            echo Zupal_Image::icon('view');
            ?>
</a>';
	}


	function employee_edit(id, item)
	{
		if (!item) return this.defaultValue;

		var g = dijit.byId('igrid_<?php 
            echo $pID;
            ?>
_employee_node');

	//	id = g.store.getValue(item, 'id');

	return '<a href="<?php 
            echo Zend_Controller_Front::getInstance()->getBaseUrl();
            ?>
/people/employee/edit/id/' +  employee_identity(id, item)  + '">'
		+ '<?php 
            echo Zupal_Image::icon('edit');
            ?>
</a>';
	}


	function employee_delete(id, item)
	{
		if (!item) return this.defaultValue;

		var g = dijit.byId('igrid_<?php 
            echo $pID;
            ?>
_employee_node');

	//	id = g.store.getValue(item, 'id');

	return '<a href="<?php 
            echo Zend_Controller_Front::getInstance()->getBaseUrl();
            ?>
/people/employee/delete/id/' +  employee_identity(id, item)  + '">'
		+ '<?php 
            echo Zupal_Image::icon('x');
            ?>
</a>';
	}

</script>
<?php 
        }
        return $cache->load('employee_grid_script');
    }