Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 528

Přidáno uživatelem Jiří Sviták před asi 15 roky(ů)

Barevne rozliseni typu prevodu na ucte, zmena hesla pridana do menu.

Zobrazit rozdíly:

freenetis/trunk/kohana/application/views/menu.php
<?php if ($this->acl_check_2D('menu', 'my_works') && $this->session->get('member_id') != 1) { ?>
<li><?php echo html::anchor(url_lang::base().'works/show_by_user/'.$this->session->get('user_id'), url_lang::lang('texts.My works')) ?></li>
<?php } ?>
<?php if ($this->acl_check_edit('Users_Controller', 'password', $this->session->get('member_id'))) { ?>
<li><?php echo html::anchor(url_lang::base().'users/change_password/'.$this->session->get('user_id'), url_lang::lang('texts.Change password')); ?></li>
<?php } ?>
</ul>
</li>
freenetis/trunk/kohana/application/views/grid_template.php
$i++;
?>
<tr <?php echo $class_tr ?>>
<?php
// coloring of transfer types
$inbound = false;
$outbound = false;
?>
<?php foreach ($fields as $field) :
if ($field->class != '') $class_td = ' class="'.$field->class.'"';
else $class_td = '';
// color difference of inbound and outbound transfer amounts
if ($field->name == 'trans_type')
if (trim($item->trans_type) == 0)
$inbound = true;
else
$outbound = true;
// action field
if ($field instanceof Action_Field) :
$property = $field->name; ?>
<td <?php echo ' class="'.$field->class.' noprint"'?>><?php echo html::anchor($field->url.'/'.$item->$property, $field->action, $field->script)?></td>
......
<td <?php echo $class_td?>><?php echo $field->bool[(bool)$item->$field] ?>
</td>
<?php else: ?>
<?php
// standard field
?>
<td <?php echo $class_td?>>
<?php
// money format
if (trim($item->$field) == '')
echo '&nbsp;';
else if ($field->name == 'balance' || $field->name == 'amount')
elseif ($field->name == 'balance')
echo number_format((float)$item->$field, 2, ',', ' ');
elseif ($field->name == 'amount')
{
if ($inbound)
echo '<span style="color:green">'.$item->$field.'</span>';
elseif ($outbound)
echo '<span style="color:red">'.$item->$field.'</span>';
else
echo $item->$field;
}
else
echo $item->$field;
?>

Také k dispozici: Unified diff