Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final djLint fixes #701

Merged
merged 4 commits into from
Apr 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions rocky/account/templates/password_reset_done.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@
{% block content %}
{% include "header.html" %}

<!-- djlint:off H020 -->
<main>
<section>
</section>
</main>
<!-- djlint:on -->
{% endblock content %}
2 changes: 2 additions & 0 deletions rocky/onboarding/templates/partials/cat_loader.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

<div class="cat-loader-wrapper">
<div class="cat-loader" aria-hidden="true">
<!-- djlint:off H013 -->
<img class="ear-left" src="{% static "img/loader/ear_left.svg" %}"/>
<img class="ear-right" src="{% static "img/loader/ear_right.svg" %}"/>
<img class="head" src="{% static "img/loader/head.svg" %}"/>
Expand All @@ -11,5 +12,6 @@
<img class="line" src="{% static "img/loader/yarn.svg" %}"/>
<img class="ball" src="{% static "img/loader/ball.svg" %}"/>
<img class="paw" src="{% static "img/loader/paw.svg" %}"/>
<!-- djlint:on -->
</div>
</div>
2 changes: 1 addition & 1 deletion rocky/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,4 @@ omit = ["fmea/*"]
max_line_length = 120
blank_line_after_tag = "load,extends,include"
# https://www.djlint.com/docs/linter/#rules
ignore = "H006,H013,H014,H016,H017,H019,H020,H023,H025,H030,H031,H033"
ignore = "H006,H016,H017,H030,H031"
59 changes: 29 additions & 30 deletions rocky/rocky/templates/dashboard_redteam.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,33 +50,32 @@
</header>
<main id="main-content">
<section>
<div>
<h1>{% translate "Welcome" %}</h1>
<div class="horizontal-scroll">
<table>
<caption>{% translate "User overview:" %}</caption>
<thead>
<tr>
<th>User</th>
<th>Active organization</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ user.username }}</td>
<td>{{ organization.name }}</td>
{% if organization.code %}
<td>{{ organization.code }}</td>
{% else %}
<td class="warning" aria-label="{% translate "warning" %}">
<span>{% translate "Warning" %}:</span> {% translate "Organization code missing" %}
</td>
{% endif %}
</tr>
</tbody>
</table>
</div>
</section>
</main>
{% endblock content %}
<h1>{% translate "Welcome" %}</h1>
<div class="horizontal-scroll">
<table>
<caption>{% translate "User overview:" %}</caption>
<thead>
<tr>
<th>User</th>
<th>Active organization</th>
<th>Code</th>
</tr>
</thead>
<tbody>
<tr>
<td>{{ user.username }}</td>
<td>{{ organization.name }}</td>
{% if organization.code %}
<td>{{ organization.code }}</td>
{% else %}
<td class="warning" aria-label="{% translate "warning" %}">
<span>{% translate "Warning" %}:</span> {% translate "Organization code missing" %}
</td>
{% endif %}
</tr>
</tbody>
</table>
</div>
</section>
</main>
{% endblock content %}
21 changes: 10 additions & 11 deletions rocky/rocky/templates/indemnification_present.html
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{% load i18n %}

<div>
<h1>{% translate "Indemnification" %}</h1>
<div class="explanation">
<p>{% translate "Indemnification on the organization present. You may now add objects and start scans." %}</p>
<p>
{% translate "Go to" %} <a href="{% url 'ooi_list' organization.code %}">{% translate "Objects" %}</a>
</p>
<p>
{% translate "Go to" %} <a href="{% url "katalogus" organization.code %}">KAT-alogus</a>
</p>
</div>
<h1>{% translate "Indemnification" %}</h1>
<div class="explanation">
<p>{% translate "Indemnification on the organization present. You may now add objects and start scans." %}</p>
<p>
{% translate "Go to" %} <a href="{% url 'ooi_list' organization.code %}">{% translate "Objects" %}</a>
</p>
<p>
{% translate "Go to" %} <a href="{% url "katalogus" organization.code %}">KAT-alogus</a>
</p>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@
{% endfor %}
<input type="submit"
value="{% if submit_text %}{{ submit_text }}{% else %}{% translate "Set filters" %}{% endif %}"/>
</fieldset>
</form>
4 changes: 2 additions & 2 deletions rocky/rocky/templates/partials/list_paginator.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<li>
<a aria-label="{% translate "Five Pages Back" %}"
href="{{ request.path }}?{% url_replace page_param|default:"page" page_obj.number|add:'-5' %}">
&hellip;
</a>
</li>
{% endif %}
Expand All @@ -37,7 +37,7 @@
<li>
<a aria-label="{% translate "Five Pages Forward" %}"
href="{{ request.path }}?{% url_replace page_param|default:"page" page_obj.number|add:'5' %}">
&hellip;
</a>
</li>
{% endif %}
Expand Down
4 changes: 2 additions & 2 deletions rocky/rocky/templates/partials/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
<nav class="pagination horizontal-view">
<span class="current">{% translate "Page" %} {{ page_obj.number }} {% translate "of" %} {{ page_obj.paginator.num_pages }}.</span>
{% if page_obj.has_previous %}
<a href="?page=1">&laquo; {% translate "first" %}</a>
<a href="?page=1">« {% translate "first" %}</a>
<a href="?page={{ page_obj.previous_page_number }}">{% translate "previous" %}</a>
{% endif %}
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}">{% translate "next" %}</a>
<a href="?page={{ page_obj.paginator.num_pages }}">{% translate "last" %} &raquo;</a>
<a href="?page={{ page_obj.paginator.num_pages }}">{% translate "last" %} »</a>
{% endif %}
</nav>
{% endif %}
2 changes: 1 addition & 1 deletion rocky/rocky/templates/partials/scan_history.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ <h2>{% translate "Scans" %}</h2>
</select>
</fieldset>
<fieldset>
<label for"scan_history_search">{% translate "Search" %}</label>
<label for="scan_history_search">{% translate "Search" %}</label>
<input type="text"
name="scan_history_search"
id="scan_history_search"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@ <h1>{% translate "Set clearance level for:" %} {{ ooi.human_readable }}</h1>
<p>
{% translate "Setting the scan level from "declared" to "inherit" means it will inherit a clearance level from other objects, or that no clearance level will be inherited. " %}
</p>
<form action="{% ooi_url 'scan_profile_reset' ooi.primary_key organization.code %}&{% include "partials/elements/href_querystring_from_list.html" with list=mandatory_fields %}
" method="post">
<form action="{% ooi_url 'scan_profile_reset' ooi.primary_key organization.code %}&{% include "partials/elements/href_querystring_from_list.html" with list=mandatory_fields %}" method="post">
{% csrf_token %}
<fieldset>
<legend>
Expand Down
2 changes: 1 addition & 1 deletion rocky/rocky/templates/two_factor/core/otp_required.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ <h1>
security.{% endblocktrans %}
</p>
<p>
<a href="javascript:history.go(-1)" class="button">{% trans "Go back" %}</a>
<a href="#" onclick="history.back()" class="button">{% trans "Go back" %}</a>
<a href="{% url "two_factor:setup" %}" class="button">{% trans "Enable Two-Factor Authentication" %}</a>
</p>
{% endblock content %}