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
OSUG
JMMC
jmmc-jmdcui-docker
Commits
0648fb5f
Commit
0648fb5f
authored
Jan 16, 2020
by
Guillaume Mella
Browse files
do not show error toggle button when no problem is present
parent
97e97605
Changes
2
Hide whitespace changes
Inline
Side-by-side
jmdc-ui/jmdc_app/templates/submit_errors.jinja2
View file @
0648fb5f
{% if entries %}
{% if has_problem %}
<a onclick="$(".erroronly").toggleClass("hidden");" class="dt-button"><span class="erroronly btn btn-warning btn-xs hidden">show all</span><span class="erroronly btn btn-success btn-xs">show error only</span></a>
{% endif %}
<div class="entry-info">
{% for entry in entries %}
{% if entry.entry.warnings or entry.entry.errors or not entry.entry.unique %}
...
...
jmdc-ui/jmdc_app/views/verify.py
View file @
0648fb5f
...
...
@@ -34,7 +34,7 @@ def send_email_to_moderator(settings, moderate_url):
# TODO: change the mail subject
message
=
Message
(
subject
=
"there is one submission to moderate"
,
sender
=
sender
,
recipients
=
[
moderator
],
body
=
"There is a new submission at JMDC, moderation can be done here :
\n
%s
\n
Regards!"
%
moderate_url
)
body
=
"There is a new submission at JMDC, moderation can be done here :
\n
%s
\n
Regards!"
%
moderate_url
)
mailer
=
Mailer
.
from_settings
(
settings
)
mailer
.
send
(
message
)
...
...
@@ -211,6 +211,7 @@ def moderate_submission(request):
if
k
not
in
problem_fields
:
problem_fields
.
append
(
k
)
problem_fields
.
sort
()
context
[
'has_problem'
]
=
True
entry
[
'problem_fields'
]
=
problem_fields
entries
.
append
({
'line'
:
e
.
line_number
-
1
,
'entry'
:
entry
})
context
[
'entries'
]
=
entries
...
...
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