full support for comment status in admin
authorzapata <zapata>
Fri, 13 Dec 2002 20:59:41 +0000 (20:59 +0000)
committerzapata <zapata>
Fri, 13 Dec 2002 20:59:41 +0000 (20:59 +0000)
22 files changed:
bundles/admin_ay.properties
bundles/admin_de.properties
bundles/admin_en.properties
bundles/admin_es.properties
bundles/admin_gn.properties
bundles/admin_qu.properties
bundles/admin_tr.properties
dbscripts/help_comment_status.sql [new file with mode: 0755]
source/mir/entity/adapter/EntityAdapter.java
source/mir/storage/StorageObject.java
source/mircoders/localizer/basic/MirBasicDataModelLocalizer.java
source/mircoders/localizer/basic/MirBasicProducerAssistantLocalizer.java
source/mircoders/servlet/ServletModuleComment.java
source/mircoders/servlet/ServletModuleContent.java
source/mircoders/servlet/ServletModuleLocalizer.java
source/mircoders/storage/DatabaseArticleType.java
source/mircoders/storage/DatabaseCommentStatus.java
source/mircoders/storage/DatabaseLanguage.java
templates/admin/comment.template
templates/admin/commentlist.template
templates/admin/content.template
templates/admin/contentlist.template

index eb65ffe..e2044e9 100755 (executable)
@@ -84,6 +84,8 @@ comment.email=email
 comment.url=url\r
 comment.creator=autor\r
 comment.article=del artículo\r
+comment.html=HTML?
+comment.status=Status # needs translation 
 \r
 commentlist.htmltitle=lista de comentarios\r
 commentlist.published=publicado\r
index fa49b73..cb0e71e 100755 (executable)
@@ -1,6 +1,6 @@
 ########## admin ##########
 # language: deutsch / german
-# $Id: admin_de.properties,v 1.19 2002/12/13 18:00:23 zapata Exp $
+# $Id: admin_de.properties,v 1.20 2002/12/13 21:00:03 zapata Exp $
 
 # general
 yes=ja
@@ -91,6 +91,9 @@ comment.email=Email
 comment.url=Url
 comment.creator=Uhrheber
 comment.article=zu artikel
+comment.html=HTML?
+comment.status=Status # needs translation 
+comment.language=Sprache
 
 commentlist.htmltitle=commentlist
 commentlist.published=publiziert
index 45f8fff..4f1fd47 100755 (executable)
@@ -1,6 +1,6 @@
 ########## admin ##########
 # language: english
-# $Id: admin_en.properties,v 1.27 2002/12/13 18:00:23 zapata Exp $
+# $Id: admin_en.properties,v 1.28 2002/12/13 21:00:03 zapata Exp $
 
 # general
 yes=yes
@@ -84,17 +84,20 @@ breaking.date=date
 breakinglist.htmltitle=Breaking news overview
 
 # comment
-comment.htmltitle=comment
-comment.date=date
-comment.title=title
-comment.published=published
-comment.text=comment text
-comment.address=address
-comment.phone=phone
-comment.email=email
-comment.url=url
-comment.creator=author
-comment.article=for article
+comment.htmltitle=Comment
+comment.date=Date
+comment.title=Title
+comment.published=Published
+comment.text=Comment text
+comment.address=Address
+comment.phone=Phone
+comment.email=Email
+comment.url=Url
+comment.creator=Author
+comment.article=For article
+comment.html=HTML?
+comment.status=Status 
+comment.language=Language
 
 commentlist.htmltitle=Comments
 commentlist.published=published
index 1add7ab..6feb736 100755 (executable)
@@ -1,6 +1,6 @@
 ########## admin ##########
 # language: espanol / spanish
-# $Id: admin_es.properties,v 1.11 2002/12/13 18:00:23 zapata Exp $
+# $Id: admin_es.properties,v 1.12 2002/12/13 21:00:03 zapata Exp $
 
 # general
 yes=sí
@@ -88,6 +88,9 @@ comment.email=email
 comment.url=url
 comment.creator=autor
 comment.article=del artículo
+comment.html=es HTML?
+comment.status=Status # needs translation 
+comment.language=Lengua
 
 commentlist.htmltitle=lista de comentarios
 commentlist.published=publicado
index 4f87cbd..8f79b5e 100755 (executable)
@@ -85,6 +85,9 @@ comment.email=email
 comment.url=url
 comment.creator=autor
 comment.article=del artículo
+comment.html=es HTML?
+comment.status=Status # needs translation 
+comment.language=Lengua
 
 commentlist.htmltitle=lista de comentarios
 commentlist.published=publicado
index 9c9fc9c..939e6a1 100755 (executable)
@@ -85,6 +85,9 @@ comment.email=email
 comment.url=url
 comment.creator=autor
 comment.article=del artículo
+comment.html=es HTML?
+comment.status=Status # needs translation 
+comment.language=Lengua
 
 commentlist.htmltitle=lista de comentarios
 commentlist.published=publicado
