Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Libriciel
web-DPO
Commits
78f96463
Commit
78f96463
authored
Aug 10, 2020
by
Théo GUILLON
Browse files
Correction : affichage du titre sur le bouton de la FAQ
parent
d37e18a2
Changes
3
Hide whitespace changes
Inline
Side-by-side
app/Locale/fra/LC_MESSAGES/default.po
View file @
78f96463
...
...
@@ -151,6 +151,9 @@ msgstr "Action"
msgid "default.titreFAQ"
msgstr "FAQ"
msgid "default.titleFAQ"
msgstr "Foire aux questions"
msgid "default.sousTitreToutesLaFAQ"
msgstr "Toute la FAQ"
...
...
app/View/Helper/WebdpoMenuHelper.php
View file @
78f96463
...
...
@@ -21,13 +21,15 @@ class WebdpoMenuHelper extends AppHelper {
* @fixme
* @return string
*/
public
function
main
(
$items
,
$disabledTag
=
'a'
,
$level
=
0
,
$extraTopUlClass
=
null
)
{
public
function
main
(
$items
,
$disabledTag
=
'a'
,
$level
=
0
,
$extraTopUlClass
=
null
)
{
$return
=
''
;
foreach
(
$items
as
$key
=>
$item
)
{
if
(
is_numeric
(
$key
)
&&
$item
===
'divider'
)
{
$return
.
=
$this
->
Html
->
tag
(
'li'
,
'<!---->'
,
array
(
'class'
=>
'divider'
)
);
$return
.
=
$this
->
Html
->
tag
(
'li'
,
'<!---->'
,
[
'class'
=>
'divider'
]
);
}
elseif
(
is_numeric
(
$key
)
&&
is_string
(
$item
))
{
$return
.
=
$this
->
Html
->
tag
(
'li'
,
$item
,
array
(
'class'
=>
'dropdown-header'
)
);
$return
.
=
$this
->
Html
->
tag
(
'li'
,
$item
,
[
'class'
=>
'dropdown-header'
]
);
}
elseif
(
!
isset
(
$item
[
'disabled'
])
||
!
$item
[
'disabled'
])
{
$sub
=
$item
;
$title
=
(
isset
(
$sub
[
'title'
])
?
$sub
[
'title'
]
:
false
);
...
...
@@ -45,7 +47,7 @@ class WebdpoMenuHelper extends AppHelper {
$sub
=
$this
->
main
(
$sub
,
$disabledTag
,
$level
+
1
);
$content
=
''
;
$htmlOptions
=
array
(
'title'
=>
$title
)
;
$htmlOptions
=
[
'title'
=>
$title
]
;
// Cas array('url' => array('controller' => 'moncontroller', 'action' => 'monaction'))
if
(
isset
(
$item
[
'url'
][
'controller'
])
&&
$item
[
'url'
][
'controller'
]
!==
'/'
)
{
...
...
@@ -65,7 +67,7 @@ class WebdpoMenuHelper extends AppHelper {
if
(
isset
(
$item
[
'url'
])
&&
(
$item
[
'url'
]
!=
'#'
))
{
$url
=
$item
[
'url'
];
if
(
is_array
(
$url
))
{
$url
+=
array
(
'plugin'
=>
null
)
;
$url
+=
[
'plugin'
=>
null
]
;
}
$content
.
=
$this
->
Html
->
link
(
...
...
@@ -75,10 +77,12 @@ class WebdpoMenuHelper extends AppHelper {
$extra
+
[
'escape'
=>
false
]
)
.
$sub
;
}
else
if
(
!
empty
(
$sub
))
{
$htmlOptions
=
array
();
$htmlOptions
=
[];
if
(
$disabledTag
==
'a'
)
{
$htmlOptions
[
'href'
]
=
'#'
;
}
if
(
$level
===
0
)
{
$caret
=
$this
->
Html
->
tag
(
'span'
,
'<!---->'
,
[
'class'
=>
'caret'
]);
$content
.
=
$this
->
Html
->
tag
(
$disabledTag
,
$key
.
$caret
,
[
'class'
=>
'dropdown-toggle'
,
'data-toggle'
=>
'dropdown'
]
+
$htmlOptions
)
.
$sub
;
...
...
@@ -88,7 +92,7 @@ class WebdpoMenuHelper extends AppHelper {
}
$liClass
=
(
empty
(
$sub
)
?
''
:
(
$level
===
0
?
'dropdown'
:
'dropdown-submenu'
)
);
$return
.
=
empty
(
$content
)
?
''
:
$this
->
Html
->
tag
(
'li'
,
$content
,
array
(
'class'
=>
$liClass
)
);
$return
.
=
empty
(
$content
)
?
''
:
$this
->
Html
->
tag
(
'li'
,
$content
,
[
'class'
=>
$liClass
,
'title'
=>
$title
]
);
}
}
$ulParams
=
$level
===
0
...
...
app/View/Layouts/default.ctp
View file @
78f96463
...
...
@@ -499,6 +499,7 @@
$items += [
'' => [
'class' => 'fa-question-circle fa-lg',
'title' => __d('default', 'default.titleFAQ'),
'url' => [
'controller' => 'articles',
'action' => 'faq',
...
...
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