Minor - refactor code.

1.9.x
Julio Montoya 11 years ago
parent c97c051cfc
commit 3727a1123b
  1. 12
      main/inc/ajax/model.ajax.php
  2. 4
      main/template/default/work/view.tpl

@ -179,11 +179,11 @@ switch ($action) {
break;
case 'get_work_teacher':
require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php';
$count = getWorkListTeacher($start, $limit, $sidx, $sord, $where_condition, true);
$count = getWorkListTeacher(0, $limit, $sidx, $sord, $where_condition, true);
break;
case 'get_work_student':
require_once api_get_path(SYS_CODE_PATH).'work/work.lib.php';
$count = getWorkListStudent($start, $limit, $sidx, $sord, $where_condition, true);
$count = getWorkListStudent(0, $limit, $sidx, $sord, $where_condition, true);
break;
case 'get_work_user_list_all':
@ -205,10 +205,10 @@ switch ($action) {
if (empty($documents)) {
$where_condition .= " AND u.user_id = ".api_get_user_id();
$count = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $where_condition, null, true);
$count = get_work_user_list(0, $limit, $sidx, $sord, $work_id, $where_condition, null, true);
} else {
$count = get_work_user_list_from_documents(
$start,
0,
$limit,
$sidx,
$sord,
@ -1060,13 +1060,13 @@ if (in_array($action, $allowed_actions)) {
switch ($export_format) {
case 'xls':
//TODO add date if exists
$file_name = (!empty($action)) ? $action : 'company_report';
$file_name = (!empty($action)) ? $action : 'company_report';
Export::export_table_xls($array, $file_name);
break;
case 'csv':
default:
//TODO add date if exists
$file_name = (!empty($action)) ? $action : 'company_report';
$file_name = (!empty($action)) ? $action : 'company_report';
Export::export_table_csv($array, $file_name);
break;
}

@ -16,7 +16,9 @@
{% for comment in comments %}
<li>
<div class="page-header">
<a href="{{ _p.web_code }}"><img height="24" src="{{ comment.picture }}"/> {{ comment.username }} </a>- {{ comment.sent_at | api_get_local_time }}
<a href="{{ _p.web_code }}">
<img height="24" src="{{ comment.picture }}"/> {{ comment.username }}
</a>- {{ comment.sent_at | api_get_local_time }}
</div>
<p>

Loading…
Cancel
Save