Anonymous avatar Anonymous committed 00f1e4d

add new item button for post, page, media

Comments (0)

Files changed (5)

resources/css/admin.css

 	border-radius:6px;
 }
 
+a.tablemenu{
+    margin:0 0 10px;
+}
+
 table{
 	width: 90%;
 	border-collapse:collapse;
 	text-align:left;
 }
 
-form input.submit{
-	width:70px;
+form input.submit, a.tablemenu{
+	width:auto;
 	background-color: #2A378C;
 	display: inline-block;
 	color: #fff;
 }
 
 
-form input.submit:hover{
+form input.submit:hover, a.tablemenu:hover{
 	cursor: pointer;
 	background-color: #20368B;
 }
 
-form input.submit:active{
+form input.submit:active, a.tablemenu:active{
 	background-color: #1E3480;
 	top:1px;
 }

templates/admin/medialist.html

 
 {% block content %}
 	<h3>Media</h3>
+    
+    <a class="tablemenu" href="/media/upload/">New Upload</a>
+    <div class="clear"></div>
 	<table>
 		<thead>
 			<tr>
 			</tr>
 		</thead>
 		<tbody>
-		{% if list.count > 0 %}
+		{% if list %}
 			{% for l in list %}
 				<tr>
 					<td><a href="{{ l.get_delete_url }}"><img src="/resources/img/small/trash.png" border="0" title="Delete"></a> | 

templates/admin/pagelist.html

 {% block content %}
 
 	<h3>Pages</h3>
+    <a class="tablemenu" href="/page/new/">New Page</a>
+    <div class="clear"></div>
+    
 	<table>
 		<thead>
 			<tr>
 			</tr>
 		</thead>
 		<tbody>
-		{% if pages.count > 0 %}
+		{% if pages %}
 			{% for p in pages %}
 				<tr>
 					<td><a href="{{ p.get_delete_url }}"><img src="/resources/img/small/trash.png" border="0" title="Delete"></a> |

templates/admin/postlist.html

 
 {% block content %}
 	<h3>Posts</h3>
+    
+    <a class="tablemenu" href="/post/new/">New Post</a>
+    <div class="clear"></div>
 	<table>
 		<thead>
 			<tr>
 			</tr>
 		</thead>
 		<tbody>
-		{% if posts.count > 0 %}
+		{% if posts %}
 			{% for p in posts %}
 				<tr>
 					<td><a href="{{ p.get_delete_url }}"><img src="/resources/img/small/trash.png" border="0" title="Delete"></a> |

templates/front/post.html

 		{% endautoescape %}
 	</p>
 	<div class="clear"  style="height:50"></div>
-
 	{% if discuss %}
 	<!-- Put Disquss Script Here. -->
 	{% endif %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.