feat: 활동 로그에 엑셀 다운로드/인쇄 기록 추가
- export_*: 모든 엑셀/CSV 다운로드를 'export' 액션으로 자동 기록(파일명 포함) - 인쇄: 레이아웃 beforeprint beacon → bag/activity/print-log 가 'print' 액션 기록(화면·경로) - 활동 로그 뷰어에 엑셀 다운로드/인쇄 라벨·배지·필터·요약 추가 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -46,6 +46,8 @@ class ActivityLog extends BaseController
|
||||
'feedback' => '사용자 의견',
|
||||
'feedback_file' => '의견 첨부',
|
||||
'blockchain_ledger' => '원장',
|
||||
'export' => '엑셀 다운로드',
|
||||
'print' => '인쇄',
|
||||
];
|
||||
|
||||
/** action → 한글 라벨 */
|
||||
@@ -53,6 +55,8 @@ class ActivityLog extends BaseController
|
||||
'create' => '등록',
|
||||
'update' => '수정',
|
||||
'delete' => '삭제',
|
||||
'export' => '엑셀 다운로드',
|
||||
'print' => '인쇄',
|
||||
];
|
||||
|
||||
/** 컬럼 → 한글 라벨 (없으면 접미사 추정 → 원문) */
|
||||
@@ -156,6 +160,10 @@ class ActivityLog extends BaseController
|
||||
|
||||
if ($isLogin) {
|
||||
$text = '로그인';
|
||||
} elseif ($action === 'export') {
|
||||
$text = '엑셀 다운로드 — ' . (string) ($after['파일'] ?? '');
|
||||
} elseif ($action === 'print') {
|
||||
$text = '인쇄 — ' . (string) ($after['화면'] ?? $after['경로'] ?? '');
|
||||
} elseif ($action === 'create') {
|
||||
$text = $tlabel . $namePart . ' 등록';
|
||||
} elseif ($action === 'delete') {
|
||||
|
||||
@@ -3580,6 +3580,26 @@ SQL);
|
||||
/**
|
||||
* 사용자 매뉴얼(설명서) — 목차 첫 페이지로 이동.
|
||||
*/
|
||||
/**
|
||||
* 인쇄 활동 기록 (클라이언트 beforeprint beacon 수신).
|
||||
* 화면(경로·제목)을 활동 로그에 'print' 액션으로 남긴다.
|
||||
*/
|
||||
public function printLog(): \CodeIgniter\HTTP\ResponseInterface
|
||||
{
|
||||
$title = trim((string) $this->request->getPost('title'));
|
||||
$path = trim((string) $this->request->getPost('path'));
|
||||
if (mb_strlen($title) > 120) {
|
||||
$title = mb_substr($title, 0, 120);
|
||||
}
|
||||
if (mb_strlen($path) > 200) {
|
||||
$path = mb_substr($path, 0, 200);
|
||||
}
|
||||
helper('audit');
|
||||
audit_log('print', 'print', 0, null, ['화면' => $title, '경로' => $path]);
|
||||
|
||||
return $this->response->setStatusCode(204);
|
||||
}
|
||||
|
||||
public function manual(): \CodeIgniter\HTTP\RedirectResponse
|
||||
{
|
||||
$first = (new \App\Libraries\ManualRenderer())->firstSlug();
|
||||
|
||||
Reference in New Issue
Block a user