From 2b77b42480f018c8de14e270c513a618be99e571 Mon Sep 17 00:00:00 2001 From: Kijin Sung Date: Fri, 2 Oct 2020 01:36:40 +0900 Subject: [PATCH] Add initial support for all-boards notice --- common/lang/en.php | 2 ++ common/lang/ko.php | 2 ++ modules/board/board.view.php | 2 ++ modules/board/skins/xedition/board.default.css | 6 +++++- modules/board/skins/xedition/write_form.html | 9 +++++++-- modules/document/document.item.php | 2 +- modules/document/queries/getNoticeList.xml | 9 ++++++--- 7 files changed, 25 insertions(+), 7 deletions(-) diff --git a/common/lang/en.php b/common/lang/en.php index b6131f8da..dbd658de5 100644 --- a/common/lang/en.php +++ b/common/lang/en.php @@ -76,6 +76,8 @@ $lang->favorite = 'Favorite'; $lang->menu = 'Menu'; $lang->no = 'No.'; $lang->notice = 'Notice'; +$lang->notice_all = 'Notice All'; +$lang->not_notice = 'Normal'; $lang->secret = 'Secret'; $lang->category_srl = 'Category'; $lang->category = 'Category'; diff --git a/common/lang/ko.php b/common/lang/ko.php index a71b3ff9c..2bd2671b7 100644 --- a/common/lang/ko.php +++ b/common/lang/ko.php @@ -78,6 +78,8 @@ $lang->favorite = '즐겨찾기'; $lang->menu = '메뉴'; $lang->no = '번호'; $lang->notice = '공지'; +$lang->notice_all = '전체공지'; +$lang->not_notice = '일반'; $lang->secret = '비밀'; $lang->category_srl = '분류'; $lang->category = '분류'; diff --git a/modules/board/board.view.php b/modules/board/board.view.php index 2daab2010..1982ee885 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -109,6 +109,8 @@ class boardView extends board **/ Context::addJsFilter($this->module_path.'tpl/filter', 'input_password.xml'); Context::addJsFile($this->module_path.'tpl/js/board.js'); + Context::loadLang('./modules/document/lang'); + Context::loadLang('./modules/comment/lang'); // remove [document_srl]_cpage from get_vars $args = Context::getRequestVars(); diff --git a/modules/board/skins/xedition/board.default.css b/modules/board/skins/xedition/board.default.css index 32a7e2d25..ea1c59f97 100644 --- a/modules/board/skins/xedition/board.default.css +++ b/modules/board/skins/xedition/board.default.css @@ -285,13 +285,17 @@ vertical-align: middle; } .write_header select { + border: 1px solid #DBDBDB; height: 29px; width: 140px; padding: 0; } +.write_header select[name=is_notice] { + width: 76px; +} .write_header .iText { width: 360px; - margin: 0 10px 0 0; + margin: 0; background: #fff; } .write_editor .xd { diff --git a/modules/board/skins/xedition/write_form.html b/modules/board/skins/xedition/write_form.html index 4f7c6378f..b5e7ea15e 100644 --- a/modules/board/skins/xedition/write_form.html +++ b/modules/board/skins/xedition/write_form.html @@ -12,8 +12,13 @@ - - + + +
diff --git a/modules/document/document.item.php b/modules/document/document.item.php index 9e8775d25..060bb73f5 100644 --- a/modules/document/document.item.php +++ b/modules/document/document.item.php @@ -332,7 +332,7 @@ class documentItem extends BaseObject function isNotice() { - return (bool) ($this->get('is_notice') == 'Y'); + return (bool) ($this->get('is_notice') !== 'N'); } function useNotify() diff --git a/modules/document/queries/getNoticeList.xml b/modules/document/queries/getNoticeList.xml index ce41edb93..843ea8d57 100644 --- a/modules/document/queries/getNoticeList.xml +++ b/modules/document/queries/getNoticeList.xml @@ -6,9 +6,12 @@ - - - + + + + + +