Loading plugins/ead_basket/ead_basket.xqm +1 −1 Changes for plugins/ead_basket/ead_basket.xqm: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ function max.plugin.ead_basket:basketpdf($projectId, $items){ </body> </html> let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl") let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl",$projectId) return (<rest:response> Loading plugins/ead_pdf/README.md +1 Changes for plugins/ead_pdf/README.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Plugin pour générer des pdf pour un projet en EAD plugins/ead_pdf/ead2pdf.xqm +31 Changes for plugins/ead_pdf/ead2pdf.xqm: 31 added lines, 0 removed lines. Original line number Diff line number Diff line (: For conditions of distribution and use, see the accompanying legal.txt file. :) module namespace max.plugins.ead2pdf = 'pddn/max/plugins/ead2pdf.xqm'; import module namespace max.config = 'pddn/max/config' at '../../rxq/config.xqm'; import module namespace max.api = 'pddn/max/max_api' at '../../rxq/max_api.xqm'; import module namespace max.util = 'pddn/max/util' at '../../rxq/util.xqm'; declare %rest:GET %rest:produces("application/pdf") %rest:path("/{$project}/{$routeDoc=.*\.xml}/ead/{$id}.pdf") function max.plugins.ead2pdf:fragmentToPDF($project, $routeDoc, $id){ let $dbPath := max.config:getProjectDBPath($project) let $eadHeader := doc($dbPath || '/' || $routeDoc)//*:eadheader/node() let $content:= <ead xmlns="urn:isbn:1-931666-22-9"> <eadheader>{$eadHeader}</eadheader> <archdesc>{max.api:getXMLByID($dbPath, $id)}</archdesc> </ead> (: return $content :) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project), $project) return (<rest:response> <http:response status="200"> <http:header name="content-type" value="application/pdf"/> </http:response> </rest:response>, $pdf) }; No newline at end of file plugins/ead_pdf/ead_pdf.css +10 Changes for plugins/ead_pdf/ead_pdf.css: 10 added lines, 0 removed lines. Original line number Diff line number Diff line .ead2pdf { margin-left:0px; position:absolute; top:-1px; } section.browse > div > div[id*="wrap"] { margin-top: 20px; padding-top:0px; } No newline at end of file plugins/ead_pdf/ead_pdf.xq +9 Changes for plugins/ead_pdf/ead_pdf.xq: 9 added lines, 0 removed lines. Original line number Diff line number Diff line declare variable $id external; <div class="ead2pdf"> <a role="button" title="Export pdf" target="_blank" href="./ead/{$id}.pdf"> ⇪ </a> </div> Loading
plugins/ead_basket/ead_basket.xqm +1 −1 Changes for plugins/ead_basket/ead_basket.xqm: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ function max.plugin.ead_basket:basketpdf($projectId, $items){ </body> </html> let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl") let $pdf := max.util:xml2pdf($content, max.util:maxHome()||"ui/xsl/xhtml2fo.xsl",$projectId) return (<rest:response> Loading
plugins/ead_pdf/README.md +1 Changes for plugins/ead_pdf/README.md: 1 added line, 0 removed lines. Original line number Diff line number Diff line Plugin pour générer des pdf pour un projet en EAD
plugins/ead_pdf/ead2pdf.xqm +31 Changes for plugins/ead_pdf/ead2pdf.xqm: 31 added lines, 0 removed lines. Original line number Diff line number Diff line (: For conditions of distribution and use, see the accompanying legal.txt file. :) module namespace max.plugins.ead2pdf = 'pddn/max/plugins/ead2pdf.xqm'; import module namespace max.config = 'pddn/max/config' at '../../rxq/config.xqm'; import module namespace max.api = 'pddn/max/max_api' at '../../rxq/max_api.xqm'; import module namespace max.util = 'pddn/max/util' at '../../rxq/util.xqm'; declare %rest:GET %rest:produces("application/pdf") %rest:path("/{$project}/{$routeDoc=.*\.xml}/ead/{$id}.pdf") function max.plugins.ead2pdf:fragmentToPDF($project, $routeDoc, $id){ let $dbPath := max.config:getProjectDBPath($project) let $eadHeader := doc($dbPath || '/' || $routeDoc)//*:eadheader/node() let $content:= <ead xmlns="urn:isbn:1-931666-22-9"> <eadheader>{$eadHeader}</eadheader> <archdesc>{max.api:getXMLByID($dbPath, $id)}</archdesc> </ead> (: return $content :) let $pdf := max.util:xml2pdf($content, max.util:getProjectFoXsl($project), $project) return (<rest:response> <http:response status="200"> <http:header name="content-type" value="application/pdf"/> </http:response> </rest:response>, $pdf) }; No newline at end of file
plugins/ead_pdf/ead_pdf.css +10 Changes for plugins/ead_pdf/ead_pdf.css: 10 added lines, 0 removed lines. Original line number Diff line number Diff line .ead2pdf { margin-left:0px; position:absolute; top:-1px; } section.browse > div > div[id*="wrap"] { margin-top: 20px; padding-top:0px; } No newline at end of file
plugins/ead_pdf/ead_pdf.xq +9 Changes for plugins/ead_pdf/ead_pdf.xq: 9 added lines, 0 removed lines. Original line number Diff line number Diff line declare variable $id external; <div class="ead2pdf"> <a role="button" title="Export pdf" target="_blank" href="./ead/{$id}.pdf"> ⇪ </a> </div>