custom article types made browsable from admin interface
authorzapata <zapata>
Sun, 23 Jun 2002 23:05:52 +0000 (23:05 +0000)
committerzapata <zapata>
Sun, 23 Jun 2002 23:05:52 +0000 (23:05 +0000)
source/Mir.java
source/mirlocal/indymedia.nl/IndyNLProducerLocalizer.java
templates-dist/admin/start_admin.template

index dd8f373..b42796d 100755 (executable)
@@ -13,6 +13,7 @@ import mircoders.localizer.*;
 import mircoders.entity.EntityUsers;
 import mircoders.module.ModuleMessage;
 import mircoders.module.ModuleUsers;
+import mircoders.storage.DatabaseArticleType;
 import mircoders.storage.DatabaseMessages;
 import mircoders.storage.DatabaseUsers;
 
@@ -304,7 +305,7 @@ public class Mir extends AbstractServlet {
             if (messageModule == null) messageModule = new ModuleMessage(DatabaseMessages.getInstance());
             mergeData.put("messages", messageModule.getByWhereClause(null, "webdb_create desc", 0, 10));
 
-
+            mergeData.put("articletypes", DatabaseArticleType.getInstance().selectByWhereClause("", "id", 0, 20));
 
             SimpleList producersData = new SimpleList();
             Iterator i = MirGlobal.localizer().producers().factories().entrySet().iterator();
@@ -323,7 +324,6 @@ public class Mir extends AbstractServlet {
 
               producersData.add(producerData);
             }
-
             mergeData.put("producers", producersData);
 
 
index 475edaa..843381c 100755 (executable)
@@ -372,7 +372,7 @@ public class IndyNLProducerLocalizer extends MirBasicProducerLocalizer {
     try {
       batchingNode =
           new EntityBatchingProducerNode( "articles", "batch", model, "content",
-                "to_article_type=${articletype.trashed} or exists(select * from comment where comment.to_media=content.id and comment.is_published='f')", "date desc, webdb_create desc", 25, 15, 0,
+                "to_article_type=${articletype.trashed} or exists(select * from comment where comment.to_media=content.id and comment.is_published='f')", "date asc, webdb_create asc", 25, 15, 0,
             new EntityListProducerNode("languages", model, "language",
                     "", "code", 10, 0,
               new EntityEnumeratingProducerNode( "language", model, "language", "code='nl'", "",
index bc7bb92..87ae1a2 100755 (executable)
                        <a href="${config.actionRoot}?module=Content&do=add&where=aktuell">${lang("start.content.new")}</a>
            <p>
                        <b>${lang("start.show")}:</b><br>
-                       <img src="${config.docRoot}/img/pointgris.gif" border=0>
-                       <a href="${config.actionRoot}?module=Content&do=list&where=newswire">${lang("start.content.newswire")}</a><br>
-                       <img src="${config.docRoot}/img/pointgris.gif" border=0>
-                       <a href="${config.actionRoot}?module=Content&do=list&where=feature">${lang("start.content.feature")}</a><br>
-                       <img src="${config.docRoot}/img/pointgris.gif" border=0>
-                       <a href="${config.actionRoot}?module=Content&do=list&where=themenspecial">${lang("start.content.topicspecial")}</a><br>
-                       <img src="${config.docRoot}/img/pointgris.gif" border=0>
-                       <a href="${config.actionRoot}?module=Content&do=list&where=special">${lang("start.content.startspecial")}</a><br>
+      <list data.articletypes as a>
+                       <img src="${config.docRoot}/img/pointgris.gif" border=0>
+                       <a href="${config.actionRoot}?module=Content&do=list&where=to_article_type%3D${a.id}">${a.name}</a><br>
+      </list>
+
+
                        <br>
                <img src="${config.docRoot}/img/pointgris.gif" border=0>
                        <a href="${config.actionRoot}?module=Content&do=list&where=nfrei" >${lang("start.content.not_published")}</a><br>
                        <div align="left">
                          <table>
                            <tr><th>producer</th><th>verbs</th></tr>
-                         <list data.producers as p>
-                           <tr>
-                           <td>${p.key}</td>
-
-               <td>
-                 <table>
-                   <tr>
-                             <list p.verbs as v>
-                               <td width="30">
-                               <a href="${config.actionRoot}?module=Producer&producer=${p.key}&verb=${v}">
-                                 ${v}
-                               </a>
-                               </td>
-                             </list>
-                               <tr>
-                             </table>
-               </td>
-                   </tr>
-
-                         </list>
+
+                         <list data.producers as p>
+                           <tr>
+                           <td>${p.key}</td>
+
+               <td>
+                 <table>
+                   <tr>
+                             <list p.verbs as v>
+                               <td width="30">
+                               <a href="${config.actionRoot}?module=Producer&producer=${p.key}&verb=${v}">
+                                 ${v}
+                               </a>
+                               </td>
+                             </list>
+                               <tr>
+                             </table>
+               </td>
+                   </tr>
+
+                         </list>
+
                          </table>
                  </div>