aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/search
diff options
context:
space:
mode:
Diffstat (limited to 'servo/templates/search')
-rwxr-xr-xservo/templates/search/results/articles.html10
-rwxr-xr-xservo/templates/search/results/customers.html26
-rwxr-xr-xservo/templates/search/results/devices.html10
-rwxr-xr-xservo/templates/search/results/gsx.html41
-rwxr-xr-xservo/templates/search/results/gsx_error.html4
-rwxr-xr-xservo/templates/search/results/gsx_notfound.html4
-rwxr-xr-xservo/templates/search/results/gsx_repair_details.html19
-rwxr-xr-xservo/templates/search/results/gsx_results.html5
-rwxr-xr-xservo/templates/search/results/gsx_warranty.html49
-rwxr-xr-xservo/templates/search/results/notes.html20
-rwxr-xr-xservo/templates/search/results/orders.html10
-rwxr-xr-xservo/templates/search/results/products.html10
-rwxr-xr-xservo/templates/search/spotlight.html37
13 files changed, 245 insertions, 0 deletions
diff --git a/servo/templates/search/results/articles.html b/servo/templates/search/results/articles.html
new file mode 100755
index 0000000..8ea7535
--- /dev/null
+++ b/servo/templates/search/results/articles.html
@@ -0,0 +1,10 @@
+{% extends "search/spotlight.html" %}
+{% load humanize %}
+{% load servo_tags %}
+
+{% block second_column %}
+{% for i in articles %}
+ <h2>{{ i.title }}</h2>
+ {{ i.content|markdown }}
+{% endfor %}
+{% endblock second_column %}
diff --git a/servo/templates/search/results/customers.html b/servo/templates/search/results/customers.html
new file mode 100755
index 0000000..6203598
--- /dev/null
+++ b/servo/templates/search/results/customers.html
@@ -0,0 +1,26 @@
+{% extends "search/spotlight.html" %}
+{% load i18n %}
+
+{% block second_column %}
+ {% if customers %}
+ {% for i in customers %}
+ <address>
+ <strong><a href="{% url 'customers-view_customer' i.pk %}">{{ i.name }}</a></strong><br>
+ {% if i.street_address %}
+ {{ i.street_address }}<br/>
+ {{ i.zip_code }}, {{ i.city }}<br/>
+ {% endif %}
+ {% if i.phone %}
+ <abbr title="{% trans "Phone" %}">P:</abbr> {{ i.phone }}
+ {% endif %}
+ {% if i.email %}
+ <br/>
+ <a href="{% url 'notes-create_to_customer' customer=i.pk %}"><i class="icon-envelope"></i> {{ i.email }}</a>
+ {% endif %}
+ </address>
+ <hr/>
+ {% endfor %}
+ {% else %}
+ <h1 class="muted text-center">{% trans "No customers found" %}</h1>
+ {% endif %}
+{% endblock second_column %}
diff --git a/servo/templates/search/results/devices.html b/servo/templates/search/results/devices.html
new file mode 100755
index 0000000..d133d55
--- /dev/null
+++ b/servo/templates/search/results/devices.html
@@ -0,0 +1,10 @@
+{% extends "search/spotlight.html" %}
+{% load i18n %}
+
+{% block second_column %}
+ {% if devices %}
+ {% include "devices/list.html" %}
+ {% else %}
+ <h1 class="muted text-center">{% trans "No devices found" %}</h1>
+ {% endif %}
+{% endblock second_column %}
diff --git a/servo/templates/search/results/gsx.html b/servo/templates/search/results/gsx.html
new file mode 100755
index 0000000..ac8471b
--- /dev/null
+++ b/servo/templates/search/results/gsx.html
@@ -0,0 +1,41 @@
+{% extends "search/spotlight.html" %}
+{% load i18n %}
+
+{% block second_column %}
+{% block tabs %}
+ <ul class="nav nav-tabs" id="gsx-tabs">
+ {% if gsx_type == 'serialNumber' or 'alternateDeviceId' %}
+ <li><a href="{% url 'search-gsx' what='warranty' %}?q={{ query }}">{% trans "Device" %}</a></li>
+ {% else %}
+ <li class="disabled"><a href="#">{% trans "Device" %}</a></li>
+ {% endif %}
+ {% if gsx_type == 'serialNumber' or gsx_type == 'partNumber' %}
+ <li><a href="{% url 'search-gsx' what='parts' %}?q={{ query }}">{% trans "Parts" %}</a></li>
+ {% else %}
+ <li class="disabled"><a href="#">{% trans "Parts" %}</a></li>
+ {% endif %}
+ {% if gsx_type == 'serialNumber' or gsx_type == 'dispatchId' %}
+ <li><a href="{% url 'search-gsx' what='repairs' %}?q={{ query }}">{% trans "Repairs" %}</a></li>
+ {% else %}
+ <li class="disabled"><a href="#">{% trans "Repairs" %}</a></li>
+ {% endif %}
+ <li class="pull-right"><a href="#" class="filter_table"><i class="icon-search"></i></a></li>
+ </ul>
+{% endblock tabs %}
+
+{% block results %}
+ <div id="gsx-container" data-source="{% url 'search-gsx_results' what=what %}?q={{ query }}">
+ <div class="progress active">
+ <div class="bar" style="width:1%;" data-progress="0"></div>
+ </div>
+ </div>
+{% 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');
+</script>
+{% endblock media %}
diff --git a/servo/templates/search/results/gsx_error.html b/servo/templates/search/results/gsx_error.html
new file mode 100755
index 0000000..0c72d03
--- /dev/null
+++ b/servo/templates/search/results/gsx_error.html
@@ -0,0 +1,4 @@
+{% load i18n %}
+<table class="table">
+ <tr><td class="muted empty">{{ message }}</td></tr>
+</table>
diff --git a/servo/templates/search/results/gsx_notfound.html b/servo/templates/search/results/gsx_notfound.html
new file mode 100755
index 0000000..87261bf
--- /dev/null
+++ b/servo/templates/search/results/gsx_notfound.html
@@ -0,0 +1,4 @@
+{% load i18n %}
+<table class="table">
+ <tr><td class="muted empty">{% trans "No search results" %}</td></tr>
+</table>
diff --git a/servo/templates/search/results/gsx_repair_details.html b/servo/templates/search/results/gsx_repair_details.html
new file mode 100755
index 0000000..81908b5
--- /dev/null
+++ b/servo/templates/search/results/gsx_repair_details.html
@@ -0,0 +1,19 @@
+{% load i18n %}
+
+{% for r in results %}
+<h3>{{ r.dispatchId }}</h3>
+<dl class="dl-horizontal">
+ <dt>{% trans "Service Order" %}</dt>
+ <dd>{{ r.purchaseOrderNumber }}</dd>
+ <dt>{% trans "CS Code" %}</dt>
+ <dd>{{ r.csCode|safe }}</dd>
+ <dt>{% trans "Tracking Number" %}</dt>
+ <dd>{{ r.deliveryTrackingNumber }}</dd>
+ <dt>{% trans "Notes" %}</dt>
+ <dd>{{ r.notes }}</dd>
+ <dt>{% trans "Warranty Coverage" %}</dt>
+ <dd>{{ r.coverageStatusDescription }}</dd>
+ <dt>{% trans "Status" %}</dt>
+ <dd>{{ r.orderStatus }}</dd>
+</dl>
+{% endfor %}
diff --git a/servo/templates/search/results/gsx_results.html b/servo/templates/search/results/gsx_results.html
new file mode 100755
index 0000000..dc7fff5
--- /dev/null
+++ b/servo/templates/search/results/gsx_results.html
@@ -0,0 +1,5 @@
+<div id="gsx-container" data-source="{% url 'search-search_gsx' what=what arg=arg value=value %}">
+ <div class="progress active">
+ <div class="bar" style="width:1%;" data-progress="0"></div>
+ </div>
+</div>
diff --git a/servo/templates/search/results/gsx_warranty.html b/servo/templates/search/results/gsx_warranty.html
new file mode 100755
index 0000000..4682885
--- /dev/null
+++ b/servo/templates/search/results/gsx_warranty.html
@@ -0,0 +1,49 @@
+{% load i18n %}
+
+{% for d in results %}
+<div class="row-fluid">
+ <div class="span3">
+ <img class="img-rounded" src="{{ d.image_url }}" alt="{{ d.description }}" title="{{ d.description }}"/>
+ </div>
+ <div class="span9" id="gsx-results">
+ <h3>{{ d.description }}</h3>
+ <dl class="dl-horizontal">
+ <dt>{% trans "Warranty Status" %}</dt>
+ <dd>{{ d.get_warranty_status_display }}</dd>
+ <dt>{% trans "Purchase Date" %}</dt>
+ <dd>{{ d.purchased_on|date:"SHORT_DATE_FORMAT"|default:"-" }}, {{ d.purchase_country|default:"-" }}</dd>
+ <dt>{% trans "Serial Number" %}</dt>
+ <dd>{{ d.sn }}</dd>
+ <dt>{% trans "Configration" %}</dt>
+ <dd>{{ d.configuration }}</dd>
+ {% if d.activation %}
+ <dt>IMEI</dt>
+ <dd>{{ d.activation.imeiNumber }}</dd>
+ <dt>{% trans "Activation Profile" %}</dt>
+ <dd>{{ d.activation.initialActivationPolicyDetails }}</dd>
+ <dt>{% trans "Unlocked" %}</dt>
+ <dd>{{ d.activation.unlocked }}</dd>
+ <dt>{% trans "Find My iPhone" %}</dt>
+ <dd>{{ d.fmip_is_active|yesno:"Active,Inactive" }}</dd>
+ {% endif %}
+ </dl>
+ <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><a href="{% url 'orders-create_with_sn' sn=query %}">{% trans "Create Service Order" %}</a></li>
+ {% if request.session.current_order_id %}
+ <li><a href="{% url 'orders-add_device' pk=request.session.current_order_id sn=query %}">{% trans "Use in order" %} #{{ request.session.current_order.code }}</a></li>
+ {% endif %}
+ <li class="divider"></li>
+ {% if d.manualURL %}
+ <li><a href="{{ d.manualURL }}">{% trans "Download Manual" %}</a></li>
+ {% else %}
+ <li class="disabled"><a href="">{% trans "Download Manual" %}</a></li>
+ {% endif %}
+ </ul>
+ </div>
+ </div>
+</div>
+{% endfor %}
diff --git a/servo/templates/search/results/notes.html b/servo/templates/search/results/notes.html
new file mode 100755
index 0000000..ec2547a
--- /dev/null
+++ b/servo/templates/search/results/notes.html
@@ -0,0 +1,20 @@
+{% extends "search/spotlight.html" %}
+{% load servo_tags %}
+{% load humanize %}
+
+{% block second_column %}
+<ul class="media-list">
+ {% for note in notes %}
+ <li class="media">
+ <a class="pull-left" href="#">
+ <img src="{{ note.created_by.get_avatar }}" alt="{{ note.created_by }}" title="{{ note.created_by }}" class="img-rounded avatar"/>
+ </a>
+ <div class="media-body">
+ <h5 class="media-heading">{{ note.get_sender_name }} {{ note.created_at|naturaltime }}{% if note.order %} <a href="{% url 'orders-edit' note.order.pk %}#note-{{ note.pk }}"><i class="icon-share-alt"></i></a>{% endif %}</h5>
+ {{ note.body|markdown }}
+ </div>
+ <hr/>
+ </li>
+ {% endfor %}
+</ul>
+{% endblock second_column %}
diff --git a/servo/templates/search/results/orders.html b/servo/templates/search/results/orders.html
new file mode 100755
index 0000000..1e1fc6f
--- /dev/null
+++ b/servo/templates/search/results/orders.html
@@ -0,0 +1,10 @@
+{% extends "search/spotlight.html" %}
+{% load i18n %}
+
+{% block second_column %}
+ {% if orders %}
+ {% include "orders/list.html" %}
+ {% else %}
+ <h1 class="muted text-center">{% trans "No orders found" %}</h1>
+ {% endif %}
+{% endblock second_column %}
diff --git a/servo/templates/search/results/products.html b/servo/templates/search/results/products.html
new file mode 100755
index 0000000..32afb5c
--- /dev/null
+++ b/servo/templates/search/results/products.html
@@ -0,0 +1,10 @@
+{% extends "search/spotlight.html" %}
+{% load i18n %}
+
+{% block second_column %}
+ {% if products %}
+ {% include "products/list.html" %}
+ {% else %}
+ <h1 class="muted text-center">{% trans "No products found" %}</h1>
+ {% endif %}
+{% endblock second_column %}
diff --git a/servo/templates/search/spotlight.html b/servo/templates/search/spotlight.html
new file mode 100755
index 0000000..e372b23
--- /dev/null
+++ b/servo/templates/search/spotlight.html
@@ -0,0 +1,37 @@
+{% extends "two_column_layout.html" %}
+{% load servo_tags %}
+{% 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 %}
+{% endblock second_column %}
+
+{% block footer %}
+ <li><i class="icon-home"></i> <a href="{% url 'accounts-list_orders' request.user.username %}">{% trans "Home" %}</a> <span class="divider">/</span></li><li class="active">{{ title }}</li>
+{% endblock footer %}