mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
Add option to allow selecting no category
관리자 이외의 사용자가 글을 쓸 때 분류를 선택하지 않아도 되도록 허용하는 옵션 추가 (기본값: 허용하지 않음)
This commit is contained in:
parent
2c64e16bd2
commit
eb3108b446
5 changed files with 19 additions and 2 deletions
|
|
@ -170,6 +170,7 @@ class boardAdminController extends board {
|
|||
}
|
||||
|
||||
$module_info->hide_category = Context::get('hide_category') == 'Y' ? 'Y' : 'N';
|
||||
$module_info->allow_no_category = Context::get('allow_no_category') == 'Y' ? 'Y' : 'N';
|
||||
$oModuleController = getController('module'); /* @var $oModuleController moduleController */
|
||||
$output = $oModuleController->updateModule($module_info);
|
||||
if(!$output->toBool())
|
||||
|
|
|
|||
|
|
@ -825,8 +825,14 @@ class boardView extends board
|
|||
/**
|
||||
* add JS filters
|
||||
**/
|
||||
if(Context::get('logged_info')->is_admin=='Y') Context::addJsFilter($this->module_path.'tpl/filter', 'insert_admin.xml');
|
||||
else Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml');
|
||||
if(Context::get('logged_info')->is_admin == 'Y' || $this->module_info->allow_no_category == 'Y')
|
||||
{
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert_admin.xml');
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::addJsFilter($this->module_path.'tpl/filter', 'insert.xml');
|
||||
}
|
||||
|
||||
$oSecurity = new Security();
|
||||
$oSecurity->encodeHTML('category_list.text', 'category_list.title');
|
||||
|
|
|
|||
|
|
@ -45,6 +45,8 @@ $lang->comment_status = 'Comments';
|
|||
$lang->category_settings = 'Category settings';
|
||||
$lang->hide_category = 'Hide categories';
|
||||
$lang->about_hide_category = 'You can disable a category feature.';
|
||||
$lang->allow_no_category = 'Do not require category';
|
||||
$lang->about_allow_no_category = 'Allow users to write documents without selecting a category.';
|
||||
$lang->protect_content = 'Protect Content';
|
||||
$lang->protect_comment = 'Protect Comment';
|
||||
$lang->protect_regdate = 'Update/Delete Time Limit';
|
||||
|
|
|
|||
|
|
@ -46,6 +46,8 @@ $lang->comment_status = '댓글';
|
|||
$lang->category_settings = '분류 설정';
|
||||
$lang->hide_category = '분류 숨기기';
|
||||
$lang->about_hide_category = '임시로 분류를 사용하지 않으려면 체크하세요.';
|
||||
$lang->allow_no_category = '미분류 허용';
|
||||
$lang->about_allow_no_category = '분류를 선택하지 않은 글도 허용하려면 체크하세요.';
|
||||
$lang->protect_content = '글 보호 기능';
|
||||
$lang->protect_comment = '댓글 보호 기능';
|
||||
$lang->protect_regdate = '기간 제한 기능';
|
||||
|
|
|
|||
|
|
@ -19,6 +19,12 @@
|
|||
<label class="x_inline" for="hide_category"><input type="checkbox" name="hide_category" id="hide_category" value="Y" checked="checked"|cond="$module_info->hide_category == 'Y'" /> {$lang->about_hide_category}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="x_control-group">
|
||||
<label class="x_control-label">{$lang->allow_no_category}</label>
|
||||
<div class="x_controls">
|
||||
<label class="x_inline" for="allow_no_category"><input type="checkbox" name="allow_no_category" id="allow_no_category" value="Y" checked="checked"|cond="$module_info->allow_no_category == 'Y'" /> {$lang->about_allow_no_category}</label>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<div class="x_clearfix btnArea">
|
||||
<div class="x_pull-right">
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue