list views

This commit is contained in:
vabene1111
2018-05-03 20:43:47 +02:00
parent 284beb47af
commit e722863093
8 changed files with 50 additions and 29 deletions

View File

@@ -67,9 +67,9 @@
{% trans 'List' %}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="{% url 'new_category' %}"><i
<a class="dropdown-item" href="{% url 'list_category' %}"><i
class="fas fa-archive"></i> {% trans 'Category' %}</a>
<a class="dropdown-item" href="{% url 'new_keyword' %}"><i
<a class="dropdown-item" href="{% url 'list_keyword' %}"><i
class="fas fa-tags"></i> {% trans 'Keyword' %}</a>
</div>
</li>

View File

@@ -0,0 +1,17 @@
{% extends "base.html" %}
{% load crispy_forms_tags %}
{% load i18n %}
{% load django_tables2 %}
{% block title %}{% trans 'List' %} - {{ title }}{% endblock %}
{% block content %}
<h3>{{ title }} {% trans 'List' %}</h3>
<br/>
{% if table %}
{% render_table table %}
{% endif %}
{% endblock %}

View File

@@ -4,8 +4,8 @@
<div class="row">
<div class="table-responsive">
{% block table %}
<table style='font-size: 24px' {% if table.attrs %}
{{ table.attrs.as_html }}{% else %}class="table table-bordered table-xl"{% endif %}>
<table {% if table.attrs %} <!-- style='font-size: 24px' removed because smaller looked better -->
{{ table.attrs.as_html }}{% else %}class="table table-bordered"{% endif %}>
{% block table.thead %}
{% if table.show_header %}
<thead>