/** Possible actions for a participation: prioritize and delete */ function participation_actions($participation_id) { $CI =& get_instance(); $pp = $CI->participationModel->get_participation_by_id($participation_id); $not_cancelled = $pp->cancelled == 0; $is_confirmed = $pp->confirmed == 1 && $not_cancelled; $not_completed = $is_confirmed && $pp->noshow == 0 && $pp->completed == 0; $is_noshow = $pp->noshow == 1; $is_completed = $pp->completed == 1; $after_now = input_datetime($pp->appointment) > input_datetime('now'); $get_link = participation_get_link($pp); $cancel_link = $not_completed && $not_cancelled ? anchor('participation/cancel/' . $pp->id, img_cancel(lang('cancelled'))) : img_cancel(lang('cancelled'), TRUE); $reschedule_link = $not_completed ? anchor('participation/reschedule/' . $pp->id, img_calendar()) : img_calendar(TRUE); $noshow_link = $is_confirmed && !$is_noshow && !$after_now ? anchor('participation/no_show/' . $pp->id, img_noshow()) : img_noshow(TRUE); $completed_link = $is_confirmed && !$after_now ? anchor('participation/completed/' . $pp->id, img_accept(lang('completed'))) : img_accept(lang('completed'), TRUE); $delete_link = anchor('participation/delete/' . $pp->id, img_p_delete(), warning(lang('sure_delete_part'))); $comment_link = anchor('participation/edit_comment/' . $pp->id, img_comment()); switch (current_role()) { case UserRole::Admin: $actions = array($get_link, $cancel_link, $reschedule_link, $noshow_link, $completed_link, $comment_link, $delete_link); break; case UserRole::Leader: $actions = array($get_link, $cancel_link, $reschedule_link, $noshow_link, $completed_link, $comment_link); break; default: $actions = array($get_link, $cancel_link, $reschedule_link, $comment_link); break; } return implode(' ', $actions); }
/** Possible actions for a comment: prioritize and delete */ function comment_actions($comment_id) { $CI =& get_instance(); $c = $CI->commentModel->get_comment_by_id($comment_id); $p = $CI->participantModel->get_participant_by_id($c->participant_id); $prio_link = anchor('comment/prioritize/' . $comment_id . ($c->priority ? '/0' : ''), img_star(!$c->priority)); $handled_link = anchor('comment/mark_handled/' . $comment_id . ($c->handled ? '/0' : ''), img_accept(lang('mark_handled'), !$c->handled)); $edit_link = anchor('comment/edit/' . $comment_id, img_edit()); $p_link = anchor('participant/edit/' . $c->participant_id, img_edit_participant($p)); $d_link = anchor('comment/delete/' . $comment_id, img_delete(), warning(lang('sure_delete_comment'))); return implode(' ', array($prio_link, $handled_link, $edit_link, $p_link, $d_link)); }
$d->setSource($op['DATETRANSACTION']); # $type = ($op['TYPE'] == "C" ? "CREDIT" : "DEBIT"); $type = $op['TYPE']; echo "<tr><td>" . $d->getDate() . '-' . $d->getMois(3) . "-" . $d->getYear(2) . "</td>" . "<td>" . $op['NOMEL'] . ' ' . $op['PRENOMEL'] . ".</td><td>" . $op['REFCAISSE'] . "</td>" . '<td>' . $op['DESCRIPTION'] . '</td><td align="right">' . moneyString($op['MONTANT']) . "</td>"; if ($op['VALIDE'] == 0) { echo "<td style='background-color:#ff9999' align='center'>En cours</td>"; } else { echo "<td style='background-color:#99ff99' align='center'>Validée</td>"; } echo "<td align='center'><img onclick = \"tooltip_on(event,'" . $op['IDCAISSE'] . "')\"" . " style='cursor:pointer' src='" . img_info() . "' />"; # Droit d'impression des recu if (isAuth(522)) { if (!empty($op['PERCUPAR'])) { echo " <img style='cursor:pointer' title='Imprimer le recu de cette operation caisse' " . "src='" . img_print() . "' onclick=\"document.location='" . Router::url("caisse", "recu", $op['IDCAISSE']) . "'\">"; } else { echo " <img style='cursor:pointer' title='Certifier que vous avez recu ce montant' " . "src='" . img_accept() . "' onclick=\"percuRecu(" . $op['IDCAISSE'] . ")\">"; } } echo "</td><td align='center'>"; if (peutValiderLesOperationsCaisses()) { if ($op['VALIDE'] == 0 && !empty($op['PERCUPAR'])) { echo "<img onclick=\"validerOperation(" . $op['IDCAISSE'] . ")\" " . "style='cursor:pointer' src='" . img_valider() . "' /> "; } else { echo "<img style='cursor:pointer' src='" . img_valider_disabled() . "' /> "; } } else { echo "<img style='cursor:pointer' src='" . img_valider_disabled() . "' /> "; } if (peutSupprimerLesOperationsCaisses()) { echo "<img style='cursor:pointer' src='" . img_delete() . "' " . "onclick=\"document.location='" . Router::url("caisse", "delete", $op['IDCAISSE']) . "'\" />"; } else {