Andrey-Volkovitskiy/python-project-83

View on GitHub
page_analyzer/templates/show_urls.html

Summary

Maintainability
Test Coverage
{% extends 'base.html' %}

{% block content %}
  <h1>{{ txt.WEBSITES }}</h1>

  <div class="table-responsive">
    <table class="table table-bordered table-hover text-nowrap" data-test="urls">
      <tbody>
        <tr>
          <th>ID</th>
          <th>{{ txt.NAME }}</th>
          <th>{{ txt.LAST_CHECK }}</th>
          <th>{{ txt.STATUS_CODE }}</th>
        </tr>
        
        {% for url in url_list %}
          <tr>
            <td>{{ url.url_id }}</td>
            <td>
              <a href="{{ url_for('show_url', id=url.url_id) }}">
                {{ url.name }}
              </a>
            </td>
            
            <td>{% if url.check_created_at %}{{ url.check_created_at.date() }}{% endif %}</td>
            <td>{% if url.status_code %}{{ url.status_code }}{% endif %}</td>
            
          </tr>
        {% endfor %}
      </tbody>
    </table>
  </div>
{% endblock %}