Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
pdn-certic
MaX
Commits
73e01ab3
Commit
73e01ab3
authored
Dec 07, 2016
by
chauveau
Browse files
correctifs chemins / i18n sous menus
parent
0c1c7563
Changes
3
Hide whitespace changes
Inline
Side-by-side
max.xq
View file @
73e01ab3
...
...
@@ -305,6 +305,7 @@ function max:getHTMLByID($project, $id, $xsl, $xslparams as xs:string *, $wrap a
declare
%rest:GET
%output:method
(
"html"
)
%output:indent
(
"no"
)
%rest:path
(
"/editions/{$project}/doc/{$doc=.*\.xml|.*\.svg}"
)
function
max:getFullDocument
(
$project
,
$doc
){
...
...
plugins/index/index.xqm
View file @
73e01ab3
...
...
@@ -98,8 +98,7 @@ function max.plugin.index:index($project){
else max.plugin.index:generateIndex($project)
};
declare %private
function max.plugin.index:generateIndex($project){
declare function max.plugin.index:generateIndex($project){
try{
let $indexFilePath :=file:parent(file:parent(file:parent(static-base-uri()))) || '/editions/'||$project||'/fragments/index.frag.html'
let $dbPath := max.config:getProjectDBPath($project)
...
...
rxq/html.xqm
View file @
73e01ab3
...
...
@@ -361,8 +361,8 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){
<
div
id
=
"
sub-navbar
"
class
=
"
collapse navbar-collapse
"
>
<
ul
class
=
"
nav navbar-nav
"
>
{
for
$c
in
$parentEntry
/
subentry
let
$target
:
=
$
c
/
target
/
text
()
let
$label
:
=
max
.
i18n
:
getText
(
$projectId
,
"
menu.
"
||
$
c
/
id
/
text
())
let
$target
:
=
$
docMenu
//entry[./id=$c/text()]
/target/text()
let
$label
:
=
max
.
i18n
:
getText
(
$projectId
,
"
menu.
"
||
$
docMenu
//entry[./id=$c/text()]
/id/text())
return
<
li
><
a
href
=
"
{$target}
"
>
{
if
(
not
(
$label
=
'
menu.
'
))
then
$label
else
$c
/
text
()}
<
/a></
li
>
}
<
/ul
>
...
...
@@ -381,18 +381,15 @@ declare %private function max.html:buildSubMenu($projectId, $pageId){
(:
gets
a
project
static
HTML
fragment
(
wrapped
in
an
html
div
):)
declare
function
max
.
html
:
getHTMLFragment
(
$project
,
$fragmentName
as
xs
:
string
)
as
element
(
div
){
let
$fragmentPath
:
=
concat
(
"
../editions/
"
,
$project
,
"
/fragments/
"
,
$fragmentName
,
"
.frag.html
"
)
return
<
div
id
=
'
content
'
>
{
doc
(
$fragmentPath
)}
<
/div
>
let
$fragmentPath
:
=
max
.
util
:
maxHome
()
||
"
/editions/
"
||
$project
||
"
/fragments/
"
||
$fragmentName
||
"
.frag.html
"
return
<
div
id
=
'
content
'
>
{
doc
(
$fragmentPath
)}
<
/div>
};
(:
gets
a
project
static
HTML
fragment
(
wrapped
in
an
html
div
):)
declare
function
max
.
html
:
getHTMLFragmentFile
(
$project
,
$fragmentFile
as
xs
:
string
)
as
element
(){
let
$fragmentPath
:
=
concat
(
"
../
"
,
$fragmentFile
)
let
$fragmentPath
:
=
max
.
util
:
maxHome
()
||
'
/
'
||
$fragmentFile
return
doc
(
$fragmentPath
)
/*[1]
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment