completed migration of file view to generic model list

This commit is contained in:
vabene1111
2021-10-14 11:20:30 +02:00
parent 92f0f44a3d
commit 54a2a45959
15 changed files with 130 additions and 188 deletions

View File

@@ -179,6 +179,18 @@
</div>
</div>
<div class="row m-0">
<div class="col-4">
<a href="{% url 'list_user_file' %}" class="p-1">
<div class="card p-0 no-gutters border-0">
<div class="card-body text-center p-0 no-gutters">
<i class="fas fa-file fa-2x"></i>
</div>
<div class="card-body text-break text-center p-0 no-gutters text-muted">
{% trans 'Files' %}
</div>
</div>
</a>
</div>
<div class="col-4">
<a href="{% url 'data_batch_edit' %}" class="p-1">
<div class="card p-0 no-gutters border-0">
@@ -203,6 +215,9 @@
</div>
</a>
</div>
</div>
<div class="row m-0">
<div class="col-4">
<a href="{% url 'view_export' %}" class="p-1">
<div class="card p-0 no-gutters border-0">

View File

@@ -1,39 +0,0 @@
{% extends "base.html" %}
{% load render_bundle from webpack_loader %}
{% load static %}
{% load i18n %}
{% load l10n %}
{% block title %}{% trans 'Files' %}{% endblock %}
{% block extra_head %}
<link rel="stylesheet" href="{% static 'css/vue-multiselect-bs4.min.css' %}">
{% endblock %}
{% block content %}
<div id="app" >
<user-file-view></user-file-view>
</div>
{% endblock %}
{% block script %}
{% if debug %}
<script src="{% url 'js_reverse' %}"></script>
{% else %}
<script src="{% static 'django_js_reverse/reverse.js' %}"></script>
{% endif %}
<script type="application/javascript">
window.CUSTOM_LOCALE = '{{ request.LANGUAGE_CODE }}'
window.CURRENT_FILE_SIZE_MB = {{ current_file_size_mb|unlocalize }}
window.MAX_FILE_SIZE_MB = {{ max_file_size_mb|unlocalize }}
</script>
{% render_bundle 'user_file_view' %}
{% endblock %}

View File

@@ -1,4 +1,5 @@
{% extends "base.html" %}
{% load l10n %}
{% load render_bundle from webpack_loader %}
{% load static %}
{% load i18n %}
@@ -7,7 +8,7 @@
{% block content_fluid %}
<div id="app" >
<div id="app">
<model-list-view></model-list-view>
</div>
@@ -17,7 +18,7 @@
{% block script %}
{{ config | json_script:"model_config" }}
{% if debug %}
<script src="{% url 'js_reverse' %}"></script>
{% else %}
@@ -26,6 +27,11 @@
<script type="application/javascript">
window.IMAGE_PLACEHOLDER = "{% static 'assets/recipe_no_image.svg' %}"
{% if current_file_size_mb %}
window.CURRENT_FILE_SIZE_MB = {{ current_file_size_mb|unlocalize }}
window.MAX_FILE_SIZE_MB = {{ max_file_size_mb|unlocalize }}
{% endif %}
</script>
{% render_bundle 'model_list_view' %}