예제 #1
0
파일: view_entry.php 프로젝트: rhertzog/lcs
echo '
    </table>
    <ul class="nav">';
// Show a printer-friendly link
if (empty($friendly)) {
    echo $printerStr;
}
if (($is_my_event || $is_nonuser_admin || $is_assistant || $can_approve) && $event_status == 'W' && $readonly == 'N' && $login != '__public__') {
    $approveStr = translate('Approve/Confirm entry');
    $rejectStr = translate('Reject entry');
    echo '
      <li><a title="' . $approveStr . '" class="nav" href="approve_entry.php?id=' . $id . $u_url . '&amp;type=E" onclick="return confirm( \'' . translate('Approve this entry?', true) . '\' );">' . $approveStr . '</a></li>
      <li><a title="' . $rejectStr . '"  class="nav" href="reject_entry.php?id=' . $id . $u_url . '&amp;type=E" onclick="return confirm( \'' . translate('Reject this entry?', true) . '\' );">' . $rejectStr . '</a></li>';
}
// TODO add these permissions to the UAC list
$can_add_attach = Doc::attachmentsEnabled() && $login != '__public__' && ($login == $create_by || $is_my_event && $ALLOW_ATTACH_PART == 'Y' || $ALLOW_ATTACH_ANY == 'Y' || $is_admin);
$can_add_comment = Doc::commentsEnabled() && $login != '__public__' && ($login == $create_by || $is_my_event && $ALLOW_COMMENTS_PART == 'Y' || $ALLOW_COMMENTS_ANY == 'Y' || $is_admin);
if ($can_add_attach && $event_status != 'D') {
    $addAttchStr = translate('Add Attachment');
    echo '
      <li><a title="' . $addAttchStr . '" class="nav" href="docadd.php?type=A&amp;id=' . $id . $u_url . '">' . $addAttchStr . '</a></li>';
}
if ($can_add_comment && $event_status != 'D') {
    $addCommentStr = translate('Add Comment');
    echo '
      <li><a title="' . $addCommentStr . '" class="nav" href="docadd.php?type=C&amp;id=' . $id . $u_url . '">' . $addCommentStr . '</a></li>';
}
// If approved, but event category not set (and user does not have permission
// to edit where they could also set the category), then allow them to
// set it through set_cat.php.
if (empty($user) && $CATEGORIES_ENABLED == 'Y' && $readonly != 'Y' && $is_my_event && $login != '__public__' && !$is_nonuser && $event_status != 'D' && !$can_edit) {