mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-23 05:09:56 +09:00
인쇄 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/trunk@1912 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
3d3cd94499
commit
d0c8f54ed8
17 changed files with 81 additions and 0 deletions
|
|
@ -2,6 +2,8 @@
|
|||
<module>
|
||||
<grants />
|
||||
<actions>
|
||||
<action name="dispDocumentPrint" type="view" standalone="true" />
|
||||
|
||||
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
|
||||
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
|
||||
</actions>
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||
$oModuleController = &getController('module');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminList');
|
||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentPrint');
|
||||
|
||||
return new Object();
|
||||
}
|
||||
|
|
|
|||
45
modules/document/document.view.php
Normal file
45
modules/document/document.view.php
Normal file
|
|
@ -0,0 +1,45 @@
|
|||
<?php
|
||||
/**
|
||||
* @class documentView
|
||||
* @author zero (zero@nzeo.com)
|
||||
* @brief document 모듈의 View class
|
||||
**/
|
||||
|
||||
class documentView extends document {
|
||||
|
||||
/**
|
||||
* @brief 초기화
|
||||
**/
|
||||
function init() {
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 문서 인쇄 기능
|
||||
* 해당 글만 찾아서 그냥 출력해버린다;;
|
||||
**/
|
||||
function dispDocumentPrint() {
|
||||
// 권한 체크
|
||||
if(!$this->grant->view) return new Object(-1,'msg_not_permitted');
|
||||
|
||||
// 목록 구현에 필요한 변수들을 가져온다
|
||||
$document_srl = Context::get('document_srl');
|
||||
|
||||
// document 객체를 생성. 기본 데이터 구조의 경우 document모듈만 쓰면 만사 해결.. -_-;
|
||||
$oDocumentModel = &getModel('document');
|
||||
|
||||
// 선택된 문서 표시를 위한 객체 생성
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
|
||||
if(!$oDocument->isExists()) return new Object(-1,'msg_invalid_request');
|
||||
|
||||
// 브라우저 타이틀 설정
|
||||
Context::setBrowserTitle($oDocument->getTitleText());
|
||||
|
||||
Context::set('oDocument', $oDocument);
|
||||
|
||||
$this->module_info->layout_srl = null;
|
||||
$this->setTemplatePath($this->module_path.'tpl');
|
||||
$this->setTemplateFile('print_page');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
1
modules/document/tpl/css/document.css
Normal file
1
modules/document/tpl/css/document.css
Normal file
|
|
@ -0,0 +1 @@
|
|||
body { margin:10px; font-size:.75em; font-family:sans-serif;}
|
||||
11
modules/document/tpl/print_page.html
Normal file
11
modules/document/tpl/print_page.html
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
<!--%import("./css/document.css")-->
|
||||
<!--%import("./css/document.css")-->
|
||||
|
||||
<h1>{$oDocument->getTitleText()}</h1><br />
|
||||
{$oDocument->getContent()}
|
||||
|
||||
<script type="text/javascript">//<![CDATA[
|
||||
xAddEventListener(window,'load',function() { window.print(); } );
|
||||
//]]></script>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue