Browse files

modified: .gitignore

	new file:   davidblog/static/admin/css/admin.css
	modified:   davidblog/templates/admin/base.html
	modified:   davidblog/templates/admin/entry_add.html
	modified:   davidblog/templates/admin/entry_edit.html
	modified:   davidblog/templates/admin/entry_list.html
  • Loading branch information...
1 parent a558c56 commit 44f87d6f0472e98f8882c81dc976d8712a161799 David Xie committed Jun 4, 2010
View
2 .gitignore
@@ -1,2 +1,4 @@
davidblog/sessions/*
*.log
+*.pyc
+davidblog/davidblog.esproj
View
13 davidblog/static/admin/css/admin.css
@@ -0,0 +1,13 @@
+#edit_entry form table th {
+ width: 90px;
+ text-align: right;
+ padding-right: 10px;
+}
+#edit_entry form table td input {
+ width: 600px;
+ height: 26px;
+}
+#edit_entry form table td > span {
+ color: red;
+ padding: 5px;
+}
View
3 davidblog/templates/admin/base.html
@@ -6,6 +6,7 @@
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
<link rel="stylesheet" type="text/css" href="/static/admin/css/theme.css" />
<link rel="stylesheet" type="text/css" href="/static/admin/css/style.css" />
+ <link rel="stylesheet" type="text/css" href="/static/admin/css/admin.css" />
<link rel="SHORTCUT ICON" href="/static/favicon.ico" />
<script type="text/javascript" src="/static/js/jquery-1.3.2.min.js"></script>
</head>
@@ -24,6 +25,7 @@
</ul>
</div>
</div>
+ <!--
<div id="top-panel">
<div id="panel">
<ul>
@@ -34,6 +36,7 @@
</ul>
</div>
</div>
+ -->
<div id="wrapper">
<div id="content">{% block content %}{% endblock %}</div>
</div>
View
26 davidblog/templates/admin/entry_add.html
@@ -38,14 +38,24 @@
</script>
<div id="edit_entry">
<form action="/admin/entry/add/" method="POST">
- <p><input type="text" name="title" value="{{ f.title.value | notnull }}" />{{ f.title.note | notnull }}
- <label>标题</label></p>
- <p><input type="text" name="slug" value="{{ f.slug.value | notnull }}" />{{ f.slug.note | notnull }}
- <label>Slug</label></p>
- <p><input type="text" name="tags" />
- <label>标签</label></p>
- <p><textarea name="content" id="markItUp">{{ f.content.value | notnull }}</textarea>{{ f.content.note | notnull }}</p>
- <p><input type="submit" value="发表日志" /></p>
+ <table>
+ <tr>
+ <th><label>标题</label></th>
+ <td><input type="text" name="title" value="{{ f.title.value | notnull }}" /><span>{{ f.title.note | notnull }}</span></td>
+ </tr>
+ <tr>
+ <th><label>Slug</label></th>
+ <td><input type="text" name="slug" value="{{ f.slug.value | notnull }}" /><span>{{ f.slug.note | notnull }}</span></td>
+ </tr>
+ <tr>
+ <th><label>标签</label></th>
+ <td><input type="text" name="tags" /></td>
+ </tr>
+ <tr>
+ <td colspan="2"><textarea name="content" id="markItUp">{{ f.content.value | notnull }}</textarea><span>{{ f.content.note | notnull }}</span></td>
+ </tr>
+ </table>
+ <p><input type="submit" value="发表日志" /></p>
</form>
</div>
{% endblock %}
View
24 davidblog/templates/admin/entry_edit.html
@@ -38,13 +38,23 @@
</script>
<div id="entry_edit">
<form action="/admin/entry/edit/{{ entry.id }}/" method="POST" id="entry_form">
- <p><input type="text" name="title" value="{{ entry.title | notnull }}" />{{ f.title.note | notnull }}
- <label>标题</label></p>
- <p><input type="text" name="slug" value="{{ entry.slug | notnull }}" />{{ f.slug.note | notnull }}
- <label>Slug</label></p>
- <p><input type="text" name="tags" value="{{ entry.tagList }}" />
- <label>标签</label></p>
- <p><textarea name="content" id="markItUp">{{ entry.content | notnull }}</textarea>{{ f.content.note | notnull }}</p>
+ <table>
+ <tr>
+ <th><label>标题</label></th>
+ <td><input type="text" name="title" value="{{ f.title.value | notnull }}" /><span>{{ f.title.note | notnull }}</span></td>
+ </tr>
+ <tr>
+ <th><label>Slug</label></th>
+ <td><input type="text" name="slug" value="{{ f.slug.value | notnull }}" /><span>{{ f.slug.note | notnull }}</span></td>
+ </tr>
+ <tr>
+ <th><label>标签</label></th>
+ <td><input type="text" name="tags" value="{{ entry.tagList }}" /></td>
+ </tr>
+ <tr>
+ <td colspan="2"><textarea name="content" id="markItUp">{{ f.content.value | notnull }}</textarea><span>{{ f.content.note | notnull }}</span></td>
+ </tr>
+ </table>
<p><input type="submit" value="更新日志" /></p>
</form>
</div>
View
4 davidblog/templates/admin/entry_list.html
@@ -4,13 +4,13 @@
<table>
<tr>
<th>名称</th>
- <th>栏目</th>
+ <th>发表时间</th>
<th>操作</th>
</tr>
{% for one in entries %}
<tr>
<td>{{ one.title }}</td>
- <td>{{ one.categoryName }}</td>
+ <td>{{ one.created_time }}</td>
<td>
<a href="/admin/entry/edit/{{ one.id }}/">修改</a> |
<a href="/admin/entry/del/{{ one.id }}/">删除</a>

0 comments on commit 44f87d6

Please sign in to comment.