Author: andre Date: 2010-07-16 12:40:20 +0200 (Fri, 16 Jul 2010) New Revision: 42935
Added: mmweb/trunk/src/main/webapp/WEB-INF/config/applications/MMSite.xml mmweb/trunk/src/main/webapp/articles.jspx mmweb/trunk/src/main/webapp/contact.jspx Modified: mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/html.tagx mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/pager.tagx mmweb/trunk/src/main/webapp/convert.jspx mmweb/trunk/src/main/webapp/index.jspx Log: some new templates, starting to implement sitestructure Added: mmweb/trunk/src/main/webapp/WEB-INF/config/applications/MMSite.xml =================================================================== --- mmweb/trunk/src/main/webapp/WEB-INF/config/applications/MMSite.xml (rev 0) +++ mmweb/trunk/src/main/webapp/WEB-INF/config/applications/MMSite.xml 2010-07-16 10:40:20 UTC (rev 42935) @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE application PUBLIC "-//MMBase//DTD application config 1.1//EN" "http://www.mmbase.org/dtd/application_1_1.dtd"> +<application name="MMSite" maintainer="mmbase.org" version="2" auto-deploy="false"> + + <requirements> + <requires name="Resources" maintainer="mmbase.org" /> + </requirements> + + <neededbuilderlist> + <builder maintainer="mmbase.org" version="1">articles</builder> + <!-- site structure --> + <builder maintainer="mmbase.org" version="1">templates</builder> + <builder maintainer="mmbase.org" version="1">pages</builder> + <builder maintainer="mmbase.org" version="1">pools</builder> + +<!-- + <builder maintainer="mmbase.org" version="1">properties</builder> + --> + + <!-- relations --> + <builder maintainer="mmbase.org" version="1">insrel</builder> + <builder maintainer="mmbase.org" version="1">posrel</builder> + </neededbuilderlist> + + <neededreldeflist> + <reldef source="related" target="related" direction="bidirectional" guisourcename="Related" guitargetname="Related" builder="insrel" /> + <reldef source="posrel" target="posrel" direction="bidirectional" guisourcename="Posrel" guitargetname="Posrel" builder="posrel" /> + </neededreldeflist> + + <allowedrelationlist> + <relation from="pools" to="templates" type="related" /><!-- for export --> + <relation from="pools" to="pages" type="posrel" /><!-- export and site structure --> + <!-- <relation from="pools" to="properties" type="related" /> --> + + <relation from="pages" to="pages" type="posrel" /> + <relation from="pages" to="articles" type="posrel" /> + + <relation from="articles" to="attachments" type="posrel" /> + <relation from="articles" to="images" type="posrel" /> + <relation from="articles" to="urls" type="posrel" /> + + </allowedrelationlist> + + <datasourcelist> +<!-- + <datasource builder="properties" path="MMSite/properties.xml" /> + --> + + <datasource builder="urls" path="MMSite/urls.xml" /> + <datasource builder="attachments" path="MMSite/attachments.xml" /> + <datasource builder="images" path="MMSite/images.xml" /> + <datasource builder="pools" path="MMSite/pools.xml" /> + + <datasource builder="articles" path="MMSite/articles.xml" /> + <datasource builder="pages" path="MMSite/pages.xml" /> + <datasource builder="pools" path="MMSite/pools.xml" /> + <datasource builder="templates" path="MMSite/templates.xml" /> + </datasourcelist> + + <relationsourcelist> + <relationsource builder="insrel" path="MMSite/insrel.xml" /> + <relationsource builder="posrel" path="MMSite/posrel.xml" /> + </relationsourcelist> + + <contextsourcelist> + <contextsource path="MMSite/backup.xml" type="depth" goal="backup" /> + </contextsourcelist> + + <description> + This is the MMBase application for MMSite. + </description> + + <install-notice> + The application MMSite is installed. + </install-notice> +</application> Modified: mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/html.tagx =================================================================== --- mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/html.tagx 2010-07-16 10:37:37 UTC (rev 42934) +++ mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/html.tagx 2010-07-16 10:40:20 UTC (rev 42935) @@ -46,7 +46,6 @@ <c:choose> <c:when test="${empty title and !empty page}"> <mm:node referid="page"> - <mm:hasfield name="username"><mm:field name="username" /></mm:hasfield> <mm:hasfield name="title"><mm:field name="title" /></mm:hasfield> </mm:node> </c:when> @@ -64,46 +63,112 @@ </c:otherwise> </c:choose> </mmweb:head> + <body class="${styleClass}"> + <div id="head"> + <div id="head-inner"> + <h1> + <a href="${mm:link('/')}"><img src="${mm:link('/html/style/images/mmbase-logo-sm.png')}" width="48" height="64" alt="MMBase" /></a> + </h1> + <div id="menu"> - <body class="${styleClass}"> - <div id="head"> - <div id="head-inner"> - <h1> - <a href="${mm:link('/')}"><img src="${mm:link('/html/style/images/mmbase-logo-sm.png')}" width="48" height="64" alt="MMBase" /></a> - </h1> - <div id="menu"> - <ol> - <li><a href="#">About</a></li> - <li><a href="#">Download</a></li> - <li><a href="#">Documentation</a></li> - <li><a href="#">Bugs</a></li> - <li><a href="#">Contact</a></li> - </ol> - </div> - </div> - </div> - <div id="wrap"> - <div id="wrap-inner"> - <div id="submenu"><jsp:text> <!-- empty --> </jsp:text></div> + <mm:node number="page_homepage"> + <mm:relatednodescontainer type="pages" role="posrel" searchdirs="destination"> + <mm:constraint field="posrel.pos" value="1" value2="10" operator="BETWEEN" /> + <mm:sortorder field="posrel.pos" direction="UP" /> + <mm:import externid="n" vartype="integer" /> + <ol> + <mm:relatednodes> + <li class="${n eq _node.number ? 'selected ' :''}"> + <mm:link page="page" referids="_n...@n"> + <mm:frameworkparam name="component">mmsite</mm:frameworkparam> + <a href="${_}"><mm:field name="title" /></a> + </mm:link> p: ${page} + </li> + </mm:relatednodes> + </ol> + </mm:relatednodescontainer> + </mm:node> + <!-- + <ol> + <li><a href="#">About</a></li> + <li><a href="#">Download</a></li> + <li><a href="#">Documentation</a></li> + <li><a href="#">Bugs</a></li> + <li><a href="#">Contact</a></li> + </ol> --> + </div> + </div> + </div> + <div id="wrap"> + <div id="wrap-inner"> + + <div id="submenu"> + <mm:node referid="page" notfound="skip"> + <mm:hasfield name="path"> + <mm:nodefunction name="root" referids="_n...@node" set="mmsite"> + <mm:relatednodescontainer type="pages" role="posrel" searchdirs="destination"> + <mm:sortorder field="posrel.pos" direction="UP" /> + <mm:size> + <mm:isgreaterthan value="0"> + <ol> + <mm:relatednodes> + <li class="${page eq _node.number ? 'selected ' :''}"> + <mm:link page="page" referids="_n...@n"> + <mm:frameworkparam name="component">mmsite</mm:frameworkparam> + <a href="${_}"><mm:field name="title" /></a> + </mm:link> + </li> + </mm:relatednodes> + </ol> + </mm:isgreaterthan> + </mm:size> + </mm:relatednodescontainer> + </mm:nodefunction> + </mm:hasfield> + <mm:hasfield name="path" inverse="true"> + <!-- assume (for now) we're in the contact section --> + <mm:node number="page_contact"> + <mm:relatednodescontainer type="pages" role="posrel" searchdirs="destination"> + <mm:sortorder field="posrel.pos" direction="UP" /> + <mm:size> + <mm:isgreaterthan value="0"> + <ol> + <mm:relatednodes> + <li class="${page eq _node.number ? 'selected ' :''}"> + <mm:link page="page" referids="_n...@n"> + <mm:frameworkparam name="component">mmsite</mm:frameworkparam> + <a href="${_}"><mm:field name="title" /></a> + </mm:link> + </li> + </mm:relatednodes> + </ol> + </mm:isgreaterthan> + </mm:size> + </mm:relatednodescontainer> + </mm:node> + </mm:hasfield> + </mm:node> + <jsp:text> <!-- empty --> </jsp:text> + </div> + + <jsp:invoke fragment="body" /> + + </div> - <jsp:invoke fragment="body" /> + <div id="footer"> + <div id="footer-inner"> + <ul> + <li><a href="${mm:link('')}">Home</a></li> + <li><a href="sitemap.html">Sitemap</a></li> + <li><a href="#">About</a></li> + <li><a href="#">Docs</a></li> + <li><a href="#">Bugs</a></li> + </ul> + <p>This website is made and maintained by the MMBase community. Send comments to webmas...@mmbase.org.</p> + </div> + </div><!-- /#footer --> </div> - - <div id="footer"> - <div id="footer-inner"> - <ul> - <li><a href="${mm:link('')}">Home</a></li> - <li><a href="sitemap.html">Sitemap</a></li> - <li><a href="#">About</a></li> - <li><a href="#">Docs</a></li> - <li><a href="#">Bugs</a></li> - </ul> - <p>This website is made and maintained by the MMBase community. Send comments to webmas...@mmbase.org.</p> - </div> - </div><!-- /#footer --> - - </div> </body> </html> Modified: mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/pager.tagx =================================================================== --- mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/pager.tagx 2010-07-16 10:37:37 UTC (rev 42934) +++ mmweb/trunk/src/main/webapp/WEB-INF/tags/mmweb/pager.tagx 2010-07-16 10:40:20 UTC (rev 42935) @@ -14,52 +14,59 @@ description="Url with needed parameters" /> <jsp:directive.attribute name="fragment" description="Fragment part of the url, to switch to the right tab f.e." /> - + <ul class="nolist"> <c:if test="${total > max}"> <c:if test="${offset != 0}"> - <!-- mm:link referid="baseurl"> - <mm:param name="offset">0</mm:param> - <mm:param name="max">${max}</mm:param> - <a href="${_}" class="first">first</a> - </mm:link> <jsp:text> </jsp:text> --> - <mm:link referid="baseurl"> - <mm:param name="offset">${offset - max}</mm:param> - <mm:param name="max">${max}</mm:param> - <a href="${_}${empty fragment ? '' : fragment}" class="previous">«« previous</a> - </mm:link> <jsp:text> </jsp:text> + <li class="previous"> + <!-- mm:link referid="baseurl"> + <mm:param name="offset">0</mm:param> + <mm:param name="max">${max}</mm:param> + <a href="${_}" class="first">first</a> + </mm:link> <jsp:text> </jsp:text> --> + <mm:link referid="baseurl"> + <mm:param name="offset">${offset - max}</mm:param> + <mm:param name="max">${max}</mm:param> + <a href="${_}${empty fragment ? '' : fragment}" class="previous">«« previous</a> + </mm:link> <jsp:text> </jsp:text> + </li> </c:if> - <c:set var="pages" value="${(total / max)}" /> - <c:forEach var="index" begin="0" end="${pages}"> - <c:choose> - <c:when test="${(index * max) == offset}"> - <c:if test="${pages gt 1}"> - ${(index + 1)} <jsp:text> </jsp:text> - </c:if> - </c:when> - <c:otherwise> - <mm:link referid="baseurl"> - <mm:param name="offset">${(index * max)}</mm:param> - <mm:param name="max">${max}</mm:param> - <a href="${_}${empty fragment ? '' : fragment}">${(index + 1)}</a> <jsp:text> </jsp:text> - </mm:link> - </c:otherwise> - </c:choose> - </c:forEach> + <li class="pages"> + <c:set var="pages" value="${(total / max)}" /> + <c:forEach var="index" begin="0" end="${pages}"> + <c:choose> + <c:when test="${(index * max) == offset}"> + <c:if test="${pages gt 1}"> + ${(index + 1)} <jsp:text> </jsp:text> + </c:if> + </c:when> + <c:otherwise> + <mm:link referid="baseurl"> + <mm:param name="offset">${(index * max)}</mm:param> + <mm:param name="max">${max}</mm:param> + <a href="${_}${empty fragment ? '' : fragment}">${(index + 1)}</a> <jsp:text> </jsp:text> + </mm:link> + </c:otherwise> + </c:choose> + </c:forEach> + </li> <c:if test="${(total - offset) > max}"> - <jsp:text> </jsp:text> - <mm:link referid="baseurl"> - <mm:param name="offset">${offset + max}</mm:param> - <mm:param name="max">${max}</mm:param> - <a href="${_}${empty fragment ? '' : fragment}" class="next">next »»</a> - </mm:link> - <!-- <jsp:text> </jsp:text> <mm:link referid="baseurl"> - <mm:param name="offset">${total - (total mod max)}</mm:param> - <mm:param name="max">${max}</mm:param> - <a href="${_}" class="last">last</a> - </mm:link --> + <li class="next"> + <jsp:text> </jsp:text> + <mm:link referid="baseurl"> + <mm:param name="offset">${offset + max}</mm:param> + <mm:param name="max">${max}</mm:param> + <a href="${_}${empty fragment ? '' : fragment}" class="next">next »»</a> + </mm:link> + <!-- <jsp:text> </jsp:text> <mm:link referid="baseurl"> + <mm:param name="offset">${total - (total mod max)}</mm:param> + <mm:param name="max">${max}</mm:param> + <a href="${_}" class="last">last</a> + </mm:link --> + </li> </c:if> </c:if> + </ul> </jsp:root> Added: mmweb/trunk/src/main/webapp/articles.jspx =================================================================== --- mmweb/trunk/src/main/webapp/articles.jspx (rev 0) +++ mmweb/trunk/src/main/webapp/articles.jspx 2010-07-16 10:40:20 UTC (rev 42935) @@ -0,0 +1,108 @@ +<jsp:root + version="2.0" + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:x="http://java.sun.com/jsp/jstl/xml" + xmlns:os="http://www.opensymphony.com/oscache" + xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0" + xmlns:mmweb="urn:jsptagdir:/WEB-INF/tags/mmweb"> + <mmweb:html styleClass="articles"> + <jsp:attribute name="head"> + + </jsp:attribute> + <jsp:attribute name="body"> + <mm:import id="page" externid="n" /> + <mm:node referid="page"> + <div id="content"> + <div> + <mm:relatednodescontainer type="articles" role="posrel" searchdirs="destination"> + <mm:sortorder field="posrel.pos" direction="DOWN" /> + <mm:maxnumber value="1" /> + <mm:relatednodes> + <h2><mm:field name="title" id="pagetitle" /></h2> + <mm:field name="intro" escape="paragraph(intro),links" /> + <!-- images --> + <mm:relatednodescontainer type="images" role="posrel" searchdirs="destination"> + <mm:relatednodes> + <div class="images"> + <mm:image width="240" mode="img" /> + <mm:field name="title"><mm:isnotempty><mm:write /></mm:isnotempty></mm:field> + </div> + </mm:relatednodes> + </mm:relatednodescontainer> + + <mm:relatednodescontainer type="urls" role="posrel" searchdirs="destination"> + <mm:size id="nr_urls" write="false" /> + </mm:relatednodescontainer> + <c:if test="${nr_urls gt 0}"> + <div class="related"> + <mm:relatednodescontainer type="urls" role="posrel" searchdirs="destination"> + <mm:sortorder field="posrel.pos" direction="UP" /> + <ul class="urls"> + <mm:relatednodes> + <li> + <a title="${_node.description}" href="${_node.url}"><mm:field name="name" /></a> + </li> + </mm:relatednodes> + </ul> + </mm:relatednodescontainer> + <ul class="attachments"> + <li><a href="#">Dit is een attachments</a></li> + </ul> + </div> + </c:if> + + <mm:field name="body" escape="paragraph,links" /> + + </mm:relatednodes> + </mm:relatednodescontainer> + + <mm:relatednodescontainer type="articles" role="posrel" searchdirs="destination"> + <mm:sortorder field="posrel.pos" direction="DOWN" /> + <mm:offset value="1" /> + <mm:relatednodes> + <h2><mm:field name="title" /></h2> + <mm:field name="intro" escape="paragraph(intro),links" /> + <mm:field name="body" escape="paragraph,links" /> + </mm:relatednodes> + </mm:relatednodescontainer> + </div> + </div> + + <div id="sidebar"> + <div> + page: ${page} + <mm:nodefunction name="parent" referids="_n...@node" set="mmsite"> + <mm:import id="parent" reset="true"><mm:field name="number" /></mm:import> + </mm:nodefunction> + parent: ${parent} + <mm:nodefunction name="root" referids="_n...@node" set="mmsite"> + <mm:import id="root" reset="true"><mm:field name="number" /></mm:import> + </mm:nodefunction> + root: ${root} + <mm:nodelistfunction name="crumbs" referids="_n...@node" set="mmsite"> + crumbs: ${_node.number} + </mm:nodelistfunction> + + <mm:relatednodescontainer type="pages" role="posrel" searchdirs="destination"> + <h4>Read more</h4> + <ul class="nolist"> + <mm:relatednodes> + <li> + <mm:link page="page" referids="_n...@n"> + <mm:frameworkparam name="component">mmsite</mm:frameworkparam> + <a href="${_}"><mm:field name="title" /></a> + </mm:link> + </li> + </mm:relatednodes> + </ul> + </mm:relatednodescontainer> + + + </div> + </div> + </mm:node> + </jsp:attribute> + <jsp:attribute name="title">${pagetitle}</jsp:attribute> + </mmweb:html> +</jsp:root> Added: mmweb/trunk/src/main/webapp/contact.jspx =================================================================== --- mmweb/trunk/src/main/webapp/contact.jspx (rev 0) +++ mmweb/trunk/src/main/webapp/contact.jspx 2010-07-16 10:40:20 UTC (rev 42935) @@ -0,0 +1,34 @@ +<jsp:root + version="2.0" + xmlns:jsp="http://java.sun.com/JSP/Page" + xmlns:c="http://java.sun.com/jsp/jstl/core" + xmlns:x="http://java.sun.com/jsp/jstl/xml" + xmlns:os="http://www.opensymphony.com/oscache" + xmlns:mm="http://www.mmbase.org/mmbase-taglib-2.0" + xmlns:mmweb="urn:jsptagdir:/WEB-INF/tags/mmweb"> + <mmweb:html styleClass="contact"> + <jsp:attribute name="title">Contact</jsp:attribute> + <jsp:attribute name="head"> + + </jsp:attribute> + <jsp:attribute name="body"> + <div id="content"> + <div> + <h2>Contact</h2> + + <p>Contact </p> + + </div> + </div> + + <div id="sidebar"> + <div> + <h4>Sidebar</h4> + + + </div> + </div> + + </jsp:attribute> + </mmweb:html> +</jsp:root> Modified: mmweb/trunk/src/main/webapp/convert.jspx =================================================================== --- mmweb/trunk/src/main/webapp/convert.jspx 2010-07-16 10:37:37 UTC (rev 42934) +++ mmweb/trunk/src/main/webapp/convert.jspx 2010-07-16 10:40:20 UTC (rev 42935) @@ -14,6 +14,10 @@ <jsp:attribute name="body"> <div id="content"> <div> + <p> + <a href="convert.jspx">news</a> + <a href="convert2.jspx">site</a> + </p> <h2>Convert MMBase news</h2> Modified: mmweb/trunk/src/main/webapp/index.jspx =================================================================== --- mmweb/trunk/src/main/webapp/index.jspx 2010-07-16 10:37:37 UTC (rev 42934) +++ mmweb/trunk/src/main/webapp/index.jspx 2010-07-16 10:40:20 UTC (rev 42935) @@ -12,8 +12,22 @@ </jsp:attribute> <jsp:attribute name="body"> + <mm:import id="page" externid="n">page_homepage</mm:import> <div id="content"> <div> + + <mm:node referid="page" notfound="skip"> + <mm:relatednodescontainer type="articles" role="posrel" searchdirs="destination"> + <mm:maxnumber value="1" /> + <mm:sortorder field="posrel.pos" direction="DOWN" /> + <mm:relatednodes> + <h2><mm:field name="title" /></h2> + <mm:field name="intro" escape="paragraph,links" /> + </mm:relatednodes> + </mm:relatednodescontainer> + </mm:node> + +<!-- <h2>MMBase</h2> <p> @@ -29,6 +43,7 @@ different databases. Some of the users can be found below (latest sites build...). </p> + --> <mm:component name="mynews" block="list" /> _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs