mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
- Fixes to web client so PHP templates can rendered as custom views.
- Expended PHP JAva API to provide basic read-only implementations. This allows naviagtion of a node structure, retrieval of properties and content details. - Added relevant unit tests - Implemented and tested doc_info.php example template git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5599 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -40,12 +40,12 @@ import org.alfresco.filesys.smb.server.repo.ContentContext;
|
||||
import org.alfresco.filesys.smb.server.repo.ContentDiskInterface;
|
||||
import org.alfresco.model.ContentModel;
|
||||
import org.alfresco.repo.security.permissions.AccessDeniedException;
|
||||
import org.alfresco.repo.template.TemplateNode;
|
||||
import org.alfresco.service.cmr.repository.InvalidNodeRefException;
|
||||
import org.alfresco.service.cmr.repository.NodeRef;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.Path;
|
||||
import org.alfresco.service.cmr.repository.TemplateImageResolver;
|
||||
import org.alfresco.service.cmr.repository.TemplateService;
|
||||
import org.alfresco.service.cmr.rule.RuleService;
|
||||
import org.alfresco.service.cmr.search.SearchService;
|
||||
import org.alfresco.service.cmr.security.AuthenticationService;
|
||||
@@ -486,15 +486,16 @@ public class NavigationBean
|
||||
public Map getTemplateModel()
|
||||
{
|
||||
HashMap model = new HashMap(1, 1.0f);
|
||||
|
||||
FacesContext fc = FacesContext.getCurrentInstance();
|
||||
TemplateNode spaceNode = new TemplateNode(getCurrentNode().getNodeRef(), Repository.getServiceRegistry(fc),
|
||||
new TemplateImageResolver() {
|
||||
public String resolveImagePathForName(String filename, boolean small) {
|
||||
return Utils.getFileTypeImage(filename, small);
|
||||
}
|
||||
});
|
||||
model.put("space", spaceNode);
|
||||
|
||||
model.put("space", getCurrentNode().getNodeRef());
|
||||
model.put(TemplateService.KEY_IMAGE_RESOLVER,
|
||||
new TemplateImageResolver()
|
||||
{
|
||||
public String resolveImagePathForName(String filename, boolean small)
|
||||
{
|
||||
return Utils.getFileTypeImage(filename, small);
|
||||
}
|
||||
});
|
||||
|
||||
return model;
|
||||
}
|
||||
|
Reference in New Issue
Block a user