修改文章分类

This commit is contained in:
fen 2013-10-14 15:15:06 +08:00
parent b3b1e63a1a
commit 8ce47c12d9
3 changed files with 59 additions and 108 deletions

View File

@ -1,7 +1,7 @@
<?php if(!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<div class="typecho-foot">
<div class="copyright">
<?php _e('基于 <a href="http://typecho.org">%s</a> 构建, 版本 %s # %s ', $options->software, $prefixVersion, $suffixVersion); ?>
<?php _e('基于 <a href="http://typecho.org">%s</a> 构建, 版本 %s-%s ', $options->software, $prefixVersion, $suffixVersion); ?>
</div>
<nav class="resource">
<a href="http://docs.typecho.org"><?php _e('帮助文档'); ?></a> &bull;

View File

@ -139,6 +139,8 @@ textarea {
line-height: 1.5;
}
input[type="radio"], input[type="checkbox"] { margin-right: 3px; }
input.text-s { padding: 5px; }
.w-10 { width: 10%; }
@ -1550,7 +1552,15 @@ ul.typecho-list-notable li .loading {
.typecho-post-area {
}
.typecho-post-area label.typecho-label {
.typecho-post-area .typecho-label {
display: block;
margin-bottom: -0.5em;
font-weight: bold;
}
.typecho-post-area #auto-save-message {
color: #999;
font-size: .92857em;
}
/*.typecho-post-area .typecho-preview-label {
@ -1678,11 +1688,9 @@ ul.typecho-list-notable li .loading {
}
.typecho-post-area button#btn-submit {
font-weight: bold;
}
.typecho-post-area button#btn-save {
font-style: italic;
}
.typecho-post-area span.size-btn {
@ -1694,102 +1702,41 @@ ul.typecho-list-notable li .loading {
.typecho-post-area br {
}
.typecho-post-area #advance-panel, .typecho-post-area #upload-panel {
.typecho-post-area #advance-panel {
}
.typecho-post-area .is-draft {
background: #FFF1A8;
}
ul.typecho-post-option {
.typecho-post-option .description {
margin-top: -0.5em;
color: #999;
font-size: .92857em;
}
ul.typecho-post-option li {
}
ul.typecho-post-option li:first-child {
}
ul.typecho-post-option li:last-child {
}
#advance-panel li, #upload-panel li {
}
ul.typecho-post-option li ul {
}
ul.typecho-post-option li ul.related {
}
ul.typecho-post-option li ul li {
}
ul.typecho-post-option li ul.related li {
}
ul.typecho-post-option li ul li:hover {
}
ul.typecho-post-option li ul.related li:hover {
}
ul.typecho-post-option .description {
}
ul.autocompleter-choices {
position: absolute;
margin: 0;
padding: 0;
.typecho-post-option .cat-list {
list-style: none;
background-color: #fff;
text-align: left;
font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
z-index: 50;
border: 1px solid #CED7A8;
border-top: none;
background: #DCE2C0;
color: #000;
font-size: 13px;
-moz-border-radius-bottomleft: 3px;
-moz-border-radius-bottomright: 3px;
-webkit-border-bottom-left-radius: 3px;
-webkit-border-bottom-right-radius: 3px;
/* hope IE support border radius, God save me! */
border-bottom-left-radius: 3px;
border-bottom-right-radius: 3px;
border: 1px solid #CCC;
padding: 6px 12px;
background-color: #FFF;
border-radius: 2px;
}
.typecho-post-option .cat-list li {
margin: 3px 0;
}
ul.autocompleter-choices li {
position: relative;
margin: 0;
padding: 0.3em 1.5em 0.3em 1em;
display: block;
float: none !important;
cursor: pointer;
font-weight: normal;
white-space: nowrap;
font-size: 1em;
line-height: 1.5em;
}
ul.autocompleter-choices li.autocompleter-selected, ul.autocompleter-choices li.autocompleter-hover {
background-color: #EDF0DF;
color: #000;
}
ul.autocompleter-choices span.autocompleter-queried {
display: inline;
float: none;
font-weight: bold;
margin: 0;
.typecho-post-option .visibility-option,
.typecho-post-option .allow-option {
list-style: none;
padding: 0;
color: #E47E00;
}
.typecho-post-area .advance, .typecho-post-area .attach, .typecho-post-area .media {
.typecho-post-option .visibility-option li,
.typecho-post-option .allow-option li {
}
/*.typecho-post-area .advance, .typecho-post-area .attach, .typecho-post-area .media {
font-weight: bold;
color: #333;
cursor: pointer;
@ -1816,7 +1763,7 @@ ul.autocompleter-choices span.autocompleter-queried {
.typecho-post-area .close {
background-position: 0 -16px;
*background-position: 0 -18px;
}
}*/
/**
* 标签列表

View File

@ -19,7 +19,6 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
<?php endif; ?>
</label>
<p class="title"><input type="text" id="title" name="title" value="<?php echo htmlspecialchars($post->title); ?>" class="w-100 text title" /></p>
<label for="text" class="typecho-label"><?php _e('内容'); ?><cite id="auto-save-message"></cite></label>
<p class="editor">
<span class="btnBold">bold</span><!--
@ -37,7 +36,7 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
--><span class="btnHr">hr</span>
</p>
<p>
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text" name="text" class="w-100"><?php echo htmlspecialchars($post->text); ?></textarea>
<textarea style="height: <?php $options->editorSize(); ?>px" autocomplete="off" id="text" name="text" class="w-100 mono"><?php echo htmlspecialchars($post->text); ?></textarea>
</p>
<?php include 'file-upload.php'; ?>
<label for="tags" class="typecho-label"><?php _e('标签'); ?></label>
@ -45,9 +44,10 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
<?php Typecho_Plugin::factory('admin/write-post.php')->content($post); ?>
<p class="submit">
<span class="left">
<span class="typecho-preview-label"><input type="checkbox" name="preview" id="btn-preview" /> <label for="btn-preview"><?php _e('预览内容'); ?></label></span>
<cite id="auto-save-message">保存于 1 分钟前</cite>
<!-- <span class="typecho-preview-label"><input type="checkbox" name="preview" id="btn-preview" /> <label for="btn-preview"><?php _e('预览内容'); ?></label></span>
<span class="advance close" tabindex="0"><?php _e('展开高级选项'); ?></span>
<span class="attach" tabindex="0"><?php _e('展开附件'); ?></span>
<span class="attach" tabindex="0"><?php _e('展开附件'); ?></span> -->
</span>
<span class="right">
<input type="hidden" name="cid" value="<?php $post->cid(); ?>" />
@ -57,26 +57,21 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
</span>
</p>
</div>
<div id="advance-panel" class="typecho-post-option clearfix">
<section>
<div id="advance-panel">
<section class="typecho-post-option">
<?php if($user->pass('editor', true)): ?>
<label class="typecho-label"><?php _e('公开度'); ?></label>
<ul>
<ul class="visibility-option">
<li><input id="publish" value="publish" name="visibility" type="radio"<?php if (($post->status == 'publish' && !$post->password) || !$post->status) { ?> checked="true"<?php } ?> /> <label for="publish"><?php _e('公开'); ?></label></li>
<li><input id="password" value="password"name="visibility" type="radio"<?php if ($post->password) { ?> checked="true"<?php } ?> /> <label for="password">密码保护 <input type="text" id="password" name="password" value="<?php $post->password(); ?>" class="mini" /></label></li>
<li><input id="password" value="password"name="visibility" type="radio"<?php if ($post->password) { ?> checked="true"<?php } ?> /> <label for="password">密码保护 <input type="text" id="post-password" name="post-password" class="text-s" value="<?php $post->password(); ?>" class="mini" /></label></li>
<li><input id="private" value="private" name="visibility" type="radio"<?php if ($post->status == 'private') { ?> checked="true"<?php } ?> /> <label for="private">私密</label></li>
<li><input id="waiting" value="waiting" name="visibility" type="radio"<?php if ($post->status == 'waiting') { ?> checked="true"<?php } ?> /> <label for="waiting">待审核</label></li>
</ul>
<br />
<?php endif; ?>
<label for="trackback" class="typecho-label"><?php _e('引用通告'); ?></label>
<textarea id="trackback" name="trackback"></textarea>
<p class="description"><?php _e('每一行一个引用地址, 用回车隔开'); ?></p>
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionLeft($post); ?>
</section>
<section>
<section class="typecho-post-option">
<label class="typecho-label"><?php _e('权限控制'); ?></label>
<ul>
<ul class="allow-option">
<li><input id="allowComment" name="allowComment" type="checkbox" value="1" <?php if($post->allow('comment')): ?>checked="true"<?php endif; ?> />
<label for="allowComment"><?php _e('允许评论'); ?></label></li>
<li><input id="allowPing" name="allowPing" type="checkbox" value="1" <?php if($post->allow('ping')): ?>checked="true"<?php endif; ?> />
@ -86,6 +81,12 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionRight($post); ?>
</ul>
</section>
<section class="typecho-post-option">
<label for="trackback" class="typecho-label"><?php _e('引用通告'); ?></label>
<p><textarea id="trackback" class="w-100 mono" name="trackback" rows="3"></textarea></p>
<p class="description"><?php _e('每一行一个引用地址, 用回车隔开'); ?></p>
<?php Typecho_Plugin::factory('admin/write-post.php')->advanceOptionLeft($post); ?>
</section>
</div>
<div id="typecho-preview-box">预览</div>
</div>
@ -95,9 +96,9 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
<p><input class="typecho-date w-100" type="text" name="date" id="date" value="<?php $post->date(); ?>" /></p>
</section>
<section class="typecho-post-option">
<label class="typecho-label"><?php _e('分类'); ?></label>
<label class="typecho-label"><?php _e('所属分类'); ?></label>
<?php Typecho_Widget::widget('Widget_Metas_Category_List')->to($category); ?>
<ul<?php if ($category->length > 8): ?> style="height: 264px"<?php endif; ?>>
<ul class="cat-list">
<?php
if ($post->have()) {
$categories = Typecho_Common::arrayFlatten($post->categories, 'mid');
@ -112,7 +113,7 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
</ul>
</section>
<section class="typecho-post-option">
<label for="slug" class="typecho-label"><?php _e('缩略名'); ?></label>
<label for="slug" class="typecho-label"><?php _e('URL 缩略名'); ?></label>
<p><input type="text" id="slug" name="slug" value="<?php $post->slug(); ?>" class="mini w-100" /></p>
<p class="description"><?php _e('为这篇日志自定义链接地址, 有利于搜索引擎收录'); ?></p>
</section>
@ -120,9 +121,12 @@ Typecho_Widget::widget('Widget_Contents_Post_Edit')->to($post);
<?php if($post->have()): ?>
<?php $modified = new Typecho_Date($post->modified); ?>
<section class="typecho-post-option">
<label class="typecho-label"><?php _e('本文由 <a href="%s">%s</a> 撰写',
Typecho_Common::url('manage-posts.php?uid=' . $post->author->uid, $options->adminUrl), $post->author->screenName); ?></label>
<p class="description"><?php _e('最后修改于 %s', $modified->word()); ?></p>
<p class="description">
<br>&mdash;<br>
<?php _e('本文由 <a href="%s">%s</a> 撰写',
Typecho_Common::url('manage-posts.php?uid=' . $post->author->uid, $options->adminUrl), $post->author->screenName); ?><br>
<?php _e('最后更新于 %s', $modified->word()); ?>
</p>
</section>
<?php endif; ?>
</div>