You should check:
/nuxeo-platform-webapp/src/main/resources/nuxeo.war/incl/dashboard_last_published_documents.xhtml
in order to view how this is done in "Last published documents".
Now you can create your custom result provider and query like here:
/nuxeo-platform-webapp-core/src/main/resources/OSGI-INF/resultsprovider-contrib.xml
/nuxeo-platform-webapp-core/src/main/resources/OSGI-INF/querymodel-contrib.xml
<queryModel name="DOMAIN_PUBLISHED_DOCUMENTS">
<pattern>
SELECT * FROM Document WHERE ecm:path STARTSWITH ? AND
ecm:mixinType != 'Folderish' AND ecm:mixinType != 'HiddenInNavigation'
AND ecm:isCheckedInVersion = 0 AND ecm:isProxy = 1
</pattern>
<sortable value="true" defaultSortColumn="dc:modified"
defaultSortAscending="false" />
<max>5</max>
</queryModel>
Create new query to satisfy your requirements, for example change ecm:mixinType
!= 'Folderish' with ecm:mixinType = 'Folderish' to list all folders that user
has access to them.
Last, to add newly created view to dashboard you should define something like
this:
/nuxeo-platform-webapp-core/src/main/resources/OSGI-INF/theme-contrib.xml
<view name="nuxeo5 last published documents"
template-engine="jsf-facelets">
<!-- Fragment to be displayed as part of the dashboard to display the
list of documents that have been published recently -->
<format-type>widget</format-type>
<template>incl/dashboard_last_published_documents.xhtml</template>
<resource>foldable-box.js</resource>
</view>
And from themes manager (with admin rights) to add it (this can be done
directly by modifying theme, too).
--
Posted by "plamen" at Nuxeo Discussions <http://nuxeo.org/discussions>
View the complete thread:
<http://www.nuxeo.org/discussions/thread.jspa?threadID=2635#7439>
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm
To unsubscribe, go to http://lists.nuxeo.com/mailman/options/ecm