Commit c00ff631 authored by Patrick's avatar Patrick

Allow anonymous to filter products on small device.

Show but disable next page button on order screen -> Infinite scroll is into action.
parent 6ffa43ef
......@@ -358,3 +358,8 @@ ul.djng-field-errors li.valid::before {
word-break: normal;
overflow-wrap: break-word;
}
/* Disable link using css */
.not-active {
pointer-events: none;
cursor: default;
}
......@@ -65,13 +65,15 @@
<span class="sr-only">{% trans "Toggle navigation" %}</span>
<span class="glyphicon glyphicon-list"></span>
</a>
{% if is_anonymous or not permanence_id %}
{% if not permanence_id %}
<span class="navbar-group-name"><small>{{ group_name | truncatechars:25 }}</small></span>
{% else %}
<span id="link_to_order_or_filter_view"></span>
<a href="{% url "order_view" permanence_id %}?is_basket=yes" class="btn btn-info pull-right" style="margin-right: 10px;">
<span id="prepared_amount_visible_xs"></span>
</a>
{% if is_authenticated %}
<a href="{% url "order_view" permanence_id %}?is_basket=yes" class="btn btn-info pull-right" style="margin-right: 10px;">
<span id="prepared_amount_visible_xs"></span>
</a>
{% endif %}
{% endif %}
</div>
<div class="container-menu">
......@@ -80,7 +82,7 @@
<ul class="nav navbar-nav navbar-left">
<li>
<a href="{% repanier_home %}"><span class="glyphicon glyphicon glyphicon-home"></span></a>
<button type="button" class="visible-xs-inline-block pull-right closebtn" onclick="closeNav()">&times;</button>
<button type="button" class="visible-xs-inline-block pull-right btn btn-sm closebtn" onclick="closeNav()">&times;</button>
</li>
</ul>
<ul class="nav navbar-nav">
......
......@@ -74,7 +74,7 @@
<ul class="nav navbar-nav navbar-left">
<li>
<a href="{% repanier_home %}"><span class="glyphicon glyphicon glyphicon-home"></span></a>
<button type="button" class="visible-xs-inline-block pull-right closebtn" onclick="closeNav()">&times;</button>
<button type="button" class="visible-xs-inline-block pull-right btn btn-sm closebtn" onclick="closeNav()">&times;</button>
</li>
</ul>
<ul class="nav navbar-nav">
......
......@@ -45,7 +45,7 @@
</div>
{% if page_obj.has_next %}
<a href="?page={{ page_obj.next_page_number }}&producer={{ producer_id }}&departementforcustomer={{ departementforcustomer_id }}&is_like={{ is_like }}{% if q %}&q={{ q }}{% endif %}"
class="infinite-more-link btn btn-success btn-disabled">&nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-arrow-right"></span>&nbsp;&nbsp;&nbsp;&nbsp;</a>
class="infinite-more-link btn btn-success btn-disabled not-active">&nbsp;&nbsp;&nbsp;&nbsp;<span class="glyphicon glyphicon-arrow-right"></span>&nbsp;&nbsp;&nbsp;&nbsp;</a>
{% endif %}
<div class="loading" style="display: none;">
{% trans "Loading..." %}
......
......@@ -5,13 +5,16 @@ from django.contrib.auth.decorators import login_required
from django.http import Http404
from django.utils import translation
from django.shortcuts import render
from django.views.decorators.cache import never_cache
from django.views.decorators.csrf import csrf_protect
from django.views.decorators.http import require_GET
from repanier.models import OfferItem, Producer, LUT_DepartmentForCustomer
from repanier.const import EMPTY_STRING
@login_required()
@never_cache
@require_GET
@csrf_protect
def order_filter_view(request, permanence_id):
if request.user.is_staff or request.user.is_superuser:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment