see #4880 In assignements table, we don't see filename nor description

skala
Laurent Opprecht 13 years ago
parent 583c35e66b
commit 1105f88143
  1. 4
      main/inc/ajax/model.ajax.php
  2. 3
      main/work/work.lib.php
  3. 22
      main/work/work.php

@ -174,9 +174,9 @@ $columns = array();
switch ($action) {
case 'get_work_user_list':
if (isset($_GET['type']) && $_GET['type'] == 'simple') {
$columns = array('type', 'firstname', 'lastname', 'username', 'qualification', 'sent_date', 'qualificator_id', 'actions');
$columns = array('type', 'firstname', 'lastname', 'username', 'title', 'qualification', 'sent_date', 'qualificator_id', 'actions');
} else {
$columns = array('type', 'firstname', 'lastname', 'username', 'sent_date', 'actions');
$columns = array('type', 'firstname', 'lastname', 'username', 'title', 'sent_date', 'actions');
}
$result = get_work_user_list($start, $limit, $sidx, $sord, $work_id, $where_condition);
break;

@ -1584,7 +1584,7 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher
$extra_conditions .= " AND parent_id = ".$work_id." ";
$select = 'DISTINCT work.id as id, title as file, url, sent_date, contains_file, has_properties, view_properties,
$select = 'DISTINCT work.id as id, title as title, description, url, sent_date, contains_file, has_properties, view_properties,
qualification, weight, allow_text_assignment, u.firstname, u.lastname, u.username, parent_id, accepted, qualificator_id';
$user_condition = "INNER JOIN $user_table u ON (work.user_id = u.user_id) ";
@ -1653,6 +1653,7 @@ function get_work_user_list($start, $limit, $column, $direction, $work_id, $wher
$work['firstname'] = Display::div($work['firstname'], array('class' => $class));
$work['lastname'] = Display::div($work['lastname'], array('class' => $class));
$work['username'] = Display::div($work['username'], array('class' => $class));
$work['title'] = Display::div($work['title'], array('class' => $class)) . ' <div class="invisible" style="display:none;">' . $work['description'] .'</div>';
//Type
$work['type'] = build_document_icon_tag('file', $work['file']);

@ -1148,32 +1148,34 @@ switch ($action) {
if (!empty($work_data['enable_qualification']) && !empty($check_qualification)) {
$type = 'simple';
$columns = array(get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('LoginName'),
$columns = array(get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('LoginName'), get_lang('Title'),
get_lang('Qualification'), get_lang('Date'), get_lang('Status'), get_lang('Actions'));
$column_model = array (
array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false'),
// array('name'=>'file', 'index'=>'file', 'width'=>'20', 'align'=>'left', 'search' => 'false'),
array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'60', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
array('name'=>'qualificator_id','index'=>'qualificator_id', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false')
);
} else {
$type = 'complex';
$columns = array(get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('LoginName'),
$columns = array(get_lang('Type'), get_lang('FirstName'), get_lang('LastName'), get_lang('LoginName'), get_lang('Title'),
get_lang('Date'), get_lang('Actions'));
$column_model = array (
array('name'=>'type', 'index'=>'file', 'width'=>'12', 'align'=>'left', 'search' => 'false'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'firstname', 'index'=>'firstname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'lastname', 'index'=>'lastname', 'width'=>'35', 'align'=>'left', 'search' => 'true'),
array('name'=>'username', 'index'=>'username', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'title', 'index'=>'title', 'width'=>'40', 'align'=>'left', 'search' => 'false'),
// array('name'=>'file', 'index'=>'file', 'width'=>'20', 'align'=>'left', 'search' => 'false'),
//array('name'=>'qualification', 'index'=>'qualification', 'width'=>'20', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'60', 'align'=>'left', 'search' => 'true'),
array('name'=>'sent_date', 'index'=>'sent_date', 'width'=>'50', 'align'=>'left', 'search' => 'true'),
//array('name'=>'qualificator_id','index'=>'qualificator_id', 'width'=>'30', 'align'=>'left', 'search' => 'true'),
array('name'=>'actions', 'index'=>'actions', 'width'=>'40', 'align'=>'left', 'search' => 'false', 'sortable'=>'false')
);

Loading…
Cancel
Save