aboutsummaryrefslogtreecommitdiffstats
path: root/servo/templates/products/list_rows.html
diff options
context:
space:
mode:
authorFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
committerFilipp Lepalaan <filipp@mac.com>2015-08-04 10:11:24 +0300
commit63b0fc6269b38edf7234b9f151b80d81f614c0a3 (patch)
tree555de3068f33f8dddb4619349bbea7d9b7c822fd /servo/templates/products/list_rows.html
downloadServo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.gz
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.tar.bz2
Servo-63b0fc6269b38edf7234b9f151b80d81f614c0a3.zip
Initial commit
First public commit
Diffstat (limited to 'servo/templates/products/list_rows.html')
-rwxr-xr-xservo/templates/products/list_rows.html55
1 files changed, 55 insertions, 0 deletions
diff --git a/servo/templates/products/list_rows.html b/servo/templates/products/list_rows.html
new file mode 100755
index 0000000..a753687
--- /dev/null
+++ b/servo/templates/products/list_rows.html
@@ -0,0 +1,55 @@
+{% load i18n %}
+{% load servo_tags %}
+{% for p in products %}
+{% with p.get_pk as product_id %}
+<tr>
+ <td><img src="{{ p.get_photo }}" alt="{{ product }}" class="img-icon"/></td>
+ <td data-value="{{ p.code }}">
+ <a href="{% url 'products-view_product' pk=p.pk group=group.slug %}"><strong>{{ p.code }}</strong></a><br/>
+ {{ p.title }}<br/><small class="muted">{{ p.eee_code|default:""|addspace }}</small>
+ </td>
+ <td data-value="{{ p.price_sales_stock|safe }}">{{ p.price_sales_stock|currency }}</td>
+ <td data-value="{{ p.price_sales_exchange|safe }}">{{ p.price_sales_exchange|currency }}</td>
+ {% if p.is_service %}
+ <td>&infin;</td>
+ {% else %}
+ <td>{{ p|amount_in_location:request.user }}</td>
+ {% endif %}
+ <td>
+ <div class="btn-group pull-right">
+ {% if perms.servo.change_product %}
+ <a class="btn" href="{% url 'products-edit_product' pk=product_id group=group.slug %}"><i class="icon-pencil"></i></a>
+ {% else %}
+ <a class="btn disabled" href="#"><i class="icon-pencil"></i></a>
+ {% endif %}
+ <button class="btn dropdown-toggle" data-toggle="dropdown">
+ <span class="caret"></span>
+ </button>
+ <ul class="dropdown-menu">
+ {% with request.session.current_order_id as co %}
+ {% if co %}
+ <li><a href="{% url 'orders-add_product' co product_id %}">{% trans "Use in Service Order" %} #{{ request.session.current_order_code }}</a></li>
+ <li class="divider"></li>
+ {% endif %}
+ {% endwith %}
+ <li><a href="{% url 'orders-create_with_product' product_id %}">{% trans "Create Sales Order" %}</a></li>
+ <li><a href="{% url 'purchases-create_po' product_id=product_id %}">{% trans "Create Purchase Order" %}</a></li>
+ {% with request.session.current_po as po %}
+ {% if po %}
+ <li><a href="{% url 'purchases-add_to_po' pk=po.id product_id=product_id %}">{% trans "Use in Purchase Order" %}</a></li>
+ {% endif %}
+ {% endwith %}
+ <li class="divider"></li>
+ {% if perms.servo.delete_product %}
+ <li><a href="{% url 'products-delete_product' pk=product_id group=group.slug %}" data-modal="#modal"><i class="icon-trash"></i> {% trans "Delete" %}</a></li>
+ {% else %}
+ <li class="disabled"><a href="#"><i class="icon-trash"></i> {% trans "Delete" %}</a></li>
+ {% endif %}
+ </ul>
+ </div>
+ </td>
+</tr>
+{% endwith %}
+{% empty %}
+<tr><td colspan="6" class="muted empty">{% trans "No products found" %}</td></tr>
+{% endfor %}