Uploaded image for project: 'Nuxeo Platform'
  1. Nuxeo Platform
  2. NXP-9104

Improve Template Mangement module

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 5.6-SNAPSHOT
    • Fix Version/s: 5.6-RC1, 5.6
    • Component/s: None

      Description

      • (bug) HTML is not interpreted when doing an include with a content coming from xpath

      About creating the model

      • Rename "template document" by "Document template"
      • Make it possible to create Document template at the root of template root.
      • Add "Document template" in the "Documents" category
      • Note: I think we should, like it is currently, let the people create templates everywhere.
      • Make it possible to choose the target rendition in the initial wizard, if the user selected "rendition" for the template usage
      • Withdraw "Create a rendition for the web" (until we find a valuable usage)

      Modify tab

      • Just allow to update the title, File, description and nature here. Move all other parameters on the Template parameters tab, and rename this tab "Template configuration"

      Template configuration tab with 2 parts

      • Like now, but with a toggle mode for each part, leveraging new Anahide's widget
      • "Template configuration"
        • translate "label.rendition.none"
        • Rename "Supported Document Type" with: "Document types for which the template is available"
        • Rename "Use template file as main content if possible" by "Template is editable on the document (office template)"
      • "Template parameters"
        • Make it possible to delete a parameter once it has been added.

      Other tabs and actions

      • Remove following tabs on the template:
        • Files
        • Publishing
      • Remove "Bind Template" action on Template model (it is confusing).

      • Prevent from deleting a template if a document is bound to it
      • In the listener that binds templates automatically, filter out templates that are in deleted state.

      On a document itself:

      • Associate templates tab
        • Remove "Render and store" ? (I don't see the use case, and it is dangerous, as it remove the main file without alerting the user, unless there is a bug and the idea is to render and store on the rendition.
        • Template parameters can be overridden even if it is not checked on the template
        • When we editing from there the template parameters, the fact that it is in "edit mode" stays in memory, and if the user goes to another document, on the associated templates tab, it is still the parameters edition screen that is displayed
      • Bug: my template is not bound automatically, but can't know why.
      • (bug) when picture is null:
        Caused by: freemarker.template.TemplateModelException: Method public java.lang.String fr.opensagres.xdocreport.document.images.AbstractImageRegistry.getWidth(fr.opensagres.xdocreport.document.images.IImageProvider,java.lang.String) throws java.io.IOException threw an exception when invoked on fr.opensagres.xdocreport.document.docx.images.DocxImageRegistry@438e2fc5
        at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:136)
        at freemarker.core.MethodCall._getAsTemplateModel(MethodCall.java:93)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        at freemarker.core.Expression.getStringValue(Expression.java:93)
        at freemarker.core.StringBuiltins$StringBuiltIn._getAsTemplateModel(StringBuiltins.java:71)
        at freemarker.core.Expression.getAsTemplateModel(Expression.java:89)
        at freemarker.core.Expression.getStringValue(Expression.java:93)
        at freemarker.core.DollarVariable.accept(DollarVariable.java:76)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.EscapeBlock.accept(EscapeBlock.java:84)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.MixedContent.accept(MixedContent.java:92)
        at freemarker.core.Environment.visit(Environment.java:208)
        at freemarker.core.Environment.process(Environment.java:188)
        at fr.opensagres.xdocreport.template.freemarker.FreemarkerTemplateEngine.process(FreemarkerTemplateEngine.java:142)
        ... 103 more
        Caused by: freemarker.template.TemplateModelException: Could not convert an instance of freemarker.ext.beans.StringModel with value [java.lang.Object@774e834c] to fr.opensagres.xdocreport.document.images.IImageProvider
        at freemarker.ext.beans.BeansWrapper.canNotConvert(BeansWrapper.java:815)
        at freemarker.ext.beans.BeansWrapper.unwrap(BeansWrapper.java:753)
        at freemarker.ext.beans.BeansWrapper.unwrap(BeansWrapper.java:544)
        at freemarker.ext.beans.BeansWrapper.unwrapArguments(BeansWrapper.java:837)
        at freemarker.ext.beans.SimpleMethodModel.exec(SimpleMethodModel.java:109)

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: