Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Galette
Galette
Commits
2b533a27
Commit
2b533a27
authored
Jun 23, 2022
by
Guillaume Agniéray
Committed by
Johan Cwiklinski
Jun 23, 2022
Browse files
Restore inline messages for warnings and errors
parent
c293a2e9
Changes
3
Hide whitespace changes
Inline
Side-by-side
galette/templates/default/elements/messages_inline.html.twig
View file @
2b533a27
...
...
@@ -6,14 +6,23 @@
{%
endfor
%}
{%
endif
%}
{%
if
loginfaults
is
iterable
and
loginfaults
|
length
>
0
%}
<div
class=
"ui negative message"
>
<i
class=
"close icon"
></i>
<div
class=
"header"
>
{{
_T
(
"- ERROR -"
)
}}
</div>
<ul>
{%
for
loginfault
in
loginfaults
%}
<li>
{{
loginfault
}}
</li>
{%
endfor
%}
</ul>
<div
class=
"ui error icon message with-transition"
>
<i
class=
"times icon"
></i>
<i
class=
"window close outline icon"
></i>
<div
class=
"content"
>
<div
class=
"header"
>
{{
_T
(
"- ERROR -"
)
}}
</div>
{%
if
loginfaults
|
length
>
1
%}
<ul
="
list
"
>
{%
for
loginfault
in
loginfaults
%}
<li>
{{
loginfault
}}
</li>
{%
endfor
%}
</ul>
{%
else
%}
{%
for
loginfault
in
loginfaults
%}
<p>
{{
loginfault
}}
</p>
{%
endfor
%}
{%
endif
%}
</div>
</div>
{%
endif
%}
...
...
@@ -25,14 +34,23 @@
{%
endfor
%}
{%
endif
%}
{%
if
errors
is
iterable
and
errors
|
length
>
0
%}
<div
class=
"ui negative message"
>
<i
class=
"close icon"
></i>
<div
class=
"header"
>
{{
_T
(
"- ERROR -"
)
}}
</div>
<ul>
{%
for
error
in
errors
%}
<li>
{{
error
}}
</li>
{%
endfor
%}
</ul>
<div
class=
"ui error icon message with-transition"
>
<i
class=
"times icon"
></i>
<i
class=
"window close outline icon"
></i>
<div
class=
"content"
>
<div
class=
"header"
>
{{
_T
(
"- ERROR -"
)
}}
</div>
{%
if
errors
|
length
>
1
%}
<ul
="
list
"
>
{%
for
error
in
errors
%}
<li>
{{
error
}}
</li>
{%
endfor
%}
</ul>
{%
else
%}
{%
for
error
in
errors
%}
<p>
{{
error
}}
</p>
{%
endfor
%}
{%
endif
%}
</div>
</div>
{%
endif
%}
...
...
@@ -44,14 +62,23 @@
{%
endfor
%}
{%
endif
%}
{%
if
warnings
is
iterable
and
warnings
|
length
>
0
%}
<div
class=
"ui negative message"
>
<i
class=
"close icon"
></i>
<div
class=
"header"
>
{{
_T
(
"- WARNING -"
)
}}
</div>
<ul>
{%
for
warning
in
warnings
%}
<li>
{{
warning
}}
</li>
{%
endfor
%}
</ul>
<div
class=
"ui warning icon message with-transition"
>
<i
class=
"exclamation icon"
></i>
<i
class=
"window close outline icon"
></i>
<div
class=
"content"
>
<div
class=
"header"
>
{{
_T
(
"- WARNING -"
)
}}
</div>
{%
if
warnings
|
length
>
1
%}
<ul
="
list
"
>
{%
for
warning
in
warnings
%}
<li>
{{
warning
}}
</li>
{%
endfor
%}
</ul>
{%
else
%}
{%
for
warning
in
warnings
%}
<p>
{{
warning
}}
</p>
{%
endfor
%}
{%
endif
%}
</div>
</div>
{%
endif
%}
...
...
@@ -63,24 +90,40 @@
{%
endfor
%}
{%
endif
%}
{%
if
successs
is
iterable
and
successs
|
length
>
0
%}
<div
class=
"ui negative message"
>
<i
class=
"close icon"
></i>
<ul>
{%
for
success
in
successs
%}
<li>
{{
success
}}
</li>
{%
endfor
%}
</ul>
</div>
<noscript>
<div
class=
"ui success icon message"
>
<i
class=
"check circle outline icon"
></i>
<i
class=
"window close outline icon"
></i>
<div
class=
"content"
>
{%
if
successs
|
length
>
1
%}
<ul
="
list
"
>
{%
for
success
in
successs
%}
<li>
{{
success
}}
</li>
{%
endfor
%}
</ul>
{%
else
%}
{%
for
success
in
successs
%}
<p>
{{
success
}}
</p>
{%
endfor
%}
{%
endif
%}
</div>
</div>
</noscript>
{%
endif
%}
{# Renew telemetry #}
{%
if
renew_telemetry
is
defined
and
renew_telemetry
%}
{%
include
"modals/telemetry.html.twig"
with
{
part
:
"dialog"
}
%}
<div
class=
"ui blue message"
id=
"renewbox"
>
{{
_T
(
"Your telemetry data are more than one year old."
)
}}
<br/>
{{
_T
(
"Do you want to send it again?"
)
}}
<br/>
<a
href=
"#"
id=
"telemetry"
>
{{
_T
(
"Yes"
)
}}
</a>
-
<a
href=
"#"
id=
"norenew"
>
{{
_T
(
"No"
)
}}
</a>
-
<a
href=
"#"
id=
"renewlater"
>
{{
_T
(
"Later"
)
}}
</a>
</div>
<noscript>
<div
class=
"ui info icon message"
id=
"renewbox"
>
<i
class=
"info icon"
></i>
<div
class=
"content"
>
<div
class=
"header"
>
{{
_T
(
"Your telemetry data are more than one year old."
)
}}
</div>
<p>
{{
_T
(
"Do you want to send it again?"
)
}}
</p>
<a
href=
"#"
id=
"telemetry"
class=
"ui large green button"
>
{{
_T
(
"Yes"
)
}}
</a>
<a
href=
"#"
id=
"norenew"
class=
"ui large red button"
>
{{
_T
(
"No"
)
}}
</a>
<a
href=
"#"
id=
"renewlater"
class=
"ui large blue button"
>
{{
_T
(
"Later"
)
}}
</a>
</div>
</div>
</noscript>
{%
endif
%}
galette/templates/default/page.html.twig
View file @
2b533a27
...
...
@@ -37,7 +37,7 @@
</a>
{%
endif
%}
</h1>
<noscript>
{%
include
"elements/messages_inline.html.twig"
%}
</noscript>
{%
include
"elements/messages_inline.html.twig"
%}
{%
block
content
%}{{
_T
(
'Page content'
)
}}{%
endblock
%}
{%
include
"elements/footer.html.twig"
%}
</section>
...
...
galette/templates/default/public_page.html.twig
View file @
2b533a27
...
...
@@ -34,7 +34,7 @@
</div>
{%
endif
%}
<h1
class=
"ui block center aligned header"
>
{{
page_title
}}
</h1>
<noscript>
{%
include
"elements/messages_inline.html.twig"
%}
</noscript>
{%
include
"elements/messages_inline.html.twig"
%}
{%
block
content
%}{{
_T
(
"Public page content"
)
}}{%
endblock
%}
{%
include
"elements/footer.html.twig"
%}
</section>
...
...
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