########## admin ##########
# language: english
-# $Id: admin_en.properties,v 1.46 2003/04/28 00:44:05 zapata Exp $
+# $Id: admin_en.properties,v 1.47 2003/04/28 01:57:14 zapata Exp $
languagename=English
start.show=show
start.open_by_id=open id
-start.content.comments=comments
start.content.hidden=produce all hidden articles
start.content.not_published=not (yet) published articles
start.content.with_media=with media
start.producers.produceAllNew=generate all new
start.producers.advanced=advanced page (use with care!)
-start.openpostings.title=OPENPOSTINGS
-start.comments.title=COMMENTS
-start.breaking.title=breaking news
-start.content.title=ARTICLES
start.administer.title=ADMINISTER
+start.administer.comments=comments
+
+start.breaking.title=breaking news
start.list.title=LIST
start.fileedit.includes.title=edit include files
start.addandedit.title=ADD / EDIT
start.extra.title=EXTRA
start.search.title=SEARCH
-start.topics.title=TOPICS
start.other_media.title=other media
start.images.title=pictures
start.video.title=video
########## admin ##########
# language: spanish
-# $Id: admin_es.properties,v 1.27 2003/04/28 00:44:05 zapata Exp $
+# $Id: admin_es.properties,v 1.28 2003/04/28 01:57:14 zapata Exp $
languagename = Castellano
start.show = mostrar
start.open_by_id = ID env\u00edo
-start.content.comments = comentarios
+start.administer.comments = comentarios
start.content.hidden = art\u00edculos ocultos
start.content.not_published = art\u00edculos (aun) sin publicar
start.content.with_media = con recursos medi\u00e1ticos
########## admin ##########
# language: euskera / basque
-# $Id: admin_eu.properties,v 1.11 2003/04/28 00:44:05 zapata Exp $
+# $Id: admin_eu.properties,v 1.12 2003/04/28 01:57:14 zapata Exp $
languagename = Euskera
start.open_by_id =
# missing (master value = "comments")
-start.content.comments =
+start.administer.comments =
start.content.hidden = aritukulu ezkutukoak
start.content.not_published = argitaratzeke dauden artikuluak
start.content.with_media = baliabide mediatikoekin
start.show = Montrer
start.open_by_id = Trouver par ID
-start.content.comments = Commentaires
+start.administer.comments = Commentaires
start.content.hidden = Articles cach\u00e9s
start.content.not_published = Articles non publi\u00e9s
start.content.with_media = Articles avec m\u00e9dias
########## admin ##########
# language: dutch
-# $Id: admin_nl.properties,v 1.7 2003/04/28 00:44:05 zapata Exp $
+# $Id: admin_nl.properties,v 1.8 2003/04/28 01:57:14 zapata Exp $
languagename = Nederlands
start.show = bekijken
start.open_by_id = open nummer
-start.content.comments = Commentaren
+start.administer.comments = Commentaren
start.content.hidden = Ongepubliceerde artikelen
start.content.not_published = Ongepubliceerde artikelen
start.content.with_media = Artikelen met multi-media
########## admin ##########
-# $Id: admin_tr.properties,v 1.11 2003/04/28 00:44:05 zapata Exp $
+# $Id: admin_tr.properties,v 1.12 2003/04/28 01:57:14 zapata Exp $
languagename = T\u00fcrk\u00e7e
start.open_by_id =
# missing (master value = "comments")
-start.content.comments =
+start.administer.comments =
# missing (master value = "produce all hidden articles")
start.content.hidden =
start.content.not_published = hen\u00fcz yay\u0131mlanmam\u0131\u015f makaleler
import java.util.Locale;
import java.util.Map;
import java.util.Vector;
-
import javax.servlet.ServletException;
import javax.servlet.UnavailableException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
+import org.apache.struts.util.MessageResources;
+import freemarker.template.SimpleHash;
+import freemarker.template.SimpleList;
+import freemarker.template.SimpleScalar;
+import freemarker.template.TemplateModel;
+
import mir.config.MirPropertiesConfiguration;
import mir.entity.adapter.EntityIteratorAdapter;
import mir.generator.FreemarkerGenerator;
import mircoders.global.MirGlobal;
import mircoders.module.ModuleMessage;
import mircoders.module.ModuleUsers;
-import mircoders.servlet.*;
+import mircoders.servlet.ServletHelper;
+import mircoders.servlet.ServletModuleFileEdit;
+import mircoders.servlet.ServletModuleLocalizer;
import mircoders.storage.DatabaseUsers;
-import org.apache.struts.util.MessageResources;
-
-import freemarker.template.SimpleHash;
-import freemarker.template.SimpleList;
-import freemarker.template.SimpleScalar;
-import freemarker.template.TemplateModel;
-
* Mir.java - main servlet, that dispatches to servletmodules
*
* @author $Author: zapata $
- * @version $Id: Mir.java,v 1.46 2003/04/28 00:44:05 zapata Exp $
+ * @version $Id: Mir.java,v 1.47 2003/04/28 01:57:14 zapata Exp $
*
*/
public class Mir extends AbstractServlet {
MirGlobal.localizer().dataModel().adapterModel(), "internalMessage", 10, 0)));
mergeData.put("fileeditentries", ((ServletModuleFileEdit) ServletModuleFileEdit.getInstance()).getEntries());
+ mergeData.put("administeroperations", ((ServletModuleLocalizer) ServletModuleLocalizer.getInstance()).getAdministerOperations());
mergeData.put("searchvalue", null);
mergeData.put("searchfield", null);
Mir.Localizer.Admin.AllowDeleteComment=1
Mir.Localizer.Admin.AllowDeleteArticle=1
+# enable deletion of comments/articles?
+Mir.Localizer.Admin.AdministerOperations= \
+ comments:module=Comment&do=list
+
+
# Which producers need to be called after an article (resp. a comment) is posted
Mir.Localizer.OpenPosting.ContentProducers= media.new;articles.changed;startpage.generate;synchronization.run
Mir.Localizer.OpenPosting.CommentProducers= articles.changed;synchronization.run
* in the config file.
*
* @author $Author: zapata $
- * @version $Revision: 1.11 $ $Date: 2003/04/28 00:44:06 $
+ * @version $Revision: 1.12 $ $Date: 2003/04/28 01:57:14 $
*
*/
directoryNames = new Vector();
String settings[] = configuration.getStringArray("ServletModule.FileEdit.Configuration");
-/*
-ServletModule.FileEdit.FileDirectory=/pub/Dokumente/Indymedia/de-tech/Mir/produced
-ServletModule.FileEdit.ExtFilter=.*\.inc$
-ServletModule.FileEdit.Recursive=0
-*/
if (settings!=null) {
for (int i = 0; i < settings.length; i++) {
* 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 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.
+ * the code of this program with 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.servlet;
-import java.util.List;
+import java.util.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import mir.servlet.ServletModule;
import mir.servlet.ServletModuleExc;
import mir.servlet.ServletModuleFailure;
-import mir.util.StringRoutines;
+import mir.util.*;
import mircoders.entity.EntityComment;
import mircoders.entity.EntityContent;
import mircoders.entity.EntityUsers;
private ModuleContent contentModule;
private ModuleComment commentModule;
+ private List administerOperations;
private ServletModuleLocalizer() {
try {
+ logger = new LoggerWrapper("ServletModule.Localizer");
+
contentModule = new ModuleContent(DatabaseContent.getInstance());
commentModule = new ModuleComment(DatabaseComment.getInstance());
- logger = new LoggerWrapper("ServletModule.Localizer");
+ administerOperations = new Vector();
+
+ String settings[] = configuration.getStringArray("Mir.Localizer.Admin.AdministerOperations");
+
+ if (settings!=null) {
+ for (int i = 0; i < settings.length; i++) {
+ String setting = settings[i].trim();
+
+ if (setting.length() > 0) {
+ List parts = StringRoutines.splitString(setting, ":");
+ if (parts.size() != 2) {
+ logger.error("config error: " + settings[i] + ", 2 parts expected");
+ }
+ else {
+ Map entry = new HashMap();
+ entry.put("name", (String) parts.get(0));
+ entry.put("url", (String) parts.get(1));
+ administerOperations.add(entry);
+ }
+ }
+ }
+ }
}
catch (Exception e) {
logger.error("ServletModuleLocalizer could not be initialized: " + e.getMessage());
}
+
+
}
private EntityAdapter getActiveUser(HttpServletRequest aRequest) throws ServletModuleExc {
redirect(aResponse, returnUrlString);
}
+ public List getAdministerOperations() throws ServletModuleExc {
+ return administerOperations;
+ }
}
\ No newline at end of file
<form method="post" action="${config.actionRoot}">
<input type="hidden" name="module" value="Content">
<input type="hidden" name="id" value="${utility.encodeHTML(article.id)}">
+ <input type="hidden" name="returnurl" value="${utility.encodeHTML(returnurl)}">
<if new=="1">
<input type="hidden" name="do" value="insert">
<else>
<!-- ###### left column ###### -->
<p class="box-head"><b>${lang("start.administer.title")}</b></p>
<p class="box">
-
+ <list administeroperations as a>
+ <a href="${config.actionRoot}?${a.url}">${lang("start.administer."+a.name)}</a><br>
+ </list>
+<!--
<a href="${config.actionRoot}?module=Content&do=list&where=is_published%3d'1'%20and%20to_article_type%3D0&order=webdb_create%20desc">> ${lang("start.allarticlesoftype", lang("articletypes.openposting"))}</a>
<br>
<a href="${config.actionRoot}?module=Comment&do=list">
> ${lang("start.content.comments")}
</a>
+-->
</p>
<p class="box-head"><b>${lang("start.list.title")}</b></p>