Update of /var/cvs/applications/searchrelate/templates
In directory james.mmbase.org:/tmp/cvs-serv12271
Modified Files:
node.tr.jspx page.jspx
Log Message:
introduced fields attribute on search and relate to be able to set the fields
in the list
See also: http://cvs.mmbase.org/viewcvs/applications/searchrelate/templates
Index: node.tr.jspx
===================================================================
RCS file: /var/cvs/applications/searchrelate/templates/node.tr.jspx,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- node.tr.jspx 15 Jul 2008 12:53:02 -0000 1.5
+++ node.tr.jspx 19 Oct 2008 14:15:46 -0000 1.6
@@ -9,19 +9,25 @@
<mm:import externid="status" from="request" />
<mm:import externid="id" required="true" from="request,parameters" />
<mm:import externid="node" required="true" from="request,parameters"
/>
+ <mm:import externid="fields" from="request,parameters" />
<mm:import externid="customizedir" from="request,parameters" />
<mm:node referid="node">
<mm:nodeinfo type="nodemanager" id="nodemanager" write="false" />
<tr class="click ${(! empty status and status.index % 2 eq 0) ? 'even'
: 'odd'} ${nodemanager}">
- <td class="node number">
- <mm:field name="number" />
- </td>
- <td class="node">
- <mm:nodeinfo type="gui" />
- </td>
+ <td class="node number"><mm:field name="number" /></td>
+ <c:choose>
+ <c:when test="${!empty fields}">
+ <mm:fieldlist fields="$fields" varStatus="field">
+ <td class="fields ${field.current.name}"><mm:fieldinfo
type="guivalue" /></td>
+ </mm:fieldlist>
+ </c:when>
+ <c:otherwise>
+ <td class="node"><mm:nodeinfo type="gui" /></td>
<mm:fieldlist type="list" varStatus="field">
<td class="fields ${field.current.name}"><mm:fieldinfo
type="guivalue" /></td>
</mm:fieldlist>
+ </c:otherwise>
+ </c:choose>
<td class="node action">
<mm:haspage page="${customizedir}action.td.jspx">
<mm:include page="${customizedir}action.td.jspx" />
Index: page.jspx
===================================================================
RCS file: /var/cvs/applications/searchrelate/templates/page.jspx,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -b -r1.18 -r1.19
--- page.jspx 2 Sep 2008 15:58:54 -0000 1.18
+++ page.jspx 19 Oct 2008 14:15:46 -0000 1.19
@@ -9,7 +9,7 @@
Presents a table with one page of query results. Plus paging to other
pages (in tfoot).
Used in ajax-calls, but can also be directly included with mm:include
(for initial results).
@todo Searching only happens in actual mmbase queries now. How about
lucene queries?
- @version $Id: page.jspx,v 1.18 2008/09/02 15:58:54 michiel Exp $
+ @version $Id: page.jspx,v 1.19 2008/10/19 14:15:46 andre Exp $
-->
<jsp:output omit-xml-declaration="true" />
<mm:import externid="id" required="true" />
@@ -21,6 +21,7 @@
<mm:import externid="maxpages">20</mm:import>
<mm:import externid="offset" vartype="integer">0</mm:import>
<mm:import externid="customizedir" />
+ <mm:import externid="fields" />
<mm:listnodescontainer id="b" clone="query" jspvar="bq">
<c:if test="${! empty search}">
@@ -60,12 +61,23 @@
<!-- <jsp:expression>bq.toSql()</jsp:expression> -->
<thead>
<tr class="${query.nodeManager.name}">
+ <c:choose>
+ <c:when test="${!empty fields}">
+ <th class="node number">#</th>
+ <mm:fieldlist nodetype="${query.nodeManager.name}"
fields="$fields" varStatus="field">
+ <th class="fields ${field.current.name}"><mm:fieldinfo
type="guiname" /></th>
+ <mm:last><mm:index write="false" id="colcount" /></mm:last>
+ </mm:fieldlist>
+ </c:when>
+ <c:otherwise>
<th class="node number">#</th>
<th class="node"> </th>
<mm:fieldlist nodetype="${query.nodeManager.name}" type="list"
varStatus="field">
<th class="fields ${field.current.name}"><mm:fieldinfo
type="guiname" /></th>
<mm:last><mm:index write="false" id="colcount" /></mm:last>
</mm:fieldlist>
+ </c:otherwise>
+ </c:choose>
<th class="node action"> </th>
</tr>
</thead>
@@ -98,7 +110,7 @@
<!-- ACTUAL SEARCHRESULT -->
<tbody>
<mm:listnodes varStatus="status">
- <mm:include page="node.tr.jspx" attributes="status,[EMAIL
PROTECTED],customizedir?" />
+ <mm:include page="node.tr.jspx" attributes="status,[EMAIL
PROTECTED],customizedir?,fields?" />
</mm:listnodes>
</tbody>
</table>
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs