Skip to content

Commit

Permalink
style: Indent HTML templates with djhtml (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
pnu-s authored Jan 17, 2024
1 parent 84b9a22 commit da5e08a
Show file tree
Hide file tree
Showing 25 changed files with 1,382 additions and 1,369 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,16 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

djhtml:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install djhtml
run: python -m pip install --upgrade pip djhtml
- name: Lint HTML files
run: djhtml . --check
80 changes: 40 additions & 40 deletions exodus/analysis_query/templates/queries_list.html
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
{% extends "base/base.html"%}
{% load i18n %}
{% block content %}
<div class="row justify-content-md-center">
<div class="col-lg-10 col-centered">
{% if request.user.is_superuser %}
<table class="table table-hover">
{% for q in queries %}
<tr>
<td>
<a href="{% url 'analysis:wait' q.id %}">{{ q.id }}</a>
</td>
<td>
{% if q.source == 'fdroid' %}
<a target="_blank" rel="noreferrer" href="https://f-droid.org/packages/{{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% else %}
<a target="_blank" rel="noreferrer" href="https://play.google.com/store/apps/details?id={{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% endif %}
</td>
<td>
{{ q.source }}
</td>
<td>
{{ q.uploaded_at }}
</td>
<td>
{% if q.processed %}
{% if q.in_error %}
<span class="text-danger" data-toggle="tooltip" title="{{ q.description }}">error</span>
<div class="row justify-content-md-center">
<div class="col-lg-10 col-centered">
{% if request.user.is_superuser %}
<table class="table table-hover">
{% for q in queries %}
<tr>
<td>
<a href="{% url 'analysis:wait' q.id %}">{{ q.id }}</a>
</td>
<td>
{% if q.source == 'fdroid' %}
<a target="_blank" rel="noreferrer" href="https://f-droid.org/packages/{{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% else %}
<span class="text-success">complete</span>
<a target="_blank" rel="noreferrer" href="https://play.google.com/store/apps/details?id={{ q.handle }}">{{ q.handle | truncatechars_html:40 }}</a>
{% endif %}
{% else %}
<span class="text-warning">in progress</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-danger small">
<strong>{% trans "You need to be registered" %}.</strong>
</div>
{% endif %}
</td>
<td>
{{ q.source }}
</td>
<td>
{{ q.uploaded_at }}
</td>
<td>
{% if q.processed %}
{% if q.in_error %}
<span class="text-danger" data-toggle="tooltip" title="{{ q.description }}">error</span>
{% else %}
<span class="text-success">complete</span>
{% endif %}
{% else %}
<span class="text-warning">in progress</span>
{% endif %}
</td>
</tr>
{% endfor %}
</table>
{% else %}
<div class="alert alert-danger small">
<strong>{% trans "You need to be registered" %}.</strong>
</div>
{% endif %}
</div>
</div>
</div>
{% endblock %}
Loading

0 comments on commit da5e08a

Please sign in to comment.