修改字段布局

增加字段的可用性
This commit is contained in:
fen
2013-11-25 12:05:20 +08:00
parent fa55695621
commit cc57832b8f
8 changed files with 88 additions and 55 deletions
+12 -5
View File
@@ -4,7 +4,7 @@ $fields = isset($post) ? $post->getFieldItems() : $page->getFieldItems();
$defaultFields = isset($post) ? $post->getDefaultFieldItems() : $post->getDefaultFieldItems();
?>
<section id="custom-field" class="typecho-post-option fold">
<label id="custom-field-expand" class="typecho-label"><?php _e('自定义字段'); ?></label>
<label id="custom-field-expand" class="typecho-label"><?php _e('自定义字段'); ?> <i class="i-caret-down"></i></label>
<table class="typecho-list-table mono">
<colgroup>
<col width="25%"/>
@@ -37,23 +37,30 @@ $defaultFields = isset($post) ? $post->getDefaultFieldItems() : $post->getDefaul
<?php endforeach; ?>
<?php if (empty($defaultFields) && empty($fields)): ?>
<tr>
<td><input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" class="text-s w-100"></td>
<td>
<label for="title" class="visuallyhidden"><?php _e('字段名称'); ?></label>
<input type="text" name="fieldNames[]" placeholder="<?php _e('字段名称'); ?>" class="text-s w-100">
</td>
<td>
<label for="title" class="visuallyhidden"><?php _e('字段类型'); ?></label>
<select name="fieldTypes[]" id="">
<option value="str"><?php _e('字符'); ?></option>
<option value="int"><?php _e('整数'); ?></option>
<option value="float"><?php _e('小数'); ?></option>
</select>
</td>
<td><textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea></td>
<td>
<label for="title" class="visuallyhidden"><?php _e('字段值'); ?></label>
<textarea name="fieldValues[]" placeholder="<?php _e('字段值'); ?>" class="text-s w-100" rows="2"></textarea>
</td>
<td>
<button type="button" class="btn-xs"><?php _e('删除'); ?></button>
</td>
</tr>
<?php endif; ?>
</table>
<p class="description">
<div class="description clearfix">
<button type="button" class="btn-xs operate-add"><?php _e('+添加字段'); ?></button>
<?php _e('自定义字段可以扩展你的模板功能, 使用方法参见 <a href="">帮助文档</a>'); ?>
</p>
</div>
</section>