Пример #1
0
 /**
  * Method to display the view.
  *
  * @param   string	The template file to include
  * @since   1.6
  */
 function render()
 {
     $layout = $this->getLayout();
     $ddcaccountsModel = new DdcbalanceitModelsDdcaccounts();
     $ddcgoalsModel = new DdcbalanceitModelsDdcgoals();
     switch ($layout) {
         case "default":
         default:
             $this->items = $ddcaccountsModel->listItems();
             $this->goals = $ddcgoalsModel->listItems();
             break;
     }
     //display
     return parent::render();
 }
Пример #2
0
<?php

defined('_JEXEC') or die('Restricted access');
$blnce = null;
$target = null;
$ddcgoalsModel = new DdcbalanceitModelsDdcgoals();
$user = JFactory::getUser();
foreach ($this->items as $item) {
    $blnce += $item->balance;
    $target += $item->target_balance;
}
?>
<div class="row-fluid">
	<div class="col-xs-12">
	<table class="table">
		<thead>
			<tr>
				<td colspan="3">
					<a href="<?php 
echo JRoute::_('index.php?option=com_ddcbalanceit&view=ddcprofile');
?>
" class="btn btn-default"><?php 
echo JText::_('COM_DDC_VIEW_PROFILE');
?>
</a>
					<a href="<?php 
echo JRoute::_('index.php?option=com_ddcbalanceit&view=ddcgoals&layout=add');
?>
" class="btn btn-success"><i class="glyphicon glyphicon-plus"></i> <?php 
echo JText::_('COM_DDC_GOAL');
?>