Clean up notification center and fix mention algorithm

This commit is contained in:
Kijin Sung 2016-04-16 21:32:00 +09:00
parent 30fbf83659
commit 3df66f2a1a
13 changed files with 170 additions and 191 deletions

View file

@ -9,19 +9,19 @@
<section class="section">
<div class="x_control-group">
<label class="x_control-label"><span class="x_label x_label-important">{$lang->ncenterlite_warning}</span> {$lang->ncenterlite_io}</label>
<label class="x_control-label">{$lang->ncenterlite_io}</label>
<div class="x_controls">
<label for="notify_mention" class="x_inline"><input type="checkbox" name="use['mention']" id="notify_mention" value="1" checked="checked"|cond="isset($config->use['mention'])" /> {$lang->ncenterlite_mention}</label>
<label for="notify_comment" class="x_inline"><input type="checkbox" name="use['comment']" id="notify_comment" value="1" checked="checked"|cond="isset($config->use['comment'])" /> {$lang->ncenterlite_comment}</label>
<label for="notify_comment_comment" class="x_inline"><input type="checkbox" name="use['comment_comment']" id="notify_comment_comment" value="1" checked="checked"|cond="isset($config->use['comment_comment'])" /> {$lang->ncenterlite_comment_comment}</label>
<label for="notify_vote" class="x_inline"><input type="checkbox" name="use['vote']" id="notify_vote" value="1" checked="checked"|cond="isset($config->use['vote'])" /> {$lang->ncenterlite_cmd_vote}</label>
<label for="notify_message" class="x_inline"><input type="checkbox" name="use['message']" id="notify_message" value="1" checked="checked"|cond="isset($config->use['message'])" /> {$lang->ncenterlite_type_message}</label>
<label for="notify_admin_content" class="x_inline"><input type="checkbox" name="use['admin_content']" id="notify_admin_content" value="1" checked="checked"|cond="isset($config->use['admin_content'])" /> {$lang->ncenterlite_admin_content}</label>
<p>{$lang->about_admin_content}</p>
<label for="notify_mention" class="x_inline"><input type="checkbox" name="use[mention]" id="notify_mention" value="1" checked="checked"|cond="isset($config->use['mention'])" /> {$lang->ncenterlite_mention}</label>
<label for="notify_comment" class="x_inline"><input type="checkbox" name="use[comment]" id="notify_comment" value="1" checked="checked"|cond="isset($config->use['comment'])" /> {$lang->ncenterlite_comment}</label>
<label for="notify_comment_comment" class="x_inline"><input type="checkbox" name="use[comment_comment]" id="notify_comment_comment" value="1" checked="checked"|cond="isset($config->use['comment_comment'])" /> {$lang->ncenterlite_comment_comment}</label>
<label for="notify_vote" class="x_inline"><input type="checkbox" name="use[vote]" id="notify_vote" value="1" checked="checked"|cond="isset($config->use['vote'])" /> {$lang->ncenterlite_cmd_vote}</label>
<label for="notify_message" class="x_inline"><input type="checkbox" name="use[message]" id="notify_message" value="1" checked="checked"|cond="isset($config->use['message'])" /> {$lang->ncenterlite_type_message}</label>
<label for="notify_admin_content" class="x_inline"><input type="checkbox" name="use[admin_content]" id="notify_admin_content" value="1" checked="checked"|cond="isset($config->use['admin_content'])" /> {$lang->ncenterlite_admin_content}</label>
<p class="x_help-block">{$lang->about_admin_content}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label"><span class="x_label x_label-important">{$lang->ncenterlite_warning}</span> {$lang->ncenterlite_display}</label>
<label class="x_control-label">{$lang->ncenterlite_display}</label>
<div class="x_controls">
<label class="x_inline">
<input type="radio" id="display_use_y" name="display_use" value="Y" checked="checked"|cond="$config->display_use == 'Y'" /> {$lang->ncenterlite_display_y}
@ -33,19 +33,15 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->anonymous_nick_name_setting}</label>
<label class="x_control-label">{$lang->member_menu_view}</label>
<div class="x_controls">
<input type="text" name="anonymous_name" value="{$config->anonymous_name}" />
<p class="x_help-block">{$lang->about_anonymous_nick_name}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->mention_setting}</label>
<div class="x_controls mention_option">
<label class="x_inline">
<input type="checkbox" name="mention_format[]" value="respect" data-mention-split="님" checked="checked"|cond="is_array($config->mention_format) && in_array('respect', $config->mention_format)" />{$lang->mention_nim}
<input type="radio" id="user_config_list_id" name="user_config_list" value="Y" checked="checked"|cond="$config->user_config_list == 'Y'" /> {$lang->member_menu_on}
</label>
{$lang->about_mention_preview}
<label class="x_inline">
<input type="radio" id="user_config_list_nick_name" name="user_config_list" value="N" checked="checked"|cond="$config->user_config_list != 'Y'" /> {$lang->member_menu_off}
</label>
<p class="x_help-block">{$lang->about_member_menu_view}</p>
</div>
</div>
<div class="x_control-group">
@ -61,23 +57,39 @@
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->member_menu_view}</label>
<div class="x_controls">
<label class="x_control-label">{$lang->mention_suffixes}</label>
<div class="x_controls mention_option">
<label class="x_inline">
<input type="radio" id="user_config_list_id" name="user_config_list" value="Y" checked="checked"|cond="$config->user_config_list == 'Y'" /> {$lang->member_menu_on}
<input type="text" name="mention_suffixes" value="{escape(implode(', ', $config->mention_suffixes), false)}" />
</label>
<p class="x_help-block">{$lang->about_mention_suffixes}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->mention_suffix_always_cut}</label>
<div class="x_controls mention_option">
<label class="x_inline">
<input type="radio" id="mention_suffix_always_cut_y" name="mention_suffix_always_cut" value="Y" checked="checked"|cond="$config->mention_suffix_always_cut == 'Y'" /> {$lang->mention_suffix_always_cut_y}
</label>
<label class="x_inline">
<input type="radio" id="user_config_list_nick_name" name="user_config_list" value="N" checked="checked"|cond="$config->user_config_list == 'N'" /> {$lang->member_menu_off}
<input type="radio" id="mention_suffix_always_cut_n" name="mention_suffix_always_cut" value="N" checked="checked"|cond="$config->mention_suffix_always_cut != 'Y'" /> {$lang->mention_suffix_always_cut_n}
</label>
<p class="x_help-block">{$lang->about_member_menu_view}</p>
<p class="x_help-block">{$lang->about_mention_suffix_always_cut}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->ncenterlite_document_event_read}</label>
<div class="x_controls">
<label class="x_inline"><input type="radio" name="document_read" value="N" checked="checked"|cond="$config->document_read == 'N'" />{$lang->ncenterlite_document_event_read_preserve}</label>
<label class="x_inline"><input type="radio" name="document_read" value="Y" checked="checked"|cond="$config->document_read == 'Y'" />{$lang->ncenterlite_document_event_read_delete}</label>
<p>{$lang->ncenterlite_document_event_read_about}</p>
<label class="x_inline"><input type="radio" name="document_read" value="Y" checked="checked"|cond="$config->document_read == 'Y'" /> {$lang->ncenterlite_document_event_read_delete}</label>
<label class="x_inline"><input type="radio" name="document_read" value="N" checked="checked"|cond="$config->document_read != 'Y'" /> {$lang->ncenterlite_document_event_read_preserve}</label>
<p class="x_help-block">{$lang->ncenterlite_document_event_read_about}</p>
</div>
</div>
<div class="x_control-group">
<label class="x_control-label">{$lang->anonymous_nick_name_setting}</label>
<div class="x_controls">
<input type="text" name="anonymous_name" value="{escape($config->anonymous_name, false)}" />
<p class="x_help-block">{$lang->about_anonymous_nick_name}</p>
</div>
</div>
</section>