From ec89f6dc6e5cae2f6da9a2bb014eaac01beab882 Mon Sep 17 00:00:00 2001 From: zapata Date: Fri, 21 Feb 2003 05:37:33 +0000 Subject: [PATCH] fixed comment/article search + configurable icon sizes --- bundles/admin_de.properties | 8 +- bundles/admin_en.properties | 48 +++- bundles/admin_es.properties | 8 +- bundles/admin_eu.properties | 8 +- bundles/admin_nl.properties | 8 +- bundles/admin_pt.properties | 8 +- bundles/admin_sv.properties | 8 +- bundles/admin_tr.properties | Bin 29699 -> 29711 bytes etc/default.properties | 7 + source/mir/misc/WebdbImage.java | 316 ++++++++++----------- source/mir/util/SQLQueryBuilder.java | 4 +- .../basic/MirBasicProducerAssistantLocalizer.java | 2 - .../mircoders/media/MediaHandlerImagesExtern.java | 3 +- source/mircoders/servlet/ServletHelper.java | 26 ++ source/mircoders/servlet/ServletModuleComment.java | 57 ++-- source/mircoders/servlet/ServletModuleContent.java | 20 +- templates/admin/commentlist.template | 47 ++- templates/admin/content.template | 2 +- templates/admin/contentlist.template | 36 +-- 19 files changed, 322 insertions(+), 294 deletions(-) diff --git a/bundles/admin_de.properties b/bundles/admin_de.properties index 1cf51a44..24044cea 100755 --- a/bundles/admin_de.properties +++ b/bundles/admin_de.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: deutsch / german -# $Id: admin_de.properties,v 1.25 2003/01/18 08:15:19 mh Exp $ +# $Id: admin_de.properties,v 1.26 2003/02/21 05:38:36 zapata Exp $ languagename=Deutsch @@ -102,9 +102,9 @@ commentlist.published=publiziert commentlist.hidden=versteckt commentlist.search=go! -commentlist.order.datedesc= date (desc.) # needs translation -commentlist.order.dateasc= date (asc.) # needs translation -commentlist.order.articletitle= article title # needs translation +commentsearch.order.datedesc= date (desc.) # needs translation +contentsearch.order.dateasc= date (asc.) # needs translation +contentsearch.order.articletitle= article title # needs translation # confirm diff --git a/bundles/admin_en.properties b/bundles/admin_en.properties index a9c32d4a..9ffef87b 100755 --- a/bundles/admin_en.properties +++ b/bundles/admin_en.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: english -# $Id: admin_en.properties,v 1.34 2003/02/20 16:06:30 zapata Exp $ +# $Id: admin_en.properties,v 1.35 2003/02/21 05:38:36 zapata Exp $ languagename=English @@ -102,13 +102,26 @@ comment.status=Status comment.language=Language commentlist.htmltitle=Comments -commentlist.published=published -commentlist.hidden=hidden -commentlist.search=go! -commentlist.order.datedesc= date (desc.) -commentlist.order.dateasc= date (asc.) -commentlist.order.articletitle= article title +commentsearch.field = Field +commentsearch.field.title = Title +commentsearch.field.creator = Author +commentsearch.field.description = Description +commentsearch.value = Value + +commentsearch.publishedstate = Published state +commentsearch.publishedstate.hidden = Hidden +commentsearch.publishedstate.published = Published + +commentsearch.status = Status + +commentsearch.order = Order +commentsearch.order.datedesc= date (desc.) +commentsearch.order.dateasc= date (asc.) +commentsearch.order.articletitle= article title + +commentsearch.searchbutton = Search + # confirm @@ -160,10 +173,31 @@ content.viewparent=view content.clearparent=de-select content.selectparent=select +contentsearch.value = value +contentsearch.field = field +contentsearch.field.title = Title +contentsearch.field.creator = Author +contentsearch.field.contents=Contents + +contentsearch.publishedstate = publication state +contentsearch.publishedstate.hidden=hidden +contentsearch.publishedstate.published=published + +contentsearch.articletype = article type + +contentsearch.order = order by +contentsearch.order.datedesc=Newest first +contentsearch.order.dateasc=Oldest first +contentsearch.order.title=Title +contentsearch.order.creator=Author + +contentsearch.searchbutton=Search + contentlist.htmltitle=Articles contentlist.comments=Comments contentlist.select=Select + # language language.htmltitle=Language language.name=Language diff --git a/bundles/admin_es.properties b/bundles/admin_es.properties index 468cdd14..a813d5f9 100755 --- a/bundles/admin_es.properties +++ b/bundles/admin_es.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: espanol / spanish -# $Id: admin_es.properties,v 1.21 2003/01/18 16:04:33 zapata Exp $ +# $Id: admin_es.properties,v 1.22 2003/02/21 05:38:36 zapata Exp $ languagename=Español @@ -99,9 +99,9 @@ commentlist.published=publicado commentlist.hidden=oculto commentlist.search=buscar! -commentlist.order.datedesc= fecha (desc.) -commentlist.order.dateasc= fecha (asc.) -commentlist.order.articletitle= título del artículo +commentsearch.order.datedesc= fecha (desc.) +commentsearch.order.dateasc= fecha (asc.) +commentsearch.order.articletitle= título del artículo # confirm diff --git a/bundles/admin_eu.properties b/bundles/admin_eu.properties index fba7c1a2..ba67237f 100755 --- a/bundles/admin_eu.properties +++ b/bundles/admin_eu.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: euskera / basque -# $Id: admin_eu.properties,v 1.7 2003/01/18 16:27:23 zapata Exp $ +# $Id: admin_eu.properties,v 1.8 2003/02/21 05:38:36 zapata Exp $ languagename=Euskera @@ -98,9 +98,9 @@ commentlist.produced=ekoiztua commentlist.hidden=izkutua commentlist.search=bilatu! -commentlist.order.datedesc= data (behera) -commentlist.order.dateasc= data (gora) -commentlist.order.articletitle= artikuluaren titulua +commentsearch.order.datedesc= data (behera) +commentsearch.order.dateasc= data (gora) +commentsearch.order.articletitle= artikuluaren titulua # confirm confirm.htmltitle=Indymedia Euskal Herria | Ezabaketa baieztatu diff --git a/bundles/admin_nl.properties b/bundles/admin_nl.properties index e3e2fb3c..489c8ae2 100755 --- a/bundles/admin_nl.properties +++ b/bundles/admin_nl.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: dutch -# $Id: admin_nl.properties,v 1.3 2003/01/18 15:54:30 zapata Exp $ +# $Id: admin_nl.properties,v 1.4 2003/02/21 05:38:36 zapata Exp $ languagename=Nederlands @@ -106,9 +106,9 @@ commentlist.published=Gepubliceerd commentlist.hidden=Verborgen commentlist.search=Zoek -commentlist.order.datedesc= Datum (nieuwste eerst) -commentlist.order.dateasc= Datum (oudste eerst) -commentlist.order.articletitle= Titel artikel +commentsearch.order.datedesc= Datum (nieuwste eerst) +commentsearch.order.dateasc= Datum (oudste eerst) +commentsearch.order.articletitle= Titel artikel # confirm confirm.htmltitle=Bevestigen diff --git a/bundles/admin_pt.properties b/bundles/admin_pt.properties index cd7122e3..c633789e 100755 --- a/bundles/admin_pt.properties +++ b/bundles/admin_pt.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: portuguese -# $Id: admin_pt.properties,v 1.2 2003/01/18 08:15:19 mh Exp $ +# $Id: admin_pt.properties,v 1.3 2003/02/21 05:38:36 zapata Exp $ languagename=Português @@ -106,9 +106,9 @@ commentlist.published=publicado commentlist.hidden=escondido commentlist.search=Vá! -commentlist.order.datedesc= date (desc.) -commentlist.order.dateasc= date (asc.) -commentlist.order.articletitle= título do artigo +commentsearch.order.datedesc= date (desc.) +commentsearch.order.dateasc= date (asc.) +commentsearch.order.articletitle= título do artigo # confirm diff --git a/bundles/admin_sv.properties b/bundles/admin_sv.properties index b87de08b..d51095d6 100755 --- a/bundles/admin_sv.properties +++ b/bundles/admin_sv.properties @@ -1,6 +1,6 @@ ########## admin ########## # language: svenska -# $Id: admin_sv.properties,v 1.2 2003/01/18 08:15:19 mh Exp $ +# $Id: admin_sv.properties,v 1.3 2003/02/21 05:38:36 zapata Exp $ languagename=Svenska @@ -106,9 +106,9 @@ commentlist.published=publicerad commentlist.hidden=gömd commentlist.search=Sök! -commentlist.order.datedesc= datum (fallande) -commentlist.order.dateasc= datum (stigande) -commentlist.order.articletitle= artikelrubrik +commentsearch.order.datedesc= datum (fallande) +commentsearch.order.dateasc= datum (stigande) +commentsearch.order.articletitle= artikelrubrik # confirm diff --git a/bundles/admin_tr.properties b/bundles/admin_tr.properties index 646171436f0307cc061c260195d50bd4a082066d..d80fc69354da9eb4ab4c1e67db9287571742e44b 100755 GIT binary patch delta 62 vcmZpE!Px(TaYLRUcQHdMLn1>FLo!3gWI-YE$vuK~Xkt^5`J2}Yg(U(2LNO7B delta 34 jcmeBw!PxwQaYLTq0 && ( getImageHeight()> maxImageSize|| getImageWidth() >maxImageSize)) - { - float scale; - ParameterBlockJAI params = new ParameterBlockJAI("scale"); - params.addSource(planarImage); - if (getImageHeight() > getImageWidth()) - scale = (float)maxImageSize / (float)getImageHeight(); - else - scale = (float)maxImageSize / (float)getImageWidth(); - - params.setParameter("xScale", scale); - params.setParameter("yScale", scale); - params.setParameter("xTrans",0.0F); - params.setParameter("yTrans",0.0F); - params.setParameter("interpolation",new InterpolationBilinear()); - planarImage = JAI.create("scale", params); - } - } - - private void scaleIcon(OutputStream outStream) - throws java.io.IOException - { - float scale; - ParameterBlockJAI params = new ParameterBlockJAI("scale"); - params.addSource(planarImage); - if (getImageHeight() > getImageWidth()) - scale = (float)maxIconSize / (float)getImageHeight(); - else - scale = (float)maxIconSize / (float)getImageWidth(); - - params.setParameter("xScale", scale); - params.setParameter("yScale", scale); - params.setParameter("xTrans",0.0F); - params.setParameter("yTrans",0.0F); - params.setParameter("interpolation",new InterpolationBilinear()); - PlanarImage temp = JAI.create("scale", params); - JAI.create("encode", temp, outStream, _type, null); - iconWidth=temp.getWidth(); - iconHeight=temp.getHeight(); - } - -} +/* + * 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 mir.misc; + +/** + * Title: + * Description: + * Copyright: Copyright (c) 2002 Mir-coders + * @author $Author: zapata $ + * @version $Id: WebdbImage.java,v 1.10 2003/02/21 05:37:59 zapata Exp $ + */ + +import java.io.File; +import java.io.IOException; +import java.io.OutputStream; +import java.util.Random; + +import javax.media.jai.InterpolationBilinear; +import javax.media.jai.JAI; +import javax.media.jai.ParameterBlockJAI; +import javax.media.jai.PlanarImage; + +import com.sun.media.jai.codec.FileSeekableStream; + +import mir.config.MirPropertiesConfiguration; +import mir.config.MirPropertiesConfiguration.PropertiesConfigExc; + +public class WebdbImage +{ + + // default values for scaling + private int maxIconSize; + private int maxImageSize; + + private int iconWidth; + private int iconHeight; + + Random r = new Random(); + + // internal representation of the image + private PlanarImage planarImage; + + // type of the image + private String _type; + + private WebdbImage() { + } + + // constructor + // takes a temporary file as a parameter + public WebdbImage(File f, String type) throws Exception { + // It has to be a FileSeekableStream cause the image conversion + // needs to seek backwards. + maxImageSize = MirPropertiesConfiguration.instance().getInt("Producer.Image.MaxSize"); + maxIconSize = MirPropertiesConfiguration.instance().getInt("Producer.Image.MaxIconSize"); + + planarImage = JAI.create("stream", new FileSeekableStream(f)); + _type = type; + scaleImage(); + } + + // acc3ssor-methods + // must be run after scaleIcon() + public int getIconWidth() throws IOException { + return iconWidth; + } + + // must be run after scaleIcon() + public int getIconHeight() throws IOException { + return iconHeight; + } + + public int getImageWidth() { + return (int) planarImage.getWidth(); + } + + public int getImageHeight() { + return (int) planarImage.getHeight(); + } + + public void setImage(OutputStream outStream) { + JAI.create("encode", planarImage, outStream, _type, null); + } + + public void setIcon(OutputStream outStream) throws IOException { + scaleIcon(outStream); + } + + private void scaleImage() throws java.io.IOException { + if (maxImageSize > 0 && + (getImageHeight() > maxImageSize || getImageWidth() > maxImageSize)) { + float scale; + ParameterBlockJAI params = new ParameterBlockJAI("scale"); + params.addSource(planarImage); + if (getImageHeight() > getImageWidth()) + scale = (float) maxImageSize / (float) getImageHeight(); + else + scale = (float) maxImageSize / (float) getImageWidth(); + + params.setParameter("xScale", scale); + params.setParameter("yScale", scale); + params.setParameter("xTrans", 0.0F); + params.setParameter("yTrans", 0.0F); + params.setParameter("interpolation", new InterpolationBilinear()); + planarImage = JAI.create("scale", params); + } + } + + private void scaleIcon(OutputStream outStream) throws java.io.IOException { + float scale; + ParameterBlockJAI params = new ParameterBlockJAI("scale"); + params.addSource(planarImage); + if (getImageHeight() > getImageWidth()) + scale = (float) maxIconSize / (float) getImageHeight(); + else + scale = (float) maxIconSize / (float) getImageWidth(); + + params.setParameter("xScale", scale); + params.setParameter("yScale", scale); + params.setParameter("xTrans", 0.0F); + params.setParameter("yTrans", 0.0F); + params.setParameter("interpolation", new InterpolationBilinear()); + PlanarImage temp = JAI.create("scale", params); + JAI.create("encode", temp, outStream, _type, null); + iconWidth = temp.getWidth(); + iconHeight = temp.getHeight(); + } + +} \ No newline at end of file diff --git a/source/mir/util/SQLQueryBuilder.java b/source/mir/util/SQLQueryBuilder.java index f1d0d6bd..99a0bc3b 100755 --- a/source/mir/util/SQLQueryBuilder.java +++ b/source/mir/util/SQLQueryBuilder.java @@ -31,10 +31,10 @@ public class SQLQueryBuilder { public void appendAndCondition(String aQualifier) { if (whereClause.length()==0) { - whereClause.append(aQualifier); + whereClause.append("(").append(aQualifier).append(")"); } else { - whereClause.append("(").append(whereClause).append(") and (").append(aQualifier).append(")"); + whereClause.append(" and (").append(aQualifier).append(")"); } } diff --git a/source/mircoders/localizer/basic/MirBasicProducerAssistantLocalizer.java b/source/mircoders/localizer/basic/MirBasicProducerAssistantLocalizer.java index 414eb023..92027382 100755 --- a/source/mircoders/localizer/basic/MirBasicProducerAssistantLocalizer.java +++ b/source/mircoders/localizer/basic/MirBasicProducerAssistantLocalizer.java @@ -104,7 +104,6 @@ public class MirBasicProducerAssistantLocalizer implements MirProducerAssistantL EntityList topicList=null; EntityList entityList=null; - EntityList parentList=null; EntityList languageList=null; try { @@ -121,7 +120,6 @@ public class MirBasicProducerAssistantLocalizer implements MirProducerAssistantL aValueSet.put("topics", topicList); aValueSet.put("imclist", entityList); - aValueSet.put("parentlist", parentList); Map articleTypeMap = new HashMap(); articleTypeMap.put("openposting", "0"); diff --git a/source/mircoders/media/MediaHandlerImagesExtern.java b/source/mircoders/media/MediaHandlerImagesExtern.java index 74da6700..f64d9bd2 100755 --- a/source/mircoders/media/MediaHandlerImagesExtern.java +++ b/source/mircoders/media/MediaHandlerImagesExtern.java @@ -61,6 +61,7 @@ public class MediaHandlerImagesExtern extends MediaHandlerGeneric String filePath = datePath + anImageEntity.getId() + ext; String iconFilePath = MirPropertiesConfiguration.instance().getString("Producer.StorageRoot") + getIconStoragePath() + filePath; String imageFilePath = getStoragePath() + File.separator + filePath; + int maxIconSize = MirPropertiesConfiguration.instance().getInt("Producer.Image.MaxIconSize"); File imageFile = new File(imageFilePath); File iconFile = new File(iconFilePath); @@ -71,7 +72,7 @@ public class MediaHandlerImagesExtern extends MediaHandlerGeneric else { ImageProcessor processor = new ImageProcessor(imageFile, "JPEG"); - processor.descaleImage(150, 0.8F); + processor.descaleImage(maxIconSize, 0.2F); File dir = new File(iconFile.getParent()); if (dir!=null && !dir.exists()){ dir.mkdirs(); diff --git a/source/mircoders/servlet/ServletHelper.java b/source/mircoders/servlet/ServletHelper.java index 135a2124..b1e0c10e 100755 --- a/source/mircoders/servlet/ServletHelper.java +++ b/source/mircoders/servlet/ServletHelper.java @@ -9,6 +9,8 @@ import mir.generator.Generator; import mir.servlet.ServletModuleException; import mir.util.NullWriter; import mir.util.ResourceBundleGeneratorFunction; +import mir.entity.adapter.*; +import mir.util.*; import mircoders.global.MirGlobal; import org.apache.struts.util.MessageResources; @@ -24,6 +26,30 @@ public class ServletHelper { MirGlobal.localizer().producerAssistant().initializeGenerationValueSet(result); + Object languages = + new CachingRewindableIterator( + new EntityIteratorAdapter( "", "id", 30, + MirGlobal.localizer().dataModel().adapterModel(), "language")); + Object topics = + new CachingRewindableIterator( + new EntityIteratorAdapter("", "id", 30, + MirGlobal.localizer().dataModel().adapterModel(), "topic")); + + Object articleTypes = + new CachingRewindableIterator( + new EntityIteratorAdapter( "", "id", 30, + MirGlobal.localizer().dataModel().adapterModel(), "articleType")); + + Object commentStatuses = + new CachingRewindableIterator( + new EntityIteratorAdapter( "", "id", 30, + MirGlobal.localizer().dataModel().adapterModel(), "commentStatus")); + + result.put("commentstatuses", commentStatuses); + result.put("articletypes", articleTypes); + result.put("languages", languages); + result.put("topics", topics); + result.put( "lang", new ResourceBundleGeneratorFunction( aLocale, MessageResources.getMessageResources("bundles.adminlocal"), diff --git a/source/mircoders/servlet/ServletModuleComment.java b/source/mircoders/servlet/ServletModuleComment.java index 5fcc9e23..7f43dc45 100755 --- a/source/mircoders/servlet/ServletModuleComment.java +++ b/source/mircoders/servlet/ServletModuleComment.java @@ -48,6 +48,7 @@ import mir.util.CachingRewindableIterator; import mir.util.HTTPRequestParser; import mir.util.JDBCStringRoutines; import mir.util.URLBuilder; +import mir.util.SQLQueryBuilder; import mircoders.global.MirGlobal; import mircoders.module.ModuleComment; import mircoders.module.ModuleContent; @@ -134,56 +135,44 @@ public class ServletModuleComment extends ServletModule public void search(HttpServletRequest aRequest, HttpServletResponse aResponse) throws ServletModuleException { HTTPRequestParser requestParser = new HTTPRequestParser(aRequest); + SQLQueryBuilder queryBuilder = new SQLQueryBuilder(); String queryField = ""; String searchField = requestParser.getParameter("searchfield"); String searchText = requestParser.getParameter("searchtext"); String searchIsPublished = requestParser.getParameter("searchispublished"); + String searchStatus = requestParser.getParameter("searchstatus"); String searchOrder = requestParser.getParameter("searchorder"); - String whereClause = " (1=1) "; - String orderClause = "webdb_create desc"; - if (searchIsPublished.equals("0")) { - whereClause=whereClause + "is_published='f'"; + queryBuilder.appendAndCondition("is_published='f'"); } else if (searchIsPublished.equals("1")) { - whereClause=whereClause + "is_published='t'"; + queryBuilder.appendAndCondition("is_published='t'"); } - if (!searchField.equals("") && !searchText.equals("")) { - queryField=""; - - if (searchField.equals("title")) - queryField = "title"; - else if (searchField.equals("creator")) - queryField = "creator"; - else if (searchField.equals("description")) - queryField = "description"; - else - queryField = ""; - - if (!queryField.equals("")) { - if (!whereClause.equals("")) - whereClause = whereClause + " and "; - - whereClause = whereClause + "lower(" + queryField + ") like '%" + JDBCStringRoutines.escapeStringLiteral(searchText.toLowerCase()) + "%'"; - } + if (searchText.length()>0) { + queryBuilder.appendAndCondition( + "lower("+ searchField + ") like " + + "'%" + JDBCStringRoutines.escapeStringLiteral(searchText.toLowerCase()) + "%'"); } - System.out.println("search order = " + searchOrder); - - if (searchOrder.equals("datedesc")) { - orderClause = "webdb_create desc"; + if (searchStatus.length()>0) { + queryBuilder.appendAndCondition("to_comment_status="+Integer.parseInt(searchStatus)); } - else if (searchOrder.equals("dateasc")) { - orderClause = "webdb_create asc"; - } - else if (searchOrder.equals("articletitle")) { - orderClause = "(select content.title from content where content.id = comment.to_media) asc"; + + if (searchOrder.length()>0) { + if (searchOrder.equals("datedesc")) + queryBuilder.appendAscendingOrder("webdb_create"); + else if (searchOrder.equals("dateasc")) + queryBuilder.appendDescendingOrder("webdb_create"); + else if (searchOrder.equals("articletitle")) + queryBuilder.appendAscendingOrder("(select content.title from content where content.id = comment.to_media)"); + else if (searchOrder.equals("creator")) + queryBuilder.appendDescendingOrder("creator"); } - returnCommentList(aRequest, aResponse, whereClause, orderClause, 0); + returnCommentList(aRequest, aResponse, queryBuilder.getWhereClause(), queryBuilder.getOrderByClause(), 0); } public void articlecomments(HttpServletRequest req, HttpServletResponse res) throws ServletModuleException @@ -238,11 +227,13 @@ public class ServletModuleComment extends ServletModule urlBuilder.setValue("searchfield", requestParser.getParameter("searchfield")); urlBuilder.setValue("searchtext", requestParser.getParameter("searchtext")); urlBuilder.setValue("searchispublished", requestParser.getParameter("searchispublished")); + urlBuilder.setValue("searchstatus", requestParser.getParameter("searchstatus")); urlBuilder.setValue("searchorder", requestParser.getParameter("searchorder")); responseData.put("searchfield", requestParser.getParameter("searchfield")); responseData.put("searchtext", requestParser.getParameter("searchtext")); responseData.put("searchispublished", requestParser.getParameter("searchispublished")); + responseData.put("searchstatus", requestParser.getParameter("searchstatus")); responseData.put("searchorder", requestParser.getParameter("searchorder")); urlBuilder.setValue("offset", anOffset); diff --git a/source/mircoders/servlet/ServletModuleContent.java b/source/mircoders/servlet/ServletModuleContent.java index 4b955e54..f37ccf3a 100755 --- a/source/mircoders/servlet/ServletModuleContent.java +++ b/source/mircoders/servlet/ServletModuleContent.java @@ -84,7 +84,7 @@ import freemarker.template.TemplateModelRoot; * ServletModuleContent - * deliver html for the article admin form. * - * @version $Id: ServletModuleContent.java,v 1.33 2003/02/20 16:05:34 zapata Exp $ + * @version $Id: ServletModuleContent.java,v 1.34 2003/02/21 05:37:59 zapata Exp $ * @author rk, mir-coders * */ @@ -155,7 +155,7 @@ public class ServletModuleContent extends ServletModule } if (searchArticleType.length()>0) { - queryBuilder.appendAndCondition("to_article_type="+searchArticleType); + queryBuilder.appendAndCondition("to_article_type="+Integer.parseInt(searchArticleType)); } if (searchOrder.length()>0) { @@ -399,22 +399,6 @@ public class ServletModuleContent extends ServletModule } responseData.put("article", article); - Object languages = - new CachingRewindableIterator( - new EntityIteratorAdapter( "", "id", 30, - MirGlobal.localizer().dataModel().adapterModel(), "language")); - Object topics = - new CachingRewindableIterator( - new EntityIteratorAdapter("", "id", 30, - MirGlobal.localizer().dataModel().adapterModel(), "topic")); - Object articleTypes = - new CachingRewindableIterator( - new EntityIteratorAdapter( "", "id", 30, - MirGlobal.localizer().dataModel().adapterModel(), "articleType")); - - responseData.put("articleTypes", articleTypes); - responseData.put("languages", languages); - responseData.put("topics", topics); responseData.put("returnurl", requestParser.getParameter("returnurl")); responseData.put("thisurl", urlBuilder.getQuery()); diff --git a/templates/admin/commentlist.template b/templates/admin/commentlist.template index 965a5a2f..14f29b50 100755 --- a/templates/admin/commentlist.template +++ b/templates/admin/commentlist.template @@ -16,23 +16,11 @@ - - - - - - - + + + + + - -
- search in field - - for value - - published - - status - - order - ${lang("commentsearch.field")}${lang("commentsearch.value")}${lang("commentsearch.publishedstate")}${lang("commentsearch.status")}${lang("commentsearch.order")}
@@ -41,36 +29,35 @@ - +
diff --git a/templates/admin/content.template b/templates/admin/content.template index 84cf9dff..78c94945 100755 --- a/templates/admin/content.template +++ b/templates/admin/content.template @@ -81,7 +81,7 @@ diff --git a/templates/admin/contentlist.template b/templates/admin/contentlist.template index bfae89c5..61d27658 100755 --- a/templates/admin/contentlist.template +++ b/templates/admin/contentlist.template @@ -21,53 +21,53 @@ -
+ - - - - - + + + + + - +
for valuesearch in fieldpublishedarticle typeorder${lang("contentsearch.value")}${lang("contentsearch.field")}${lang("contentsearch.publishedstate")}${lang("contentsearch.articletype")}${lang("contentsearch.order")}
- +
-- 2.11.0