diff options
| author | Starla Insigna <hatkirby@fourisland.com> | 2009-08-13 17:46:09 -0400 |
|---|---|---|
| committer | Starla Insigna <hatkirby@fourisland.com> | 2009-08-13 17:46:09 -0400 |
| commit | b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a (patch) | |
| tree | 0449277e94a42aa155995a90fd8a89cb3309e7ab /theme/admin/drafts.tpl | |
| parent | 6a1d5b60e6ec541a36727b84b71168f62221f7d7 (diff) | |
| download | fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.tar.gz fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.tar.bz2 fourisland-b5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a.zip | |
Rewrote Admin panel
The following database changes must be made: * A TEXT column called "text" must be added to the end of "polloftheweek" * The transferPollRss.php script must be run * The "pollrss" table must be dropped Closes #113
Diffstat (limited to 'theme/admin/drafts.tpl')
| -rw-r--r-- | theme/admin/drafts.tpl | 98 |
1 files changed, 98 insertions, 0 deletions
| diff --git a/theme/admin/drafts.tpl b/theme/admin/drafts.tpl new file mode 100644 index 0000000..17757ba --- /dev/null +++ b/theme/admin/drafts.tpl | |||
| @@ -0,0 +1,98 @@ | |||
| 1 | <h2>Manage Drafts</h2> | ||
| 2 | |||
| 3 | <div class="clear"></div> | ||
| 4 | |||
| 5 | <script type="text/javascript"> | ||
| 6 | function deletePost(id) | ||
| 7 | { | ||
| 8 | if (confirm("Are you sure you would like to delete this draft?")) | ||
| 9 | { | ||
| 10 | postwith("/admin/drafts.php?pageID=<!--PAGEID-->&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/ | ||
| 15 | function 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 | |||
| 30 | function 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 drafts?")) | ||
| 43 | { | ||
| 44 | postwith("/admin/drafts.php?pageID=<!--PAGEID-->&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 | <form action="javascript:alert('Not yet implemented');" method="get"> | ||
| 62 | <div id="manage-options"> | ||
| 63 | <div id="manage-bulk"> | ||
| 64 | <select name="bulk-type"> | ||
| 65 | <option value="delete">Delete</option> | ||
| 66 | </select> | ||
| 67 | |||
| 68 | <button id="bulk" type="button" onclick="bulkAction()">Bulk</button> | ||
| 69 | </div> | ||
| 70 | </div> | ||
| 71 | |||
| 72 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 73 | |||
| 74 | <table> | ||
| 75 | <tr class="table-header"> | ||
| 76 | <td class="table-checkbox"><input type="checkbox" id="all-check" /></td> | ||
| 77 | <td>Post Name</td> | ||
| 78 | <td>Author</td> | ||
| 79 | <td colspan="3">Actions</td> | ||
| 80 | </tr> | ||
| 81 | <!--BEGIN POST--> | ||
| 82 | <tr<!--POST.ODD-->> | ||
| 83 | <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--POST.ID-->" /></td> | ||
| 84 | <td><!--POST.TITLE--></td> | ||
| 85 | <td class="table-author"><!--POST.AUTHOR--></td> | ||
| 86 | <td class="table-img"><a href="/admin/editPost.php?type=drafts&id=<!--POST.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td> | ||
| 87 | <td class="table-img"><a href="#" onclick="deletePost(<!--POST.ID-->);"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td> | ||
| 88 | <td class="table-img"><a href="/viewPost.php?type=drafts&id=<!--POST.ID-->"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td> | ||
| 89 | </tr> | ||
| 90 | <!--END POST--> | ||
| 91 | </table> | ||
| 92 | |||
| 93 | <div class="manage-pagination"><!--PAGINATION--></div> | ||
| 94 | </form> | ||
| 95 | <!--END AVAIL--> | ||
| 96 | <!--BEGIN NOTAVAIL--> | ||
| 97 | <div class="manage-pagination">There are no drafts.</div> | ||
| 98 | <!--END NOTAVAIL--> | ||