index 547a68e..6a2886f 100755 (executable)
Binary files a/bundles/admin_tr.properties and b/bundles/admin_tr.properties differ
diff --git a/dbscripts/help_comment_status.sql b/dbscripts/help_comment_status.sql
new file mode 100755 (executable)
index 0000000..30efc67
--- /dev/null
@@ -0,0 +1,2 @@
+INSERT INTO "comment_status" ("id", "name") 
+VALUES (1,'normal');
index e5ad90e..ba2dca1 100755 (executable)
@@ -99,7 +99,7 @@ public class EntityAdapter implements Map {
   }
 
   public boolean isEmpty() {
-    throw new UnsupportedOperationException("EntityAdapter.isEmpty()");
+    return false;
   }
 
   public Set keySet() {
index 32ea774..b5752e4 100755 (executable)
-/*
- * Copyright (C) 2001, 2002  The Mir-coders group
- *
- * This file is part of Mir.
- *
- * Mir is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Mir is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Mir; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with the com.oreilly.servlet library, any library
- * licensed under the Apache Software License, The Sun (tm) Java Advanced
- * Imaging library (JAI), The Sun JIMI library (or with modified versions of
- * the above that use the same license as the above), and distribute linked
- * combinations including the two.  You must obey the GNU General Public
- * License in all respects for all of the code used other than the above
- * mentioned libraries.  If you modify this file, you may extend this exception
- * to your version of the file, but you are not obligated to do so.  If you do
- * not wish to do so, delete this exception statement from your version.
- */
-/*
- * Implementiert Interface für die Speicherschicht.
- * Bislang gibt es in der Bibliothek nur die Möglichkeit
- * in einer Datenbank zu speichern.
- */
-
-package mir.storage;
-
-import java.lang.*;
-import java.util.*;
-import java.sql.*;
-import freemarker.template.*;
-import mir.entity.*;
-
-
-/**
- * Implementiert Interface für die Speicherschicht.
- * Bislang gibt es in der Bibliothek nur die Möglichkeit
- * in einer Datenbank zu speichern.
- * @author RK
- * @version    29.6.1999
- */
-public interface StorageObject {
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param id
-        * @return Entity
-        * @exception StorageObjectException
-        */
-       abstract public Entity selectById (String id) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param aField
-        * @param aValue
-        * @return EntityList
-        * @exception StorageObjectException
-        */
-       abstract public EntityList selectByFieldValue (String aField, String aValue) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param whereClause
-        * @return EntityList
-        * @exception StorageObjectException
-        */
-       abstract public EntityList selectByWhereClause (String whereClause) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param whereClause
-        * @param offset
-        * @return EntityList
-        * @exception StorageObjectException
-        */
-       abstract public EntityList selectByWhereClause (String whereClause, int offset) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param whereClause
-        * @param orderBy
-        * @param offset
-        * @return EntityList
-        * @exception StorageObjectException
-        */
-       abstract public EntityList selectByWhereClause (String whereClause, String orderBy,
-                       int offset) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param whereClause
-        * @param orderBy
-        * @param offset
-        * @param limit
-        * @return EntityList
-        * @exception StorageObjectException
-        */
-       abstract public EntityList selectByWhereClause (String whereClause, String orderBy,
-                       int offset, int limit) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param id
-        * @return boolen
-        * @exception StorageObjectException
-        */
-       abstract public boolean delete (String id) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return ArrayList
-        * @exception StorageObjectException
-        */
-       abstract public ArrayList getFields () throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return int[]
-        * @exception StorageObjectException
-        */
-       abstract public int[] getTypes () throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return ArrayList
-        * @exception StorageObjectException
-        */
-       abstract public ArrayList getLabels () throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param a
-        * @exception StorageObjectException
-        */
-       abstract public void update (Entity a) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param a
-        * @return String id
-        * @exception StorageObjectException
-        */
-       abstract public String insert (Entity a) throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return Class Klasse der Entity
-        */
-               abstract public Class getEntityClass();
-
-
-
-       /**
-        * put your documentation comment here
-        * @return
-        */
-               abstract public String getIdName();
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return String
-        */
-               abstract public String getTableName();
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return SimpleHash
-        */
-               abstract public SimpleHash getHashData();
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return Connection
-        * @exception StorageObjectException
-        */
-       abstract public Connection getPooledCon () throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param a
-        * @param sql
-        * @return ResultSet
-        * @exception StorageObjectException, SQLException
-        */
-       abstract public ResultSet executeSql (Statement a, String sql) throws StorageObjectException,
-                       SQLException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @param con
-        * @param stmt
-        */
-               abstract public void freeConnection(Connection con,  Statement stmt)
-            throws StorageObjectException;
-
-
-
-       /**
-        * Dokumentation siehe Database.java
-        * @return
-        */
-       abstract public SimpleList getPopupData () throws StorageObjectException;
-
-       abstract public int executeUpdate(Statement a, String sql) throws StorageObjectException, SQLException ;
-       abstract public int executeUpdate(String sql) throws StorageObjectException, SQLException ;
-       abstract public int getSize(String where) throws SQLException,StorageObjectException;
-
-}
-
-
-
+/*\r
+ * Copyright (C) 2001, 2002  The Mir-coders group\r
+ *\r
+ * This file is part of Mir.\r
+ *\r
+ * Mir is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Mir is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with Mir; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ *\r
+ * In addition, as a special exception, The Mir-coders gives permission to link\r
+ * the code of this program with the com.oreilly.servlet library, any library\r
+ * licensed under the Apache Software License, The Sun (tm) Java Advanced\r
+ * Imaging library (JAI), The Sun JIMI library (or with modified versions of\r
+ * the above that use the same license as the above), and distribute linked\r
+ * combinations including the two.  You must obey the GNU General Public\r
+ * License in all respects for all of the code used other than the above\r
+ * mentioned libraries.  If you modify this file, you may extend this exception\r
+ * to your version of the file, but you are not obligated to do so.  If you do\r
+ * not wish to do so, delete this exception statement from your version.\r
+ */\r
+/*\r
+ * Implementiert Interface für die Speicherschicht.\r
+ * Bislang gibt es in der Bibliothek nur die Möglichkeit\r
+ * in einer Datenbank zu speichern.\r
+ */\r
+\r
+package mir.storage;\r
+\r
+import java.lang.*;\r
+import java.util.*;\r
+import java.sql.*;\r
+import freemarker.template.*;\r
+import mir.entity.*;\r
+\r
+\r
+/**\r
+ * Implementiert Interface für die Speicherschicht.\r
+ * Bislang gibt es in der Bibliothek nur die Möglichkeit\r
+ * in einer Datenbank zu speichern.\r
+ * @author RK\r
+ * @version    29.6.1999\r
+ */\r
+public interface StorageObject {\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param id\r
+   * @return Entity\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public Entity selectById(String id) throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param aField\r
+   * @param aValue\r
+   * @return EntityList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public EntityList selectByFieldValue(String aField, String aValue) throws\r
+      StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param whereClause\r
+   * @return EntityList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public EntityList selectByWhereClause(String whereClause) throws\r
+      StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param whereClause\r
+   * @param offset\r
+   * @return EntityList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public EntityList selectByWhereClause(String whereClause, int offset) throws\r
+      StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param whereClause\r
+   * @param orderBy\r
+   * @param offset\r
+   * @return EntityList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public EntityList selectByWhereClause(String whereClause,\r
+                                                 String orderBy,\r
+                                                 int offset) throws\r
+      StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param whereClause\r
+   * @param orderBy\r
+   * @param offset\r
+   * @param limit\r
+   * @return EntityList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public EntityList selectByWhereClause(String whereClause,\r
+                                                 String orderBy,\r
+                                                 int offset, int limit) throws\r
+      StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param id\r
+   * @return boolen\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public boolean delete(String id) throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return ArrayList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public ArrayList getFields() throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return int[]\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public int[] getTypes() throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return ArrayList\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public ArrayList getLabels() throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param a\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public void update(Entity a) throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param a\r
+   * @return String id\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public String insert(Entity a) throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return Class Klasse der Entity\r
+   */\r
+  abstract public Class getEntityClass();\r
+\r
+  /**\r
+   * put your documentation comment here\r
+   * @return\r
+   */\r
+  abstract public String getIdName();\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return String\r
+   */\r
+  abstract public String getTableName();\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return SimpleHash\r
+   */\r
+  abstract public SimpleHash getHashData();\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return Connection\r
+   * @exception StorageObjectException\r
+   */\r
+  abstract public Connection getPooledCon() throws StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param a\r
+   * @param sql\r
+   * @return ResultSet\r
+   * @exception StorageObjectException, SQLException\r
+   */\r
+  abstract public ResultSet executeSql(Statement a, String sql) throws\r
+      StorageObjectException,\r
+      SQLException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @param con\r
+   * @param stmt\r
+   */\r
+  abstract public void freeConnection(Connection con, Statement stmt) throws\r
+      StorageObjectException;\r
+\r
+  /**\r
+   * Dokumentation siehe Database.java\r
+   * @return\r
+   */\r
+  abstract public SimpleList getPopupData() throws StorageObjectException;\r
+\r
+  abstract public int executeUpdate(Statement a, String sql) throws\r
+      StorageObjectException, SQLException;\r
+\r
+  abstract public int executeUpdate(String sql) throws StorageObjectException,\r
+      SQLException;\r
+\r
+  abstract public int getSize(String where) throws SQLException,\r
+      StorageObjectException;\r
+}\r
+\r
+\r
+\r
index 8beca89..ad90902 100755 (executable)
@@ -90,6 +90,7 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer {
     try {\r
       anEntityAdapterDefinition.addDBDateField("creationdate", "webdb_create");\r
       anEntityAdapterDefinition.addCalculatedField("to_content", new CommentToContentField());\r
+      anEntityAdapterDefinition.addCalculatedField("status", new CommentToStatusField());\r
 \r
       anEntityAdapterDefinition.addCalculatedField("description_parsed", new FilteredField("description"));\r
       anEntityAdapterDefinition.addCalculatedField("operations",\r
@@ -115,6 +116,7 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer {
       result.addMapping( "comment", DatabaseComment.getInstance(), definition);\r
 \r
       result.addMapping( "articleType", DatabaseArticleType.getInstance(), new EntityAdapterDefinition());\r
+      result.addMapping( "commentStatus", DatabaseCommentStatus.getInstance(), new EntityAdapterDefinition());\r
 \r
       definition = new EntityAdapterDefinition();\r
       definition.addDBDateField("creationdate", "webdb_create");\r
@@ -156,6 +158,20 @@ public class MirBasicDataModelLocalizer implements MirDataModelLocalizer {
     }\r
   }\r
 \r
+  protected class CommentToStatusField implements EntityAdapterDefinition.CalculatedField {\r
+    public Object getValue(EntityAdapter anEntityAdapter) {\r
+      try {\r
+        return anEntityAdapter.getToOneRelation(\r
+                    "id="+anEntityAdapter.get("to_comment_status"),\r
+                    "id",\r
+                    "commentStatus" );\r
+      }\r
+      catch (Throwable t) {\r
+        throw new RuntimeException(t.getMessage());\r
+      }\r
+    }\r
+  }\r
+\r
   protected class EntityToSimpleOperationsField implements EntityAdapterDefinition.CalculatedField {\r
     private List operations;\r
 \r
index 617e848..0c18122 100755 (executable)
@@ -119,10 +119,25 @@ public class MirBasicProducerAssistantLocalizer implements MirProducerAssistantL
       }
     }
     catch (Throwable t) {
-      logger.printError("initializeGenerationValueSet: Exception "+t.getMessage());
+      logger.printError("initializeGenerationValueSet: Exception while collecting article types "+t.getMessage());
     }
-
     aValueSet.put("articletype", articleTypeMap);
+
+    Map commentStatusMap = new HashMap();
+    try {
+      i = new EntityIteratorAdapter( "", "", 20, MirGlobal.localizer().dataModel().adapterModel(), "commentStatus"  );
+
+      while (i.hasNext()) {
+        EntityAdapter commentStatus = (EntityAdapter) i.next();
+
+        commentStatusMap.put(commentStatus.get("name"), commentStatus.get("id"));
+      }
+    }
+    catch (Throwable t) {
+      logger.printError("initializeGenerationValueSet: Exception while collecting comment statuses"+t.getMessage());
+    }
+    aValueSet.put("commentstatus", articleTypeMap);
+
   };
 
   public String filterText(String aText) {
index a94e49e..c2040c2 100755 (executable)
@@ -91,12 +91,40 @@ public class ServletModuleComment extends ServletModule
     }
   }
 
+  public void edit(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException
+  {
+    String idParam = req.getParameter("id");
+
+    if (idParam == null)
+      throw new ServletModuleException("Invalid call: id not supplied ");
+
+    showComment(idParam, req, res);
+  }
+
+  public void showComment(String anId, HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleException {
+    try {
+      SimpleHash extraInfo = new SimpleHash();
+      TemplateModelRoot data;
+
+      data = (TemplateModelRoot) mainModule.getById(anId);
+
+      extraInfo.put("languages", DatabaseLanguage.getInstance().getPopupData());
+      extraInfo.put("comment_status_values", DatabaseCommentStatus.getInstance().getPopupData());
+
+      deliver(aRequest, aResponse, data, extraInfo, templateObjektString);
+    }
+    catch (Exception e) {
+      throw new ServletModuleException(e.toString());
+    }
+  }
+
+
   public void list(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleException
   {
     HTTPRequestParser requestParser = new HTTPRequestParser(aRequest);
 
     String where = requestParser.getParameter("where");
-    String order = requestParser.getParameter("order");
+    String order = requestParser.getParameterWithDefault("order", "webdb_create desc");
     int offset = requestParser.getIntegerWithDefault("offset", 0);
 
     returnCommentList(aRequest, aResponse, where, order, offset);
index 4843d3c..fda22ad 100755 (executable)
@@ -62,7 +62,7 @@ import mircoders.localizer.*;
  *  ServletModuleContent -
  *  deliver html for the article admin form.
  *
- * @version $Id: ServletModuleContent.java,v 1.27 2002/12/13 17:57:31 zapata Exp $
+ * @version $Id: ServletModuleContent.java,v 1.28 2002/12/13 20:59:42 zapata Exp $
  * @author rk, mir-coders
  *
  */
@@ -250,7 +250,7 @@ public class ServletModuleContent extends ServletModule
   public void edit(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException
   {
     String        idParam = req.getParameter("id");
-    if (idParam == null) throw new ServletModuleException("Falscher Aufruf: (id) nicht angegeben");
+    if (idParam == null) throw new ServletModuleException("Invalid call: id not supplied ");
     _showObject(idParam, req, res);
   }
 
@@ -368,9 +368,11 @@ public class ServletModuleContent extends ServletModule
     SimpleHash extraInfo = new SimpleHash();
     try {
       TemplateModelRoot entContent;
+
       if (id != null) {
         entContent = (TemplateModelRoot)mainModule.getById(id);
-      } else {
+      }
+      else {
         SimpleHash withValues = new SimpleHash();
         withValues.put("new", "1");
         withValues.put("is_published", "0");
@@ -382,20 +384,8 @@ public class ServletModuleContent extends ServletModule
       }
 
       extraInfo.put("themenPopupData", themenModule.getTopicsAsSimpleList());
-      try {
-        extraInfo.put("articletypePopupData", DatabaseArticleType.getInstance().getPopupData());
-      }
-      catch (Exception e) {
-        logger.error("articletype could not be fetched.");
-      }
-      try {
-        extraInfo.put("languagePopupData", DatabaseLanguage.getInstance().getPopupData());
-      }
-      catch (Exception e) {
-        logger.error("language-popup could not be fetched.");
-      }
-
-      extraInfo.put("schwerpunktPopupData", schwerpunktModule.getSchwerpunktAsSimpleList());
+      extraInfo.put("articletypePopupData", DatabaseArticleType.getInstance().getPopupData());
+      extraInfo.put("languagePopupData", DatabaseLanguage.getInstance().getPopupData());
 
       // code to be able to return to the list:
       String offsetParam, whereParam, orderParam;
index 6977bdf..c1b7d69 100755 (executable)
@@ -117,5 +117,30 @@ public class ServletModuleLocalizer extends ServletModule {
     }
   }
 
+  public void batchedarticleoperation(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleException {
+    String articleIdString = aRequest.getParameter("articleid");
+    String operationString = aRequest.getParameter("operation");
+    String returnUrlString = aRequest.getParameter("returnurl");
+
+    MirAdminInterfaceLocalizer.MirSimpleEntityOperation operation;
+    EntityAdapter article;
+    EntityContent entity;
+
+    try {
+      entity = (EntityContent) contentModule.getById(articleIdString);
+
+      if (entity!=null) {
+        article = MirGlobal.localizer().dataModel().adapterModel().makeEntityAdapter("content", entity);
+        operation = MirGlobal.localizer().adminInterface().simpleArticleOperationForName(operationString);
+        operation.perform(article);
+      }
+
+      redirect(aResponse, returnUrlString);
+    }
+    catch (Throwable e) {
+      e.printStackTrace(System.out);
+      throw new ServletModuleException(e.getMessage());
+    }
+  }
 
 }
\ No newline at end of file
index 81f621f..e17770b 100755 (executable)
@@ -1,84 +1,83 @@
-/*
- * Copyright (C) 2001, 2002  The Mir-coders group
- *
- * This file is part of Mir.
- *
- * Mir is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Mir is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Mir; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with the com.oreilly.servlet library, any library
- * licensed under the Apache Software License, The Sun (tm) Java Advanced
- * Imaging library (JAI), The Sun JIMI library (or with modified versions of
- * the above that use the same license as the above), and distribute linked
- * combinations including the two.  You must obey the GNU General Public
- * License in all respects for all of the code used other than the above
- * mentioned libraries.  If you modify this file, you may extend this exception
- * to your version of the file, but you are not obligated to do so.  If you do
- * not wish to do so, delete this exception statement from your version.
- */
-
-package mircoders.storage;
-
-/**
- * Title:
- * Description:
- * Copyright:    Copyright (c) 2001
- * Company:      Indymedia
- * @author
- * @version 1.0
- */
-
-import java.lang.*;
-import java.sql.*;
-import java.io.*;
-import java.util.*;
-
-import freemarker.template.*;
-
-import mir.storage.*;
-import mir.entity.*;
-import mir.misc.*;
-
-
-public class DatabaseArticleType extends Database implements StorageObject{
-
-       private static DatabaseArticleType instance;
-       private static SimpleList articletypePopupData;
-
-       // the following *has* to be sychronized cause this static method
-       // could get preemted and we could end up with 2 instances of DatabaseFoo..
-       // see the "Singletons with needles and thread" article at JavaWorld -mh
-       public synchronized static DatabaseArticleType getInstance() 
-         throws StorageObjectException
-       {
-               if (instance == null) {
-                       instance = new DatabaseArticleType();
-                       instance.myselfDatabase = instance;
-               }
-               return instance;
-       }
-
-       private DatabaseArticleType() throws StorageObjectException
-       {
-               super();
-               this.hasTimestamp = false;
-               this.theTable="article_type";
-       }
-
-       public SimpleList getPopupData()
-        throws StorageObjectException { return getPopupData("name",false); }
-
-
-}
+/*\r
+ * Copyright (C) 2001, 2002  The Mir-coders group\r
+ *\r
+ * This file is part of Mir.\r
+ *\r
+ * Mir is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Mir is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with Mir; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ *\r
+ * In addition, as a special exception, The Mir-coders gives permission to link\r
+ * the code of this program with the com.oreilly.servlet library, any library\r
+ * licensed under the Apache Software License, The Sun (tm) Java Advanced\r
+ * Imaging library (JAI), The Sun JIMI library (or with modified versions of\r
+ * the above that use the same license as the above), and distribute linked\r
+ * combinations including the two.  You must obey the GNU General Public\r
+ * License in all respects for all of the code used other than the above\r
+ * mentioned libraries.  If you modify this file, you may extend this exception\r
+ * to your version of the file, but you are not obligated to do so.  If you do\r
+ * not wish to do so, delete this exception statement from your version.\r
+ */\r
+\r
+package mircoders.storage;\r
+\r
+/**\r
+ * Title:\r
+ * Description:\r
+ * Copyright:    Copyright (c) 2001\r
+ * Company:      Indymedia\r
+ * @author\r
+ * @version 1.0\r
+ */\r
+\r
+import java.lang.*;\r
+import java.sql.*;\r
+import java.io.*;\r
+import java.util.*;\r
+\r
+import freemarker.template.*;\r
+\r
+import mir.storage.*;\r
+import mir.entity.*;\r
+import mir.misc.*;\r
+\r
+\r
+public class DatabaseArticleType extends Database implements StorageObject{\r
+\r
+  private static DatabaseArticleType instance;\r
+  private static SimpleList articletypePopupData;\r
+\r
+  // the following *has* to be sychronized cause this static method\r
+  // could get preemted and we could end up with 2 instances of DatabaseFoo..\r
+  // see the "Singletons with needles and thread" article at JavaWorld -mh\r
+  public synchronized static DatabaseArticleType getInstance() throws\r
+      StorageObjectException {\r
+    if (instance == null) {\r
+      instance = new DatabaseArticleType();\r
+      instance.myselfDatabase = instance;\r
+    }\r
+    return instance;\r
+  }\r
+\r
+  private DatabaseArticleType() throws StorageObjectException {\r
+    super();\r
+    this.hasTimestamp = false;\r
+    this.theTable = "article_type";\r
+  }\r
+\r
+  public SimpleList getPopupData() throws StorageObjectException {\r
+    return getPopupData("name", false);\r
+  }\r
+\r
+\r
+}\r
index 86588d3..3575521 100755 (executable)
@@ -74,4 +74,8 @@ public class DatabaseCommentStatus extends Database implements StorageObject{
     this.hasTimestamp = false;\r
     this.theTable = "comment_status";\r
   }\r
+\r
+  public SimpleList getPopupData() throws StorageObjectException {\r
+    return getPopupData("name", false);\r
+  }\r
 }
\ No newline at end of file
index 5f3f1cd..fc7131e 100755 (executable)
@@ -1,89 +1,88 @@
-/*
- * Copyright (C) 2001, 2002  The Mir-coders group
- *
- * This file is part of Mir.
- *
- * Mir is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation; either version 2 of the License, or
- * (at your option) any later version.
- *
- * Mir is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with Mir; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- *
- * In addition, as a special exception, The Mir-coders gives permission to link
- * the code of this program with the com.oreilly.servlet library, any library
- * licensed under the Apache Software License, The Sun (tm) Java Advanced
- * Imaging library (JAI), The Sun JIMI library (or with modified versions of
- * the above that use the same license as the above), and distribute linked
- * combinations including the two.  You must obey the GNU General Public
- * License in all respects for all of the code used other than the above
- * mentioned libraries.  If you modify this file, you may extend this exception
- * to your version of the file, but you are not obligated to do so.  If you do
- * not wish to do so, delete this exception statement from your version.
- */
-
-package mircoders.storage;
-
-/**
- * Title: DatabaseLanguage
- * Description:
- * Copyright:    Copyright (c) 2001
- * Company:      Indymedia
- * @author
- * @version 1.0
- */
-
-import java.lang.*;
-import java.sql.*;
-import java.io.*;
-import java.util.*;
-
-import freemarker.template.*;
-
-import mir.storage.*;
-import mir.entity.*;
-import mir.misc.*;
-
-
-public class DatabaseLanguage extends Database implements StorageObject{
-
-       private static DatabaseLanguage instance;
-       private static SimpleList languagePopupData;
-
-       // the following *has* to be sychronized cause this static method
-       // could get preemted and we could end up with 2 instances of DatabaseFoo..
-       // see the "Singletons with needles and thread" article at JavaWorld -mh
-       public synchronized static DatabaseLanguage getInstance() 
-         throws StorageObjectException
-       {
-               if (instance == null) {
-                       instance = new DatabaseLanguage();
-                       instance.myselfDatabase = instance;
-               }
-               return instance;
-       }
-
-       private DatabaseLanguage() throws StorageObjectException
-       {
-               super();
-               this.hasTimestamp = false;
-               this.theTable="language";
-       }
-
-       public SimpleList getPopupData() throws StorageObjectException { 
-      SimpleList pData = null;
-      try {
-      pData = getPopupData("name",false);
-      } catch (StorageObjectException e) {System.err.println("FF");}
-      return pData;
-    }
-
-
-}
+/*\r
+ * Copyright (C) 2001, 2002  The Mir-coders group\r
+ *\r
+ * This file is part of Mir.\r
+ *\r
+ * Mir is free software; you can redistribute it and/or modify\r
+ * it under the terms of the GNU General Public License as published by\r
+ * the Free Software Foundation; either version 2 of the License, or\r
+ * (at your option) any later version.\r
+ *\r
+ * Mir is distributed in the hope that it will be useful,\r
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\r
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\r
+ * GNU General Public License for more details.\r
+ *\r
+ * You should have received a copy of the GNU General Public License\r
+ * along with Mir; if not, write to the Free Software\r
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA\r
+ *\r
+ * In addition, as a special exception, The Mir-coders gives permission to link\r
+ * the code of this program with the com.oreilly.servlet library, any library\r
+ * licensed under the Apache Software License, The Sun (tm) Java Advanced\r
+ * Imaging library (JAI), The Sun JIMI library (or with modified versions of\r
+ * the above that use the same license as the above), and distribute linked\r
+ * combinations including the two.  You must obey the GNU General Public\r
+ * License in all respects for all of the code used other than the above\r
+ * mentioned libraries.  If you modify this file, you may extend this exception\r
+ * to your version of the file, but you are not obligated to do so.  If you do\r
+ * not wish to do so, delete this exception statement from your version.\r
+ */\r
+\r
+package mircoders.storage;\r
+\r
+/**\r
+ * Title: DatabaseLanguage\r
+ * Description:\r
+ * Copyright:    Copyright (c) 2001\r
+ * Company:      Indymedia\r
+ * @author\r
+ * @version 1.0\r
+ */\r
+\r
+import java.lang.*;\r
+import java.sql.*;\r
+import java.io.*;\r
+import java.util.*;\r
+\r
+import freemarker.template.*;\r
+\r
+import mir.storage.*;\r
+import mir.entity.*;\r
+import mir.misc.*;\r
+\r
+\r
+public class DatabaseLanguage extends Database implements StorageObject{\r
+\r
+  private static DatabaseLanguage instance;\r
+  private static SimpleList languagePopupData;\r
+\r
+  // the following *has* to be sychronized cause this static method\r
+  // could get preemted and we could end up with 2 instances of DatabaseFoo..\r
+  // see the "Singletons with needles and thread" article at JavaWorld -mh\r
+  public synchronized static DatabaseLanguage getInstance() throws\r
+      StorageObjectException {\r
+    if (instance == null) {\r
+      instance = new DatabaseLanguage();\r
+      instance.myselfDatabase = instance;\r
+    }\r
+    return instance;\r
+  }\r
+\r
+  private DatabaseLanguage() throws StorageObjectException {\r
+    super();\r
+    this.hasTimestamp = false;\r
+    this.theTable = "language";\r
+  }\r
+\r
+  public SimpleList getPopupData() throws StorageObjectException {\r
+    SimpleList pData = null;\r
+    try {\r
+      pData = getPopupData("name", false);\r
+    }\r
+    catch (StorageObjectException e) {\r
+      System.err.println("FF");\r
+    }\r
+    return pData;\r
+  }\r
+}\r
index f74653d..b375c85 100755 (executable)
     <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
   <head>
 
-<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
+  <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
 
-<include "templates/admin/head.template">
-
-<form method="post" action="${config.actionRoot}">
-       <input type="hidden" name="module" value="Comment">
-       <input type="hidden" name="id" value="${utility.encodeHTML(data.id)}">
-       <input type="hidden" name="date" value="${utility.encodeHTML(data.date)}">
-       <input type="hidden" name="to_media" value="${utility.encodeHTML(data.to_media)}">
-       <if new> 
-         <input type="hidden" name="do" value="insert">
-       <else>   
-         <input type="hidden" name="do" value="update">
-       </if>
-
-       <table border="0">      
-
-       <tr> 
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.date")}:</B></span></td>
-    <td>${utility.encodeHTML(utility.encodeHTML(data.webdb_create))}</td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.title")}:</B></span></td>
-    <td><input type="text" size="40" maxlength="255" name="title" value="${utility.encodeHTML(data.title)}"></td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.creator")}:</B></span></td>
-    <td><input type="text" size="40" maxlength="80" name="creator" value="${utility.encodeHTML(data.creator)}"></td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.url")}:</B></span></td>
-    <td><input type="text" size="40" maxlength="255" name="main_url" value="${utility.encodeHTML(data.main_url)}"></td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.email")}:</B></span></td>
-    <td><input type="text" size="40" maxlength="80" name="email" value="${utility.encodeHTML(data.email)}"></td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.phone")}:</B></span></td>
-    <td><input type="text" size="40" maxlength="80" name="phone" value="${utility.encodeHTML(data.phone)}"></td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.address")}:</B></span></td>
-    <td><input type="text" size="40" maxlength="80" name="address" value="${utility.encodeHTML(data.address)}"></td>
-       </tr>
-
-       <tr>
-    <td align="right" class="darkgrey"><span class="witesmall">
-        <B>${lang("comment.text")}:</B></span></td>
-    <td><textarea cols="40" rows="10" name="description" wrap="virtual">${utility.encodeHTML(data.description)}</textarea></td>
-       </tr>
-
-    <td colspan="2" align="right"> <span class="text">
-       ${lang("comment.published")} <input type="checkbox" name="is_published" value="1" <if data.is_published=="1"> checked</if>>
-       <if new>
-      <input type="submit" name="save" value="${lang("insert")}">
-    <else>
-    <input type="submit" name="save" value="${lang("save")}">
-    </if> </span></form></span>
-    </td>
-</table>
-
-<include "templates/admin/foot.template">
-</body>
+    <include "templates/admin/head.template">
+      
+    <form method="post" action="${config.actionRoot}">
+       <input type="hidden" name="module" value="Comment">
+       <input type="hidden" name="id" value="${utility.encodeHTML(data.id)}">
+       <input type="hidden" name="date" value="${utility.encodeHTML(data.date)}">
+       <input type="hidden" name="to_media" value="${utility.encodeHTML(data.to_media)}">
+       <if new> 
+         <input type="hidden" name="do" value="insert">
+       <else>   
+         <input type="hidden" name="do" value="update">
+       </if>
+    
+       <table border="0">      
+       <tr> 
+          <td align="right" class="editfieldname">
+            ${lang("comment.date")}
+          </td>
+          <td>
+            ${utility.encodeHTML(utility.encodeHTML(data.webdb_create))}
+          </td>
+        </tr>
+      
+       <tr>
+          <td align="right" class="editfieldname">
+            ${lang("comment.status")}
+          </td>
+          <td>
+            <select name="to_comment_status">
+              <list extra.comment_status_values as a>
+                <option value="${a.key}" <if (a.key == data.to_comment_status)>selected</if>>${a.value}</option>
+              </list>
+            </select>
+          </td>
+        </tr>
+      
+        <tr>
+          <td align="right" class="editfieldname">
+            ${lang("comment.title")}
+          </td>
+      
+          <td>
+            <input type="text" size="40" maxlength="255" name="title" value="${utility.encodeHTML(data.title)}">
+          </td>
+        </tr>
+      
+       <tr>
+          <td align="right" class="editfieldname">
+            ${lang("comment.creator")}
+          </td>
+          <td>
+            <input type="text" size="40" maxlength="80" name="creator" value="${utility.encodeHTML(data.creator)}">
+          </td>
+        </tr>
+      
+       <tr>
+          <td align="right" class="editfieldname">
+            ${lang("comment.url")}
+          </td>
+          <td>
+            <input type="text" size="40" maxlength="255" name="main_url" value="${utility.encodeHTML(data.main_url)}">
+          </td>
+        </tr>
+      
+       <tr>
+          <td align="right" class="editfieldname">
+            ${lang("comment.email")}
+          </td>
+          <td>
+            <input type="text" size="40" maxlength="80" name="email" value="${utility.encodeHTML(data.email)}">
+          </td>
+        </tr>
+      
+        <tr>
+          <td align="right" class="editfieldname">
+            ${lang("comment.phone")}
+          </td>
+          <td>
+            <input type="text" size="40" maxlength="80" name="phone" value="${utility.encodeHTML(data.phone)}">
+          </td>
+        </tr>
+      
+        <tr>
+          <td align="right" class="editfieldname">
+           ${lang("comment.address")}
+         </td>
+          <td>
+            <input type="text" size="40" maxlength="80" name="address" value="${utility.encodeHTML(data.address)}">
+          </td>
+        </tr>
+        <tr>
+          <td align="right" class="editfieldname">
+           ${lang("comment.language")}
+         </td>
+          <td>
+            <select name="to_language">
+              <list extra.languages as l>
+                <option value="${l.key}" <if (l.key == data.to_language)>selected</if>>${l.value}</option>
+              </list>
+            </select>
+          </td>
+        </tr>
+      
+        <tr>
+          <td align="right" class="editfieldname" valign="top">
+            ${lang("comment.text")}<br>
+            ${lang("comment.html")}<input type="checkbox" name="is_html" value="1"<if data.is_html=="1"> checked</if>>
+          </td>
+          <td>
+            <textarea cols="60" rows="10" name="description" wrap="virtual">${utility.encodeHTML(data.description)}</textarea>
+          </td>
+        </tr>
+        <tr>
+          <td colspan="2" align="right"> 
+            <span class="text">
+             ${lang("comment.published")} <input type="checkbox" name="is_published" value="1" <if data.is_published=="1"> checked</if>>
+             <if new>
+                <input type="submit" name="save" value="${lang("insert")}">
+              <else>
+                <input type="submit" name="save" value="${lang("save")}">
+              </if> 
+            </span>
+          </td>
+        </tr>
+      </table>
+    </form>
+    <include "templates/admin/foot.template">
+  </body>
 </html>
index 3d35d34..151a381 100755 (executable)
@@ -93,7 +93,7 @@
           </a>
           <br>
             <a name="${entry.id}"></a>
-          <if entry.title><b>${entry.title}</b><br></if>
+          <if entry.status>${entry.status.name} - </if> <b>${entry.title}</b><br>
 
           <if entry.creator>${lang("comment.creator")}: ${entry.creator}<br></if>
           <span class="small">${entry.description}</span>
index 741f068..bf3403c 100755 (executable)
   <table border="0" width="80%" align="middle">
     <tr>
       <td colspan="1">&nbsp</td>
-      <td class="minorcommand" colspan="2"><a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${data.id}">${lang("content.comments")}</a></td>
+      <td class="minorcommand" colspan="2">
+        <if !data.new>
+          <a href="${config.actionRoot}?module=Comment&do=articlecomments&articleid=${data.id}">${lang("content.comments")}</a>
+        </if>
+      </td>
       <td colspan="2" align="right" valign="top">
         ${lang("content.published")} <a href="${config.docRoot}/help/content.html"><img src="${config.docRoot}/img/help.gif" border="0" align="absmiddle"></a>:
         <input type="checkbox" name="is_published" value="1"<if data.is_published!="0" && data.is_published!=""> checked</if>>
index 9141311..86e7922 100755 (executable)
                            <list entry.operations as op>
                              [<a href="${config.actionRoot}?module=Localizer&do=articleoperation&operation=${op}&articleid=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">${op}</a>]
                            </list>
-<comment>                          
-                           <if entry.to_article_type=="0">&nbsp;|&nbsp;<a href="${config.actionRoot}?module=Content&do=newswire&id=${entry.id}&returnurl=${utility.encodeURI(thisurl)}">newswire</a></if>
-</comment>                         
-
                          </span>
                        </td>
            <td width="20%" <if grey=="1">class="list3"<else>class="list4"</if> valign="top"><span class="x-small">