summary refs log tree commit diff stats
path: root/theme/admin/pending.tpl
diff options
context:
space:
mode:
Diffstat (limited to 'theme/admin/pending.tpl')
-rw-r--r--theme/admin/pending.tpl108
1 files changed, 108 insertions, 0 deletions
diff --git a/theme/admin/pending.tpl b/theme/admin/pending.tpl new file mode 100644 index 0000000..8ead332 --- /dev/null +++ b/theme/admin/pending.tpl
@@ -0,0 +1,108 @@
1<h2>Manage Pending</h2>
2
3<div class="clear"></div>
4
5<script type="text/javascript">
6function deletePost(id)
7{
8 if (confirm("Are you sure you would like to delete this pending post?"))
9 {
10 postwith("/admin/pending.php?pageID=<!--PAGEID-->&amp;action=delete",{id:id});
11 }
12}
13
14// following function taken from http://mentaljetsam.wordpress.com/2008/06/02/using-javascript-to-post-data-between-pages/
15function postwith (to,p) {
16 var myForm = document.createElement("form");
17 myForm.method="post" ;
18 myForm.action = to ;
19 for (var k in p) {
20 var myInput = document.createElement("input") ;
21 myInput.setAttribute("name", k) ;
22 myInput.setAttribute("value", p[k]);
23 myForm.appendChild(myInput) ;
24 }
25 document.body.appendChild(myForm) ;
26 myForm.submit() ;
27 document.body.removeChild(myForm) ;
28}
29
30function bulkAction()
31{
32 var bulk=new Array();
33 $(".the-check:checked").each(function() {
34 bulk.push($(this).val());
35 });
36 var ids = bulk.join(",")
37
38 if (ids != "")
39 {
40 if ($('#manage-bulk select').val() == "delete")
41 {
42 if (confirm("Are you sure you would like to delete the selected posts?"))
43 {
44 postwith("/admin/pending.php?pageID=<!--PAGEID-->&amp;action=deletes",{ids:ids});
45 }
46 }
47 }
48}
49
50$(document).ready(function() {
51 $("input#all-check").click(function() {
52 var what = this.checked;
53 $("input.the-check").each(function() {
54 this.checked = what;
55 });
56 });
57});
58</script>
59
60<!--BEGIN AVAIL-->
61<div id="manage-options">
62 <div id="manage-bulk">
63 <select name="bulk-type">
64 <option value="delete">Delete</option>
65 </select>
66
67 <button id="bulk" type="button" onclick="bulkAction()">Bulk</button>
68 </div>
69</div>
70
71<div class="manage-pagination"><!--PAGINATION--></div>
72
73<table>
74 <tr class="table-header">
75 <td class="table-checkbox"><input type="checkbox" id="all-check" /></td>
76 <td>Post Name</td>
77 <td>Author</td>
78 <td colspan="5">Actions</td>
79 </tr>
80 <!--BEGIN POST-->
81 <tr<!--POST.ODD-->>
82 <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td>
83 <td><!--POST.TITLE--></td>
84 <td class="table-author"><!--POST.AUTHOR--></td>
85 <!--BEGIN POST.CANMOVEUP-->
86 <td class="table-img"><a href="/admin/pending.php?pageID=<!--PAGEID-->&amp;action=moveup&amp;id=<!--POST.ID-->"><img src="/theme/images/icons/thumb_up.png" alt="Move Up" /></a></td>
87 <!--END POST.CANMOVEUP-->
88 <!--BEGIN POST.NOMOVEUP-->
89 <td class="table-img"><img src="/theme/images/icons/thumb_up.png" alt="Move Up" style="opacity: 0.2" /></td>
90 <!--END POST.NOMOVEUP-->
91 <!--BEGIN POST.CANMOVEDOWN-->
92 <td class="table-img"><a href="/admin/pending.php?pageID=<!--PAGEID-->&amp;action=movedown&amp;id=<!--POST.ID-->"><img src="/theme/images/icons/thumb_down.png" alt="Move Down" /></a></td>
93 <!--END POST.CANMOVEDOWN-->
94 <!--BEGIN POST.NOMOVEDOWN-->
95 <td class="table-img"><img src="/theme/images/icons/thumb_down.png" alt="Move Down" style="opacity: 0.2" /></td>
96 <!--END POST.NOMOVEDOWN-->
97 <td class="table-img"><a href="/admin/editPost.php?type=pending&amp;id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td>
98 <td class="table-img"><a href="#" onclick="deletePost(<!--POST.ID-->);"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td>
99 <td class="table-img"><a href="/viewPost.php?type=pending&amp;id=<!--POST.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td>
100 </tr>
101 <!--END POST-->
102</table>
103
104<div class="manage-pagination"><!--PAGINATION--></div>
105<!--END AVAIL-->
106<!--BEGIN NOTAVAIL-->
107<div class="manage-pagination">There are no pending posts in the queue.</div>
108<!--END NOTAVAIL-->