Skip to content

Commit

Permalink
[template]Improved
Browse files Browse the repository at this point in the history
  • Loading branch information
jfrocha committed Jul 24, 2024
1 parent b93e223 commit 5712cc2
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 213 deletions.
36 changes: 19 additions & 17 deletions templates/parts/surveyAlto/footer_part.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{% load static %}
<div class="d-flex justify-content-between">
<div class="container">
<ul class="nav flex-column flex-sm-row">
<li class="nav-item">
<a class="nav-link" href="https://nc3.lu" target="_blank" rel="noopener noreferrer">
Expand Down Expand Up @@ -29,20 +29,22 @@
</a>
</li>
</ul>
<ul class="nav flex-column flex-sm-row mt-2">
<li class="nav-item">
<a class="nav-link" href="{% url 'stats' %}" title="{{ _('Stats') }}" alt="{{ _('Stats') }}">{{ _('Stats') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'terms' %}" title="{{ _('Terms of Service') }}"
alt="{{ _('Terms of Service') }}">{{ _('Terms of Service') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'privacy' %}" title="{{ _('Privacy policy') }}"
alt="{{ _('Privacy policy') }}">{{ _('Privacy policy') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://lhc.lu" target="_blank" rel="noopener noreferrer">Copyright {% now "Y" %} Luxembourg House of Cybersecurity</a>
</li>
</ul>
<div class="">
<ul class="nav flex-column flex-sm-row d-flex justify-content-between">
<li class="nav-item">
<a class="nav-link" href="{% url 'stats' %}" title="{{ _('Stats') }}" alt="{{ _('Stats') }}">{{ _('Stats') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'terms' %}" title="{{ _('Terms of Service') }}"
alt="{{ _('Terms of Service') }}">{{ _('Terms of Service') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{% url 'privacy' %}" title="{{ _('Privacy policy') }}"
alt="{{ _('Privacy policy') }}">{{ _('Privacy policy') }}</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://lhc.lu" target="_blank" rel="noopener noreferrer">Copyright {% now "Y" %} Luxembourg House of Cybersecurity</a>
</li>
</ul>
</div>
</div>
53 changes: 28 additions & 25 deletions templates/surveyAlto/survey/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,41 +47,44 @@
</nav>
{% endif %}

<div class="container">
{% block main_logo %}
<div class="row">
<div class="col text-center">
<div class="mt-1">
{% include custom.templates_parts.main_logo %}
<div class="container min-vh-90 d-flex align-items-center justify-content-center">
<div>
{% block main_logo %}
<div class="row">
<div class="col text-center">
<div class="mt-1">
{% include custom.templates_parts.main_logo %}
</div>
</div>
</div>
</div>
{% endblock %}
{% endblock %}

{% if languages|length > 1 %}
<div class="dropdown d-flex flex-row-reverse" id="language-selector" >
<a class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-translate text-primary"></i>
{{ LANGUAGE_CODE|language_name_local }}
</a>
<div class="dropdown-menu">
{% for lang in languages %}
<a class="dropdown-item" href="/survey/language/{{ lang.code }}">
{{ lang.name_local }}
{% if languages|length > 1 %}
<div class="dropdown d-flex flex-row-reverse" id="language-selector" >
<a class="btn dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
<i class="bi bi-translate text-primary"></i>
{{ LANGUAGE_CODE|language_name_local }}
</a>
{% endfor %}
<div class="dropdown-menu">
{% for lang in languages %}
<a class="dropdown-item" href="/survey/language/{{ lang.code }}">
{{ lang.name_local }}
</a>
{% endfor %}
</div>
</div>
</div>
{% endif %}
{% endif %}

{% autoescape off %}{% bootstrap_messages %}{# {% bootstrap_alert content %} #}{% endautoescape %}
{% autoescape off %}{% bootstrap_messages %}{# {% bootstrap_alert content %} #}{% endautoescape %}

<div id="content-body">
{% block content %}{% endblock %}
<div id="content-body">
{% block content %}{% endblock %}
</div>
</div>
</div>


<div class="footer d-none d-md-block">
{% include custom.templates_parts.footer %}
</div>
</div>
{% endblock %}
172 changes: 1 addition & 171 deletions templates/surveyAlto/survey/finishedSurvey.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,184 +26,14 @@
{% block finished_survey_description %}
<p class="text-justify py-2 h5">
{% blocktranslate trimmed %}
Thank you for your participation in the ALTO project, a self-assessment tool dedicated to bringing SMEs into compliance with GDPR requirements.
<br><br>
Any SME is invited to express its interest in participating in the “Pilot” phase by e-mail to the e-mail address: <a href="mailto:alto@cnpd.lu">alto@cnpd.lu</a>
Nous vous remercions pour votre participation à DAAZ, outil de story-learning dédié à la mise en conformité des PME aux exigences du RGPD.
{% endblocktranslate %}
</p>
{% endblock %}
{% if custom.modules.requestTraining and user.get_country_code == 'LU' and txtscore < custom.minimal_acceptable_score %}
<p class="text-justify">
{% blocktranslate with score=string_score|add:'/100' trimmed %}
Based on your score {{ score }}, the NC3 Diagnostic
is not available for your organization at this moment.
We recommend you improve the information security maturity
level by implementing the recommendations listed below.
If you need any information security training to
raise awareness in your company, do not hesitate to
{% endblocktranslate %}
{% include 'survey/requestTrainingLink.html' with type='link' %}
</p>
{% endif %}
{% if bonus_score > 0 %}
<p class="text-justify">
{% blocktranslate trimmed with bonus=bonus_score %}
You have scored an additional {{ bonus }} % of bonus points for adherence to best practices.
{% endblocktranslate %}
</p>
{% endif %}

{% if custom.modules.requestDiagnostic and user.get_country_code == 'LU' and txtscore >= custom.minimal_acceptable_score %}
{% block finished_survey_diagnostic %}
<h2>{{ _('About the NC3 Diagnostic') }}:</h2>
<p class="text-justify">
{% blocktranslate trimmed %}
The NC3 Diagnostic is a service which analyses the company maturity
in the information security depending on company's requirements.
The analysis duration can take approximately 2 hours.
A consultant from NC3 will come to your company's premises,
and ask around 30 questions concerning your information security,
mostly organizational questions and possibly some technical questions.
You will receive a detailed report which will contain a maturity estimation
as well as recommendations to enhance the information security maturity.
{% endblocktranslate %}
<p>
<p class="text-justify">
{% blocktranslate trimmed %}
The NC3 Diagnostic is available for all the companies
located in Luxembourg and free of charge.
{% endblocktranslate %}
</p>
{% endblock %}
{% endif %}
</div>
{% if custom.modules.reportDownload %}
<div class="col-2 py-4">
<div class="border rounded border-primary bg-bright-blue">
<div class="text-center">
{% if custom.modules.displayResults %}
<h3>
{% if txtscore < 50 %}
<span class="font-weight-bold text-danger">{{ string_score }}</span>
{% elif txtscore < custom.minimal_acceptable_score %}
<span class="font-weight-bold text-warning">{{ string_score }}</span>
{% else %}
<span class="font-weight-bold text-success">{{ string_score }}</span>
{% endif %}
<span>/100</span>
</h3>
{% endif %}
{% if user.get_country_code == 'LU' %}
{% if txtscore >= custom.minimal_acceptable_score and custom.modules.requestDiagnostic %}
<div class="px-2 pb-2">
{% include 'survey/requestDiagnosticLink.html' with type='button' %}
</div>
{% endif %}
{% if custom.modules.requestTraining %}
<div class="px-2">
{% include 'survey/requestTrainingLink.html' with type='button' %}
</div>
{% endif %}
{% endif %}
</div>
<h4 class="px-2">{{ _('Report') }}:</h4>
<div class="w-50 mx-auto">
<img class="img-fluid" src="{% static 'images/reportLogo.png' %}" alt="DOC ICON">
</div>
<div class="text-center p-2">
<a href="{{ reportlink }}" id="download-report">
<button class="btn btn-sm btn-block border border-rounded btn-primary" type="button">
{{ _('Download') }}
</button>
</a>
{% if custom.modules.reportEmail %}
<button
class="btn btn-sm btn-block border border-rounded btn-primary"
type="button"
name="modal-send-report"
data-toggle="modal"
data-target="#modal-send-report">
{{ _('Email') }}
</button>
{% endif %}
</div>
</div>
</div>

{% endif %}
{% if custom.modules.displayResults %}
<div class="col-6 py-4">
<h4 class="text-center">
{{ _('Score by section') }}
</h4>
<canvas id="chartBySections"></canvas>
</div>
<div class="col-6 py-4">
<h4 class="text-center">
{{ _('Score by category') }}
</h4>
<canvas id="chartByCategory"></canvas>
</div>
<script>
var sectionsLabels = {{ sectionsLabels | safe }}
var sectionsData = {{ sectionsData | safe }}
var categoriesLabels = {{ categoriesLabels | safe }}
var categoriesData = {{ categoriesData | safe }}
</script>
{% endif %}
<div class="col-12 py-4">
{% for category, items in recommendations.items %}
<h4>{{ category | safe }}</h4>
<ol>
{% with False as isSubList %}
{% for recommendation in items %}
<li class="text-justify">{{ recommendation | safe }}</li>

{% if recommendation|slice:"-1:" == ":" %}
<ul>
{% update_variable True as isSubList %}
{% endif %}
{% if forloop.last and isSubList %}
</ul>
{% endif %}

{% endfor %}
{% endwith %}
</ol>
{% endfor %}
</div>
</div>

<div id="cover-spin"></div>
<div class="modal fade"
tabindex="-2"
role="dialog"
id="modal-feedback"
aria-labelledby="{{ custom.tool_name }} Feedback"
aria-hidden="true">
<div class="modal-dialog" role="document">
<div class="modal-header">
<h4>{{ _('Your feedback') }}</h4>
</div>
<div class="modal-content">
<form action="/survey/feedback" method="POST">
{% csrf_token %}
{% bootstrap_form general_feedback_form label_class="d-none" %}
<div class="content">
<button class="close-popup btn btn-link float-left"
type="button"
data-dismiss="modal">
{{ _('Close') }}
</button>
<input
type="submit"
class="btn btn-primary float-right"
value="{{ _('Send') }}">
</div>
</form>
</div>
</div>
</div>

{% include 'survey/continue.html' %}
{% include 'survey/leaveSurvey.html' %}
Expand Down

0 comments on commit 5712cc2

Please sign in to comment.