diff options
Diffstat (limited to 'servo/templates')
-rwxr-xr-x | servo/templates/customers/search.html | 6 | ||||
-rwxr-xr-x | servo/templates/default.html | 3 | ||||
-rwxr-xr-x | servo/templates/devices/search_gsx.html | 51 | ||||
-rwxr-xr-x | servo/templates/devices/search_gsx_parts.html | 46 | ||||
-rwxr-xr-x | servo/templates/devices/search_gsx_results.html | 8 | ||||
-rwxr-xr-x | servo/templates/devices/view.html | 2 | ||||
-rwxr-xr-x | servo/templates/search/results/gsx_results.html | 2 | ||||
-rwxr-xr-x | servo/templates/search/spotlight.html | 41 |
8 files changed, 78 insertions, 81 deletions
diff --git a/servo/templates/customers/search.html b/servo/templates/customers/search.html index 53b416b..3fecaa4 100755 --- a/servo/templates/customers/search.html +++ b/servo/templates/customers/search.html @@ -12,9 +12,9 @@ {% block first_column %} <ul class="nav nav-list"> <li class="nav-header">{% trans "Show" %}</li> - <li{% if not kind %} class="active"{% endif %}><a href="{% url 'customers-search' %}?q={{ query }}">{% trans "All" %}</a></li> - <li{% if kind == 'company' %} class="active"{% endif %}><a href="{% url 'customers-search' %}?q={{ query }}&kind=company">{% trans "Companies" %}</a></li> - <li{% if kind == 'contact' %} class="active"{% endif %}><a href="{% url 'customers-search' %}?q={{ query }}&kind=contact">{% trans "People" %}</a></li> + <li{% if not kind %} class="active"{% endif %}><a href="{% url 'search-customers' %}?q={{ query }}">{% trans "All" %}</a></li> + <li{% if kind == 'company' %} class="active"{% endif %}><a href="{% url 'search-customers' %}?q={{ query }}&kind=company">{% trans "Companies" %}</a></li> + <li{% if kind == 'contact' %} class="active"{% endif %}><a href="{% url 'search-customers' %}?q={{ query }}&kind=contact">{% trans "People" %}</a></li> </ul> {% endblock first_column %} diff --git a/servo/templates/default.html b/servo/templates/default.html index adcc592..8a62a4a 100755 --- a/servo/templates/default.html +++ b/servo/templates/default.html @@ -40,8 +40,9 @@ <li class="{% active request '^stats' %}"><a href="{% url 'stats-index' %}"><i class="halflings stats white"></i> {% trans "Statistics" %}</a></li> </ul> <div class="nav-collapse collapse"> - <form class="navbar-search pull-right" method="get" action="{{ request|search_url }}"> + <form class="navbar-search pull-right" method="get" action="{% url 'search-spotlight' %}"> <input type="text" class="search-query" name="q" placeholder="{% trans "Search" %}" autocomplete="off" value="{{ request.session.search_query }}" id="toolbar-search" autofocus/> + <input type="hidden" name="hint" value="{{ search_hint|default:'orders' }}"/> </form> </div> </div> diff --git a/servo/templates/devices/search_gsx.html b/servo/templates/devices/search_gsx.html index 4f06b81..007befe 100755 --- a/servo/templates/devices/search_gsx.html +++ b/servo/templates/devices/search_gsx.html @@ -3,39 +3,38 @@ {% block second_column %} {% block tabs %} - <ul class="nav nav-tabs" id="gsx-tabs"> - {% if param == 'serialNumber' or param == 'alternateDeviceId' %} - <li><a href="{% url 'devices-search_gsx' 'warranty' param query %}">{% trans "Device" %}</a></li> - {% else %} - <li class="disabled"><a href="#">{% trans "Device" %}</a></li> - {% endif %} - {% if param == 'serialNumber' or param == 'alternateDeviceId' %} - <li><a href="{% url 'devices-search_gsx' 'orders' param query %}">{% trans "Orders" %}</a></li> - {% else %} - <li class="disabled"><a href="#">{% trans "Orders" %}</a></li> - {% endif %} - {% if param == 'serialNumber' or param == 'partNumber' %} - <li><a href="{% url 'devices-search_gsx' 'parts' param query %}">{% trans "Parts" %}</a></li> - {% else %} - <li class="disabled"><a href="#">{% trans "Parts" %}</a></li> - {% endif %} - {% if param == 'serialNumber' or param == 'dispatchId' %} - <li><a href="{% url 'devices-search_gsx' 'repairs' param query %}">{% trans "Repairs" %}</a></li> - {% else %} - <li class="disabled"><a href="#">{% trans "Repairs" %}</a></li> - {% endif %} - </ul> +<ul class="nav nav-tabs" id="gsx-tabs"> +{% if param == 'serialNumber' or param == 'alternateDeviceId' %} + <li><a href="{% url 'search-search_gsx' 'warranty' param query %}">{% trans "Device" %}</a></li> +{% else %} + <li class="disabled"><a href="#">{% trans "Device" %}</a></li> +{% endif %} +{% if param == 'serialNumber' or param == 'alternateDeviceId' %} + <li><a href="{% url 'search-search_gsx' 'orders' param query %}">{% trans "Orders" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Orders" %}</a></li> + {% endif %} + {% if param == 'serialNumber' or param == 'partNumber' %} + <li><a href="{% url 'search-search_gsx' 'parts' param query %}">{% trans "Parts" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Parts" %}</a></li> + {% endif %} + {% if param == 'serialNumber' or param == 'dispatchId' %} + <li><a href="{% url 'search-search_gsx' 'repairs' param query %}">{% trans "Repairs" %}</a></li> + {% else %} + <li class="disabled"><a href="#">{% trans "Repairs" %}</a></li> + {% endif %} +</ul> {% endblock tabs %} {% block results %} - {% include "devices/search_gsx_results.html" %} + {% include "devices/search_gsx_results.html" %} {% endblock results %} - {% endblock second_column %} {% block media %} <script type="text/javascript"> - var loc = location.pathname + location.search; - $('#gsx-tabs>li>a[href="'+loc+'"]').parent().addClass('active'); + var loc = location.pathname + location.search; + $('#gsx-tabs>li>a[href="'+loc+'"]').parent().addClass('active'); </script> {% endblock media %} diff --git a/servo/templates/devices/search_gsx_parts.html b/servo/templates/devices/search_gsx_parts.html index 63bfdb9..48ba7a7 100755 --- a/servo/templates/devices/search_gsx_parts.html +++ b/servo/templates/devices/search_gsx_parts.html @@ -3,28 +3,28 @@ {% autoescape on %} {% for p in results %} - <tr> - <td><a href="{% url 'products-view_product' code=p.code %}">{{ p.code }}</a></td> - <td>{{ p.title }}<br/><span class="muted small" title="{{ p.eee_code }}">{{ p.eee_code|truncatechars:40 }}</td> - <td>{{ p.price_sales_exchange|currency }}</td> - <td>{{ p.price_sales_stock|currency }}</td> - <td>0</td> - <td> - <div class="btn-group pull-right"> - <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> - <i class="icon-cog"></i> <span class="caret"></span> - </a> - <ul class="dropdown-menu"> - <li{% if not perms.servo.add_product %} class="disabled"{% endif %}> - {% if device %} - <a href="{% url 'products-create' group=device.get_product_category code=p.code %}">{% trans "Create Product" %}</a> - {% else %} - <a href="{% url 'products-create' code=p.code %}">{% trans "Create Product" %}</a> - {% endif %} - </li> - </ul> - </div> - </td> - </tr> +<tr> + <td><a href="{% url 'products-view_product' code=p.code %}">{{ p.code }}</a></td> + <td>{{ p.title }}<br/><span class="muted small" title="{{ p.eee_code }}">{{ p.eee_code|truncatechars:40 }}</td> + <td>{{ p.price_sales_exchange|currency }}</td> + <td>{{ p.price_sales_stock|currency }}</td> + <td>0</td> + <td> + <div class="btn-group pull-right"> + <a class="btn dropdown-toggle" data-toggle="dropdown" href="#"> + <i class="icon-cog"></i> <span class="caret"></span> + </a> + <ul class="dropdown-menu"> + <li{% if not perms.servo.add_product %} class="disabled"{% endif %}> + {% if device %} + <a href="{% url 'products-create' group=device.get_product_category code=p.code %}">{% trans "Create Product" %}</a> + {% else %} + <a href="{% url 'products-create' code=p.code %}">{% trans "Create Product" %}</a> + {% endif %} + </li> + </ul> + </div> + </td> +</tr> {% endfor %} {% endautoescape %} diff --git a/servo/templates/devices/search_gsx_results.html b/servo/templates/devices/search_gsx_results.html index b7a0926..df92660 100755 --- a/servo/templates/devices/search_gsx_results.html +++ b/servo/templates/devices/search_gsx_results.html @@ -1,5 +1,5 @@ -<div id="gsx-container" data-source="{% url 'devices-get_gsx_search_results' what param query %}"> - <div class="progress active"> - <div class="bar" style="width:1%;" data-progress="0"></div> - </div> +<div id="gsx-container" data-source="{% url 'search-get_gsx_search_results' what param query %}"> + <div class="progress active"> + <div class="bar" style="width:1%;" data-progress="0"></div> + </div> </div> diff --git a/servo/templates/devices/view.html b/servo/templates/devices/view.html index fd6d3a9..51a30c1 100755 --- a/servo/templates/devices/view.html +++ b/servo/templates/devices/view.html @@ -66,7 +66,7 @@ </div> {% if device.is_apple_device %} <div class="tab-pane" id="tab3"> - <div id="gsx-container" data-source="{% url 'devices-search_gsx' what='repairs' param='serialNumber' query=device.sn %}"> + <div id="gsx-container" data-source="{% url 'search-search_gsx' what='repairs' param='serialNumber' query=device.sn %}"> <div class="progress active"> <div class="bar" style="width:100%;" data-progress="0"></div> </div> diff --git a/servo/templates/search/results/gsx_results.html b/servo/templates/search/results/gsx_results.html index dc7fff5..0e4c890 100755 --- a/servo/templates/search/results/gsx_results.html +++ b/servo/templates/search/results/gsx_results.html @@ -1,4 +1,4 @@ -<div id="gsx-container" data-source="{% url 'search-search_gsx' what=what arg=arg value=value %}"> +<div id="gsx-container" data-source="{% url 'search-get_gsx_search_results' what=what arg=arg value=value %}"> <div class="progress active"> <div class="bar" style="width:1%;" data-progress="0"></div> </div> diff --git a/servo/templates/search/spotlight.html b/servo/templates/search/spotlight.html index 3b3715c..f18eb43 100755 --- a/servo/templates/search/spotlight.html +++ b/servo/templates/search/spotlight.html @@ -3,35 +3,32 @@ {% load i18n %} {% block toolbar %} - <a href="{% url 'customers-create_customer' group='all' %}?name={{ query }}" class="btn btn-inverse"><i class="icon-plus icon-white"></i> {% trans "New Customer" %}</a> {% endblock toolbar %} {% block first_column %} -<ul class="nav nav-list"> - <li class="nav-header">{% trans "Results" %}</li> - <li class="{% active request 'search/customers' %}"> - <a href="/search/customers/?q={{ query }}">{% trans "Customers" %}</a> - </li> - <li class="{% active request 'search/devices' %}"> - <a href="/search/devices/?q={{ query }}">{% trans "Devices" %}</a> - </li> - <li class="{% active request 'search/gsx' %}"> - <a href="/search/gsx/{{ what }}?q={{ query }}">{% trans "GSX" %}</a> - </li> - <li class="{% active request 'search/orders' %}"> - <a href="/search/orders/?q={{ query }}">{% trans "Orders" %}</a> - </li> - <li class="{% active request 'search/products' %}"> - <a href="/search/products/?q={{ query }}">{% trans "Products and Parts" %}</a> - </li> - <li class="{% active request 'search/notes' %}"><a href="/search/notes/?q={{ query }}">{% trans "Notes" %}</a></li> - <li class="{% active request 'search/articles' %}"><a href="/search/articles/?q={{ query }}">{% trans "Articles" %}</a></li> -</ul> {% endblock first_column %} {% block second_column %} +<ul class="nav nav-tabs"> + <li class="active"> + <a href="{% url 'search-customers' %}?q={{ query }}">{% trans "Customers" %}</a> + </li> + <li class="{% active request 'search/devices' %}"> + <a href="{% url 'search-devices' %}?q={{ query }}">{% trans "Devices" %}</a> + </li> + <li class="{% active request 'search/gsx' %}"> + <a href="/search/gsx/{{ what }}?q={{ query }}">{% trans "GSX" %}</a> + </li> + <li class="{% active request 'search/orders' %}"> + <a href="{% url 'search-orders' %}?q={{ query }}">{% trans "Orders" %}</a> + </li> + <li class="{% active request 'search/products' %}"> + <a href="{% url 'search-products' %}?q={{ query }}">{% trans "Products and Parts" %}</a> + </li> + <li class="{% active request 'search/notes' %}"><a href="/search/notes/?q={{ query }}">{% trans "Notes" %}</a></li> +</ul> {% endblock second_column %} {% block footer %} - <li><i class="icon-home"></i> <a href="{% url 'accounts-list_orders' %}">{% trans "Home" %}</a> <span class="divider">/</span></li><li class="active">{{ title }}</li> + <li><i class="icon-home"></i> <a href="{% url 'accounts-list_orders' %}">{% trans "Home" %}</a> <span class="divider">/</span></li><li class="active">{{ title }}</li> {% endblock footer %} |