mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-04 17:44:38 +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
|
|
@ -101,6 +101,14 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if($module_info->grants) {
|
||||||
|
foreach($module_info->grants as $key => $val) {
|
||||||
|
if(!$xml_info->grant->{$key}) {
|
||||||
|
$xml_info->grant->{$key}->title = $key;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 권한 설정
|
// 권한 설정
|
||||||
if($xml_info->grant) {
|
if($xml_info->grant) {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
$lang->cmd_apply = 'Apply';
|
$lang->cmd_apply = 'Apply';
|
||||||
$lang->cmd_open_calendar = 'Select a Date';
|
$lang->cmd_open_calendar = 'Select a Date';
|
||||||
$lang->cmd_send = 'Send';
|
$lang->cmd_send = 'Send';
|
||||||
|
$lang->cmd_print = 'Print';
|
||||||
|
|
||||||
$lang->enable = 'Enable';
|
$lang->enable = 'Enable';
|
||||||
$lang->disable = 'Disable';
|
$lang->disable = 'Disable';
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
$lang->cmd_apply = 'Applicar';
|
$lang->cmd_apply = 'Applicar';
|
||||||
$lang->cmd_open_calendar = 'Seleccionar la fecha';
|
$lang->cmd_open_calendar = 'Seleccionar la fecha';
|
||||||
$lang->cmd_send = 'Enviar';
|
$lang->cmd_send = 'Enviar';
|
||||||
|
$lang->cmd_print = 'Print';
|
||||||
|
|
||||||
$lang->enable = 'Enable';
|
$lang->enable = 'Enable';
|
||||||
$lang->disable = 'Disable';
|
$lang->disable = 'Disable';
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
$lang->cmd_apply = '適用';
|
$lang->cmd_apply = '適用';
|
||||||
$lang->cmd_open_calendar = 'カレンダを開く';
|
$lang->cmd_open_calendar = 'カレンダを開く';
|
||||||
$lang->cmd_send = '送信';
|
$lang->cmd_send = '送信';
|
||||||
|
$lang->cmd_print = 'Print';
|
||||||
|
|
||||||
$lang->enable = '可';
|
$lang->enable = '可';
|
||||||
$lang->disable = '不可';
|
$lang->disable = '不可';
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
$lang->cmd_apply = '적용';
|
$lang->cmd_apply = '적용';
|
||||||
$lang->cmd_open_calendar = '날짜 선택';
|
$lang->cmd_open_calendar = '날짜 선택';
|
||||||
$lang->cmd_send = '발송';
|
$lang->cmd_send = '발송';
|
||||||
|
$lang->cmd_print = '인쇄';
|
||||||
|
|
||||||
$lang->enable = '가능';
|
$lang->enable = '가능';
|
||||||
$lang->disable = '불가능';
|
$lang->disable = '불가능';
|
||||||
|
|
|
||||||
|
|
@ -45,6 +45,7 @@
|
||||||
$lang->cmd_apply = '适用';
|
$lang->cmd_apply = '适用';
|
||||||
$lang->cmd_open_calendar = '选择日期';
|
$lang->cmd_open_calendar = '选择日期';
|
||||||
$lang->cmd_send = '发送';
|
$lang->cmd_send = '发送';
|
||||||
|
$lang->cmd_print = 'Print';
|
||||||
|
|
||||||
$lang->enable = '使用';
|
$lang->enable = '使用';
|
||||||
$lang->disable = '禁用';
|
$lang->disable = '禁用';
|
||||||
|
|
|
||||||
|
|
@ -63,6 +63,8 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
|
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;">{$lang->cmd_print}</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- 댓글/ 엮인글 정보 출력 -->
|
<!-- 댓글/ 엮인글 정보 출력 -->
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,8 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<ul class="replyAndTrackback">
|
<ul class="replyAndTrackback">
|
||||||
|
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||||
|
|
||||||
<!--@if($grant->write_comment && $oDocument->allowComment()) -->
|
<!--@if($grant->write_comment && $oDocument->allowComment()) -->
|
||||||
<li class="reply"><a href="#trackback_{$oDocument->document_srl}">{$lang->comment} <strong>{$oDocument->getCommentCount()}</strong></a></li>
|
<li class="reply"><a href="#trackback_{$oDocument->document_srl}">{$lang->comment} <strong>{$oDocument->getCommentCount()}</strong></a></li>
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,7 @@
|
||||||
|
|
||||||
<!-- 관련 링크 -->
|
<!-- 관련 링크 -->
|
||||||
<div>
|
<div>
|
||||||
|
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;">{$lang->cmd_print}</a>
|
||||||
<a href="{getUrl('document_srl','')}">[{$lang->cmd_list}]</a>
|
<a href="{getUrl('document_srl','')}">[{$lang->cmd_list}]</a>
|
||||||
<a href="#" onclick="doVote();return false;">[{$lang->cmd_vote}]</a>
|
<a href="#" onclick="doVote();return false;">[{$lang->cmd_vote}]</a>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<li class="listButton">
|
<li class="listButton">
|
||||||
|
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||||
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
||||||
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<li class="listButton">
|
<li class="listButton">
|
||||||
|
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||||
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
||||||
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -91,6 +91,7 @@
|
||||||
<!--@end-->
|
<!--@end-->
|
||||||
|
|
||||||
<li class="listButton">
|
<li class="listButton">
|
||||||
|
<a href="{getUrl('','act','dispDocumentPrint','document_srl',$oDocument->document_srl)}" onclick="winopen(this.href);return false;" class="button"><span>{$lang->cmd_print}</span></a>
|
||||||
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
<a href="{getUrl('document_srl','')}" class="button"><span>{$lang->cmd_list}</span></a>
|
||||||
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
<a href="#" onclick="doVote();return false;" class="button"><span>{$lang->cmd_vote}</span></a>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,8 @@
|
||||||
<module>
|
<module>
|
||||||
<grants />
|
<grants />
|
||||||
<actions>
|
<actions>
|
||||||
|
<action name="dispDocumentPrint" type="view" standalone="true" />
|
||||||
|
|
||||||
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
|
<action name="dispDocumentAdminList" type="view" admin_index="true" standalone="true" />
|
||||||
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
|
<action name="procDocumentAdminDeleteChecked" type="controller" standalone="true" />
|
||||||
</actions>
|
</actions>
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,7 @@
|
||||||
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
// action forward에 등록 (관리자 모드에서 사용하기 위함)
|
||||||
$oModuleController = &getController('module');
|
$oModuleController = &getController('module');
|
||||||
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminList');
|
$oModuleController->insertActionForward('document', 'view', 'dispDocumentAdminList');
|
||||||
|
$oModuleController->insertActionForward('document', 'view', 'dispDocumentPrint');
|
||||||
|
|
||||||
return new Object();
|
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