| 1 | <cfsetting enablecfoutputonly=true> |
|---|
| 2 | <cfprocessingdirective pageencoding="utf-8"> |
|---|
| 3 | <!--- |
|---|
| 4 | Name : /client/admin/entry_comments.cfm |
|---|
| 5 | Author : Dan G. Switzer, II |
|---|
| 6 | Created : 11/11/07 |
|---|
| 7 | ---> |
|---|
| 8 | |
|---|
| 9 | <!--- handle deletes ---> |
|---|
| 10 | <cfif structKeyExists(form, "mark")> |
|---|
| 11 | <cfloop index="u" list="#form.mark#"> |
|---|
| 12 | <cfset application.blog.deleteComment(u)> |
|---|
| 13 | </cfloop> |
|---|
| 14 | </cfif> |
|---|
| 15 | |
|---|
| 16 | <cfset sSortDir = "desc" /> |
|---|
| 17 | |
|---|
| 18 | <cfset comments = application.blog.getComments(id=url.id, sortdir=sSortDir)> |
|---|
| 19 | |
|---|
| 20 | <cfoutput> |
|---|
| 21 | <html> |
|---|
| 22 | <head> |
|---|
| 23 | <title>Entry Comments</title> |
|---|
| 24 | <link rel="stylesheet" type="text/css" href="#application.rooturl#/includes/admin.css" media="screen" /> |
|---|
| 25 | <style type="text/css"> |
|---|
| 26 | body { |
|---|
| 27 | background-image: none; |
|---|
| 28 | font-family: Arial; |
|---|
| 29 | } |
|---|
| 30 | </style> |
|---|
| 31 | |
|---|
| 32 | <script type="text/javascript"> |
|---|
| 33 | window.onload = adjustIframeSize; |
|---|
| 34 | |
|---|
| 35 | function adjustIframeSize(){ |
|---|
| 36 | var el = document.getElementById("commentsBody"); |
|---|
| 37 | |
|---|
| 38 | parent.document.getElementById("commentsFrame").style.height = el.offsetHeight + "px"; |
|---|
| 39 | } |
|---|
| 40 | </script> |
|---|
| 41 | </head> |
|---|
| 42 | <body id="commentsBody"> |
|---|
| 43 | <p> |
|---|
| 44 | This entry currently has |
|---|
| 45 | <cfif comments.recordCount gt 1> |
|---|
| 46 | #comments.recordcount# comments |
|---|
| 47 | <cfelseif comments.recordCount is 1> |
|---|
| 48 | 1 comment |
|---|
| 49 | <cfelse> |
|---|
| 50 | 0 comments |
|---|
| 51 | </cfif>. |
|---|
| 52 | </p> |
|---|
| 53 | </cfoutput> |
|---|
| 54 | |
|---|
| 55 | <cfmodule template="../tags/datatable.cfm" data="#comments#" editlink="comment.cfm" label="Comments" |
|---|
| 56 | linkcol="none" defaultsort="posted" defaultdir="#sSortDir#" showAdd="false" queryString="#cgi.query_string#"> |
|---|
| 57 | <cfmodule template="../tags/datacol.cfm" colname="name" label="Name" width="150" /> |
|---|
| 58 | <cfmodule template="../tags/datacol.cfm" colname="posted" label="Posted" format="datetime" width="150" /> |
|---|
| 59 | <cfmodule template="../tags/datacol.cfm" colname="comment" label="Comment" width="300"/> |
|---|
| 60 | <cfmodule template="../tags/datacol.cfm" label="View" data="<a href=""#application.rooturl#/admin/comment.cfm?id=$id$"" target=""_top"">View</a>" sort="false"/> |
|---|
| 61 | </cfmodule> |
|---|
| 62 | |
|---|
| 63 | <cfoutput> |
|---|
| 64 | </body> |
|---|
| 65 | </html> |
|---|
| 66 | </cfoutput> |
|---|
| 67 | |
|---|
| 68 | <cfsetting enablecfoutputonly=false> |
|---|