improvements and fixes

This commit is contained in:
Unknown
2018-06-01 15:53:06 +02:00
parent 4871b6194c
commit fb852b35a6
14 changed files with 91 additions and 42 deletions

View File

@@ -93,9 +93,9 @@
{% trans 'Manage Data' %}
</a>
<div class="dropdown-menu" aria-labelledby="navbarDropdownMenuLink">
<a class="dropdown-item" href="{% url 'batch_monitor' %}"><i
<a class="dropdown-item" href="{% url 'data_sync' %}"><i
class="fas fa-sync-alt"></i> {% trans 'Configure Sync' %}</a>
<a class="dropdown-item" href="{% url 'batch_edit' %}"><i
<a class="dropdown-item" href="{% url 'data_batch_edit' %}"><i
class="fas fa-edit"></i> {% trans 'Batch Edit' %}</a>
</div>
</li>

View File

@@ -24,7 +24,7 @@
</div>
<br/>
<a href="{% url 'batch_sync_wait' %}" class="btn btn-warning">{% trans 'Sync Now!' %}</a>
<a href="{% url 'data_sync_wait' %}" class="btn btn-warning">{% trans 'Sync Now!' %}</a>
<br/><br/>
{% render_table monitored_paths %}

View File

@@ -9,17 +9,24 @@
<h3>
{% trans 'Importing Recipes' %}
</h3>
<br/>
<br/>
<br/>
<br/>
<br/>
<div class="text-center">
<i class="fas fa-sync fa-spin fa-10x"></i>
<br/>
<br/>
<br/>
<div class="alert alert-success" role="alert">
{% trans 'This can take a few minutes, depending on the number of recipes in sync, please wait.' %}
</div>
</div>
<script>
$(document).ready(function () {
window.location.href = "http://192.168.178.27:8000/cookbook/api/sync_all"
window.location.href = "{% url 'api_sync' %}"
});
</script>

View File

@@ -18,7 +18,7 @@
<br/>
{% if table.Meta.model|get_class == 'RecipeImport' %}
<a href="{% url 'batch_import_all' %}" class="btn btn-warning">{% trans 'Import all' %}</a>
<a href="{% url 'data_batch_import' %}" class="btn btn-warning">{% trans 'Import all' %}</a>
<br/>
<br/>
{% endif %}

View File

@@ -16,18 +16,16 @@
{% if filter %}
<div class="card">
<div class="card-header">
<i class="fas fa-search"></i> {% trans "Search" %} <input type="text" class="form-control">
<a data-toggle="collapse" href="#collapse_search" role="button" aria-expanded="false" aria-controls="collapse_search">{% trans 'Advanced Search' %}</a>
<i class="fas fa-search"></i> {% trans "Search" %}
</div>
<div class="collapse" id="collapse_search">
<div class="card-body">
<form action="" method="get" id="search_form">
{{ filter.form|crispy }}
<input class="btn btn-primary" type="submit"/>
<a href="#" onclick="window.location = window.location.pathname;"
class="btn btn-warning">{% trans 'Reset' %}</a>
</form>
</div>
<div class="card-body">
<form action="" method="get" id="search_form">
{{ filter.form|crispy }}
<input class="btn btn-primary" type="submit"/>
<a href="#" onclick="window.location = window.location.pathname;"
class="btn btn-warning">{% trans 'Reset' %}</a>
</form>
</div>
</div>
{% endif %}

View File

@@ -0,0 +1,14 @@
{% extends "base.html" %}
{% load i18n %}
{% block title %}{% trans 'Stats' %}{% endblock %}
{% block content %}
<h3>
{% trans 'Statistics' %}
</h3>
{% endblock %}