summary refs log tree commit diff stats
path: root/theme/admin/quotes.tpl
diff options
context:
space:
mode:
authorStarla Insigna <hatkirby@fourisland.com>2009-08-13 17:46:09 -0400
committerStarla Insigna <hatkirby@fourisland.com>2009-08-13 17:46:09 -0400
commitb5736e3ad3830fa732dcbd1a518ec3dd6ea7b98a (patch)
tree0449277e94a42aa155995a90fd8a89cb3309e7ab /theme/admin/quotes.tpl
parent6a1d5b60e6ec541a36727b84b71168f62221f7d7 (diff)
downloadfourisland-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/quotes.tpl')
-rw-r--r--theme/admin/quotes.tpl94
1 files changed, 94 insertions, 0 deletions
diff --git a/theme/admin/quotes.tpl b/theme/admin/quotes.tpl new file mode 100644 index 0000000..6da9dbb --- /dev/null +++ b/theme/admin/quotes.tpl
@@ -0,0 +1,94 @@
1<h2><!--TITLE--></h2>
2
3<div class="clear"></div>
4
5<script type="text/javascript">
6function deleteQuote(id)
7{
8 if (confirm("Are you sure you would like to delete this quote?"))
9 {
10 postwith("/admin/quotes.php?<!--FLAGGED-->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 quotes?"))
43 {
44 postwith("/admin/quotes.php?<!--FLAGGED-->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>Quote</td>
77 <td colspan="3">Actions</td>
78 </tr>
79 <!--BEGIN QUOTE-->
80 <tr<!--QUOTE.ODD-->>
81 <td class="table-checkbox"><input class="the-check" type="checkbox" name="bulk" value="<!--QUOTE.ID-->" /></td>
82 <td>#<!--QUOTE.ID-->: <!--QUOTE.EXCERPT--></td>
83 <td class="table-img"><a href="/admin/editQuote.php?id=<!--QUOTE.ID-->"><img src="/theme/images/icons/page_edit.png" alt="Edit" /></a></td>
84 <td class="table-img"><a href="#" onclick="deleteQuote(<!--QUOTE.ID-->)"><img src="/theme/images/icons/page_delete.png" alt="Delete" /></a></td>
85 <td class="table-img"><a href="/quotes/<!--QUOTE.ID-->.php"><img src="/theme/images/icons/page_go.png" alt="View" /></a></td>
86 </tr>
87 <!--END QUOTE-->
88</table>
89
90<div class="manage-pagination"><!--PAGINATION--></div>
91<!--END AVAIL-->
92<!--BEGIN NOTAVAIL-->
93<div class="manage-pagination">There are no quotes.</div>
94<!--END NOTAVAIL-->