ServletModule.CommentStatus.EditTemplate=commentstatus.template
ServletModule.CommentStatus.ListTemplate=commentstatuslist.template
+ServletModule.MediaType.DeleteConfirmationTemplate=confirm.template
+ServletModule.MediaType.EditTemplate=mediatype.template
+ServletModule.MediaType.ListTemplate=mediatypelist.template
+
definition = new EntityAdapterDefinition();
constructCommentAdapterDefinition( definition );
result.addMapping( "comment", DatabaseComment.getInstance(), definition);
+ result.addMapping( "commentStatus", DatabaseCommentStatus.getInstance(), new EntityAdapterDefinition());
result.addMapping( "articleType", DatabaseArticleType.getInstance(), new EntityAdapterDefinition());
- result.addMapping( "commentStatus", DatabaseCommentStatus.getInstance(), new EntityAdapterDefinition());
+
+ result.addMapping( "mediaType", DatabaseMediaType.getInstance(), new EntityAdapterDefinition());
+
definition = new EntityAdapterDefinition();
definition.addDBDateField("creationdate", "webdb_create", configuration.getString("Mir.DefaultTimezone"));
--- /dev/null
+/*
+ * 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 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 mir.log.LoggerWrapper;
+import mir.servlet.ServletModule;
+import mircoders.global.MirGlobal;
+import mircoders.module.ModuleMediaType;
+import mircoders.storage.DatabaseMediaType;
+
+/**
+ *
+ * <p>Title: </p>
+ * <p>Description: </p>
+ * <p>Copyright: Copyright (c) 2003</p>
+ * <p>Company: </p>
+ * @author not attributable
+ * @version 1.0
+ */
+public class ServletModuleMediaType extends ServletModule
+{
+ private static ServletModuleMediaType instance = new ServletModuleMediaType();
+ public static ServletModule getInstance() { return instance; }
+
+ private ServletModuleMediaType() {
+ logger = new LoggerWrapper("ServletModule.MediaType");
+
+ try {
+ model = MirGlobal.localizer().dataModel().adapterModel();
+ definition = "mediaType";
+ mainModule = new ModuleMediaType(DatabaseMediaType.getInstance());
+ }
+ catch (Exception e) {
+ logger.error("Initialization of ServletModuleArticleType failed!: " + e.getMessage());
+ }
+ }
+}
--- /dev/null
+<html>
+ <head>
+ <title>${config["Mir.Name"]} | ${lang("mediatype.htmltitle")}</title>
+ <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
+<head>
+<body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
+ <include "FUNCTIONS.template">
+ <include "head.template">
+
+ <if new=="1">
+ <assign method="insert">
+ <else>
+ <assign method="update">
+ </if>
+
+ <call EditStart(
+ ["module", "id", "do"],
+ [module, entity.id, method])>
+
+ <call EditReadonlyTextNormal(lang("mediatype.id"), entity.id)>
+ <call EditTextNormal(lang("mediatype.name"), 40, 255, "name", entity.name)>
+ <call EditTextNormal(lang("mediatype.mimetype"), 40, 255, "mime_type", entity.mime_type)>
+ <call EditTextNormal(lang("mediatype.classname"), 40, 255, "classname", entity.classname)>
+ <call EditTextNormal(lang("mediatype.tablename"), 40, 255, "tablename", entity.tablename)>
+
+ <if new=="1">
+ <call EditSubmitButtonNormal(lang("insert"), "save")>
+ <else>
+ <call EditSubmitButtonNormal(lang("save"), "save")>
+ </if>
+
+ <call EditEnd()>
+
+ <if returnurl>
+ <call showBack(returnurl)>
+ <else>
+ <call showBack("module="+module+"&do=list")>
+ </if>
+
+ <include "foot.template">
+</body>
+</html>
--- /dev/null
+<html>
+ <head>
+ <title>${config["Mir.Name"]} | ${lang("mediatypelist.htmltitle")}</title>
+ <link rel="stylesheet" type="text/css" href="${config.docRoot}/style/admin.css">
+ </head>
+ <body marginwidth="0" marginheight="0" topmargin="0" leftmargin="0">
+
+ <include "FUNCTIONS.template">
+ <include "head.template">
+
+ <call showAddOrBack("1", module, "Admin", "superusermenu")>
+
+ <if entities>
+ <call showPrevNextLinks(prevurl, nexturl, "left")>
+ <call EntityTable(entities, ["id","name"], [lang("mediatype.id"), lang("mediatype.name")], from, to, count, "1", "1", module)>
+ <call showPrevNextLinks(prevurl, nexturl, "left")>
+ <call showAddOrBack("1", module, "Admin", "superusermenu")>
+ <else>
+ <P align="center">${lang("no_matches_found")}</p>
+ </if>
+
+ <include "foot.template">
+ </body>
+</html>
+
+
<p class="box">
> <a href="${config.actionRoot}?module=Topics&do=list">${lang("superusermenu.topics")}</a><br>
> <a href="${config.actionRoot}?module=ArticleType&do=list">${lang("superusermenu.articletypes")}</a><br>
+ > <a href="${config.actionRoot}?module=MediaType&do=list">${lang("superusermenu.mediatypes")}</a><br>
> <a href="${config.actionRoot}?module=CommentStatus&do=list">${lang("superusermenu.comment_statuses")}</a><br>
> <a href="${config.actionRoot}?module=Users&do=list">${lang("superusermenu.users")}</a><br>
> <a href="${config.actionRoot}?module=Language&do=list">${lang("superusermenu.languages")}</a><br>