|
|
|
@ -158,21 +158,21 @@ class Attendance |
|
|
|
|
$actions .= '<center>'; |
|
|
|
|
|
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
|
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('edit.png',get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
|
|
|
|
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
|
|
|
|
if ($attendance[5] == 1) { |
|
|
|
|
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=attendance_delete&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('visible.png',get_lang('Hide'), array(), ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=attendance_delete&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('visible.png', get_lang('Hide'), array(), ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
} else { |
|
|
|
|
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToRestore').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=attendance_restore&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('invisible.png',get_lang('Show'), array(), ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToRestore').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=attendance_restore&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('invisible.png', get_lang('Show'), array(), ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$attendance[2] = '<del>'.$attendance[2].'</del>'; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
$is_locked_attendance = self::is_locked_attendance($attendance[0]); |
|
|
|
|
if ($is_locked_attendance) { |
|
|
|
|
$actions .= Display::return_icon('edit_na.png',get_lang('Edit')).' '; |
|
|
|
|
$actions .= Display::return_icon('delete_na.png',get_lang('Delete')); |
|
|
|
|
$actions .= Display::return_icon('edit_na.png', get_lang('Edit')).' '; |
|
|
|
|
$actions .= Display::return_icon('delete_na.png', get_lang('Delete')); |
|
|
|
|
} else { |
|
|
|
|
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('edit.png',get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
|
|
|
|
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=attendance_delete&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('visible.png',get_lang('Hide'), array(), ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=attendance_edit&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a> '; |
|
|
|
|
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToDelete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=attendance_delete&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('visible.png', get_lang('Hide'), array(), ICON_SIZE_SMALL).'</a>'; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -187,12 +187,12 @@ class Attendance |
|
|
|
|
} else { |
|
|
|
|
$message_alert = get_lang('UnlockMessageInformation'); |
|
|
|
|
} |
|
|
|
|
$actions .= ' <a onclick="javascript:if(!confirm(\''.$message_alert.'\')) return false;" href="index.php?'.api_get_cidreq().'&action=lock_attendance&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('unlock.png',get_lang('LockAttendance')).'</a>'; |
|
|
|
|
$actions .= ' <a onclick="javascript:if(!confirm(\''.$message_alert.'\')) return false;" href="index.php?'.api_get_cidreq().'&action=lock_attendance&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('unlock.png', get_lang('LockAttendance')).'</a>'; |
|
|
|
|
} else { |
|
|
|
|
if (api_is_platform_admin()) { |
|
|
|
|
$actions .= ' <a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToUnlockTheAttendance').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=unlock_attendance&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('locked.png',get_lang('UnlockAttendance')).'</a>'; |
|
|
|
|
$actions .= ' <a onclick="javascript:if(!confirm(\''.get_lang('AreYouSureToUnlockTheAttendance').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=unlock_attendance&attendance_id='.$attendance[0].$param_gradebook.'">'.Display::return_icon('locked.png', get_lang('UnlockAttendance')).'</a>'; |
|
|
|
|
} else { |
|
|
|
|
$actions .= ' '.Display::return_icon('locked_na.png',get_lang('LockedAttendance')); |
|
|
|
|
$actions .= ' '.Display::return_icon('locked_na.png', get_lang('LockedAttendance')); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|