Exemple #1
0
     break;
     //
     // Cases tab
     //
 //
 // Cases tab
 //
 case 'cases':
     include_lcm('inc_obj_case');
     // Note: If the user is looking at his/her cases, then list only those
     // If a user is looking at another users's cases, then list only public cases
     // If the admin is looking at another users's cases, then show all
     show_page_subtitle(_T('author_subtitle_cases', array('author' => get_person_name($author_data)), 'cases_participants'));
     $foo = get_date_range_fields();
     echo $foo['html'];
     $case_list = new LcmCaseListUI();
     if ($find_case_string = _request('find_case_string')) {
         $case_list->setSearchTerm($find_case_string);
     }
     // There is no UI for this at the moment XXX test
     $case_list->setDateInterval($foo['date_start'], $foo['date_end']);
     $case_list->setDataInt('id_author', $author);
     $case_list->setDataString('owner', 'my');
     $case_list->start();
     $case_list->printList();
     $case_list->finish();
     break;
     //
     // Author followups
     //
 //
Exemple #2
0
}
$q_dates = "SELECT DISTINCT " . lcm_query_trunc_field('date_creation', 'year') . " as year\n\t\t\tFROM lcm_case as c, lcm_case_author as a\n\t\t\tWHERE c.id_case = a.id_case AND " . $q_owner;
$result = lcm_query($q_dates);
while ($row = lcm_fetch_array($result)) {
    $sel = isSelected($prefs['case_period'] == $row['year']);
    echo '<option value="' . $row['year'] . '"' . $sel . '>' . _T('case_filter_period_option_year', array('year' => $row['year'])) . "</option>\n";
}
echo "</select>\n";
echo ' <button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n";
echo "</p>\n";
echo "</form>\n";
//
// Show the list of cases
//
echo '<p class="normal_text">' . "\n";
$case_list = new LcmCaseListUI();
$case_list->setSearchTerm($find_case_string);
$case_list->start();
$case_list->printList();
$case_list->finish();
echo "</p>\n";
echo '<p><a href="edit_case.php?case=0" class="create_new_lnk">' . _T('case_button_new') . "</a></p>\n";
echo '<p><a href="edit_client.php" class="create_new_lnk">' . _T('client_button_new') . "</a></p>\n";
//
// List of recent follow-ups
//
echo '<a name="fu"></a>' . "\n";
show_page_subtitle(_T('case_subtitle_recent_followups'));
echo '<p class="normal_text">' . "\n";
show_listfu_start('general');
$q = "SELECT fu.id_case, fu.id_followup, fu.date_start, fu.date_end, fu.type, fu.description, fu.case_stage,\n\t\t\tfu.hidden, a.name_first, a.name_middle, a.name_last, c.title\n\t\tFROM lcm_followup as fu, lcm_author as a, lcm_case as c \n\t\tWHERE fu.id_author = a.id_author \n\t\t  AND  c.id_case = fu.id_case ";