fix for: if more than one mediatype attached to a comment, the medias are shown multi...
[mir.git] / templates / admin / commentlist.template
index c930b35..f271925 100755 (executable)
@@ -35,6 +35,9 @@
         <option value="title"<if searchfield=="title"> selected</if>>${lang("commentsearch.field.title")}</option>
         <option value="creator"<if searchfield=="creator"> selected</if>>${lang("commentsearch.field.creator")}</option>
         <option value="description"<if searchfield=="description"> selected</if>>${lang("commentsearch.field.description")}</option>
+        <option value="main_url"<if searchfield=="main_url"> selected</if>>${lang("commentsearch.field.main_url")}</option>
+        <option value="email"<if searchfield=="email"> selected</if>>${lang("commentsearch.field.email")}</option>
+        <option value="comment"<if searchfield=="comment"> selected</if>>${lang("commentsearch.field.comment")}</option>
       </select>
     </td>
     <td class="listrow2">
@@ -89,6 +92,9 @@
         ${lang("comment.article")} / ${lang("comment.title")} / ${lang("comment.creator")} / ${lang("comment.text")}
       </td>
       <td>
+        ${lang("comment.comment")}
+      </td>
+      <td>
         &nbsp;
       </td>
     </tr>
   <list comments as entry>
     <tr <if grey=="1"><assign grey="0">class="listrow1"<else><assign grey="1">class="listrow2"</if>>
       <td valign="top" class="small">
-        ${entry.creationdate.formatted["dd.MM.yyyy HH:mm"]}<br>
+        ${entry.creationdate.format(config["Mir.DefaultDateTimeFormat"])}<br>
         <if entry.is_published=="0"><b>${lang("commentlist.hidden")}</b><else>-</if><br>
         <br>
         ${lang("comment.status")}: <br>
             <div class="small">
             ${lang("comment.article")}:
             <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
-              ${utility.encodeHTML(entry.to_content.title)} (entry.to_content.id)
+              ${utility.encodeHTML(entry.to_content.title)} (${entry.to_content.id})
             </a>
               (${lang("articletypes."+entry.to_content.article_type.name)}) 
   
               <a href="${config.actionRoot}?module=Content&do=edit&id=${entry.to_content.id}">
               ${lang("edit")}
               </a> |
-              <a href="${entry.publicurl}">
-                ${lang("start.show")}
-              </a> |
               <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${entry.to_content.id}">
                 ${lang("commentlist.allcomments")}
               </a>
             </if>
   
         
-        <b>${entry.title}</b> &nbsp;
+        <b>${utility.encodeHTML(entry.title)}</b> (${entry.id})&nbsp;
         <if entry.creator>
-          ${lang("by")}: ${entry.creator}
+          ${lang("by")}: ${utility.encodeHTML(entry.creator)}
         </if>
         <br>
-        ${utility.encodeHTML(entry.description)}
+        ${utility.prettyEncodeHTML(utility.subString(entry.description, 0, config["Mir.Admin.ListTextLengthLimit"]))}
+
+        <br>
+          <if entry.to_all_media_images || entry.to_all_media_audio || entry.to_all_media_video || entry.to_all_media_other>
+               <call showCommentAttachment(entry, thisurl)></if>
+          </if>
+        <br>
         
-        <if entry.main_url><br>URL: ${entry.main_url}</if>
+        <if entry.main_url><br>URL: ${utility.encodeHTML(entry.main_url)}</if>
         <br>
-  <!--      <div class="bg-neutral small">-->
         <if config["Mir.Localizer.Admin.ListOperationsFlavor"]=="0">
           <list entry.operations as op>
             [ <a href="${config.actionRoot}?module=Localizer&do=commentoperation&operation=${op}&id=${entry.id}&returnurl=${utility.encodeURI(thisurl + "#" + entry.id)}">${lang("comment.operation."+op)}</a> ]
           </select>
         </if>
         <if entry.operations>&nbsp;|&nbsp;</if>
-        <a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>                
-  <!--      </div>-->
+        <a href="${config.actionRoot}?module=Comment&do=edit&id=${entry.id}">${lang("edit")}</a>
       </td>
         
       <td valign="top">
+        ${utility.prettyEncodeHTML(entry.comment)}
+      </td>    
+      <td valign="top">
         &nbsp;
         <if config["Mir.Localizer.Admin.AllowDeleteComment"]=="1">
-          <a class="small" href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}&searchtext=${utility.encodeHTML(searchtext)}&searchfield=${utility.encodeHTML(searchfield)}&searchispublished=${searchispublished}&searchorder=${searchorder}&offset=${offset}">[${lang("delete")}]</a>
+          <a class="small" href="${config.actionRoot}?module=Comment&do=delete&id=${entry.id}&okurl=${utility.encodeURI(thisurl)}&cancelurl=${utility.encodeURI(thisurl)}">[${lang("delete")}]</a>
         </if>
       </td>    
     </tr>
   </list>
         
     <tr>
-      <td colspan="3" class="table-foot">
+      <td colspan="4" class="table-foot">
         ${count} ${lang("records")} / ${lang("show_from_to", from, to)}
       </td>
     </tr>