Projekt

Obecné

Profil

« Předchozí | Další » 

Revize 1295

Přidáno uživatelem Ondřej Fibich před asi 13 roky(ů)

Upravy:

- k chybove zprave zaznamenane v logu pridano URL
- editace hlasovaci sablony u pracovniho vykazu

Zobrazit rozdíly:

freenetis/branches/testing/application/controllers/work_reports.php
// approval template
if (isset($form_data['approval_template_id']))
if (isset($form_data['approval_template_id']) &&
$this->acl_check_view('approval', 'templates'))
{
$at_id = intval($form_data['approval_template_id']);
}
......
{
$works = $work_report->get_works_of_monthly_workreport();
}
// approval templates
$arr_approval_templates = array();
if ($this->acl_check_view('approval', 'templates'))
{
$arr_approval_templates = ORM::factory('approval_template')->select_list();
}
// posted
if ($_POST && count($_POST))
{
......
//// save report
if (isset($form_data['approval_template_id']) &&
$this->acl_check_view('approval', 'templates'))
{
$at_id = intval($form_data['approval_template_id']);
$work_report->approval_template_id = $at_id;
}
$work_report->description = $form_data['description'];
$work_report->price_per_hour = $price_per_hour;
$work_report->price_per_km = $price_per_km;
......
$view->content->month = intval(substr($work_report->type, 5, 6));
$view->content->year = intval(substr($work_report->type, 0, 4));
$view->content->works = $works;
$view->content->arr_approval_templates = $arr_approval_templates;
$view->render(TRUE);
}
freenetis/branches/testing/application/views/work_reports/edit.php
</tr>
<tr>
<td style="padding: 5px; width: 310px;">
<?php echo $work_report->approval_template->name ?>
<?php if (count($arr_approval_templates)): ?>
<?php echo form::dropdown(array('name' => 'approval_template_id', 'style' => 'width: 200px; margin: 10px;'), $arr_approval_templates, $work_report->approval_template_id) ?>
<?php else: ?>
<div style="width: 200px; margin: 10px;" class="bold"><?php echo $work_report->approval_template->name ?></div>
<?php endif; ?>
</td>
<td style="padding: 5px; width: 500px">
<?php echo $work_report->user->get_full_name() . ' - ' . $work_report->user->login ?>
freenetis/branches/testing/system/core/Log.php
self::$messages[strtolower($type)][] = array
(
date('Y-m-d G:i:s'),
strip_tags($message)
strip_tags($message),
url::base(TRUE) . url::current(TRUE),
);
}
......
// Compile the messages
$messages = '';
foreach(self::$messages as $type => $data)
{
foreach($data as $date => $text)
{
list($date, $message) = $text;
$messages .= $date.' -- '.$type.': '.$message."\r\n";
list($date, $message, $url) = $text;
$messages .= $date . ' -- ' . $type . ': ' . $message
. ' URL: ' . $url . "\r\n";
}
}

Také k dispozici: Unified diff