Holger Frey
7 years ago
4 changed files with 210 additions and 2 deletions
@ -0,0 +1,36 @@ |
|||||||
|
<!DOCTYPE html> |
||||||
|
<html> |
||||||
|
<head> |
||||||
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
||||||
|
<title>ordr Notification</title> |
||||||
|
<link href='http://fonts.googleapis.com/css?family=Anton&subset=latin,latin-ext' rel='stylesheet' type='text/css'> |
||||||
|
<link rel="stylesheet" href="{{request.static_url('ordr2:static/css/email.css')}}" type="text/css" media="screen"> |
||||||
|
</head> |
||||||
|
<body> |
||||||
|
<h1>Hi there!</h1> |
||||||
|
<p> |
||||||
|
Your purchase of the following item |
||||||
|
{% if data.status.name == 'ORDERED' %} |
||||||
|
has <u>been orderd</u>: |
||||||
|
{% else %} |
||||||
|
has <u>arrived</u>: |
||||||
|
{% endif %} |
||||||
|
<strong>{{ data }}</strong> |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
If you want to check details about the purchase go here: <a href="{{ request.resource_url(request.root, 'orders', data.id) }}">{{ request.resource_url(request.root, 'orders', data.id) }}</a> |
||||||
|
</p> |
||||||
|
<p> |
||||||
|
|
||||||
|
</p> |
||||||
|
<p class="signature"> |
||||||
|
Regards, |
||||||
|
<br/> |
||||||
|
<span class="brand">ordr</span> |
||||||
|
</p> |
||||||
|
<p class="footprint"> |
||||||
|
<small>Please don't respont to this email! This is an automatically generated notification by the system.</small> |
||||||
|
<a href="http://distractedbysquirrels.com/" target="_blank" title="This software was originally written by Sebastian Sebald." class="icon-dbs"></a> |
||||||
|
</p> |
||||||
|
</body> |
||||||
|
</html> |
@ -0,0 +1,75 @@ |
|||||||
|
{% extends "ordr2:templates/layout.jinja2" %} |
||||||
|
{% import 'ordr2:templates/macros.jinja2' as macros with context %} |
||||||
|
|
||||||
|
{% block subtitle %} Oders | Change Status {% endblock subtitle %} |
||||||
|
|
||||||
|
{% block content %} |
||||||
|
<div class="content controls"> |
||||||
|
|
||||||
|
<div class="container-fluid"> |
||||||
|
<div class="row-fluid"> |
||||||
|
<div class="page-controls"> |
||||||
|
<h1>Change Status of Order{{ 's' if orders|length > 1 }}</h1> |
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
<div class="row"> |
||||||
|
<div class="span10"> |
||||||
|
|
||||||
|
<div class="action-header"> |
||||||
|
<h3>The status of the following order{{ 's' if orders|length > 1 }} will be changed:</h3> |
||||||
|
</div> |
||||||
|
|
||||||
|
<form action="{{ request.resource_url(context, 'stati') }}" method="POST" class="action"> |
||||||
|
<input type="hidden" name="csrf_token" value="{{get_csrf_token()}}"> |
||||||
|
|
||||||
|
<table class="table"> |
||||||
|
<thead> |
||||||
|
<th>Date Created</th> |
||||||
|
<th>CAS / Description</th> |
||||||
|
<th>Placed by</th> |
||||||
|
<th>Status</th> |
||||||
|
</thead> |
||||||
|
|
||||||
|
<tbody> |
||||||
|
{% for order in orders %} |
||||||
|
<tr> |
||||||
|
<td>{{ order.created_date }}</td> |
||||||
|
<td>{{ order.cas_description }} </td> |
||||||
|
<td>{{ order.created_by }} </td> |
||||||
|
<td> |
||||||
|
<select name="order-{{ order.id }}" class="select-status span2"> |
||||||
|
{% for value, display in stati %} |
||||||
|
<option value="{{ value }}" {{ 'selected="selected"' if value == order.status.name }}>{{ display }}</option> |
||||||
|
{% endfor %} |
||||||
|
</select> |
||||||
|
</td> |
||||||
|
</tr> |
||||||
|
{% endfor %} |
||||||
|
</tbody> |
||||||
|
</table> |
||||||
|
|
||||||
|
<fieldset class="form-actions"> |
||||||
|
<div class="right"> |
||||||
|
<button name="change" type="submit" value="change" class="btn btn-large btn-danger">Change {{ 'Status' if orders|length > 1 else 'Stati'}}</button> |
||||||
|
<button name="cancel" type="submit" value="cancel" class="btn btn-large">Cancel</button> |
||||||
|
</div> |
||||||
|
<div class="btn-group quick-action left" data-action="order"> |
||||||
|
<a data-value="APPROVAL" href="#" class="btn btn-large btn-primary">Set all to Approval</a> |
||||||
|
<a href="#" data-toggle="dropdown" class="btn btn-large btn-primary dropdown-toggle"><span class="caret"></span></a> |
||||||
|
<ul class="dropdown-menu"> |
||||||
|
<li><a data-value="ORDERED" href="#">Set all to Ordered</a></li> |
||||||
|
<li><a data-value="COMPLETED" href="#">Set all to Completed</a></li> |
||||||
|
</ul> |
||||||
|
</div> |
||||||
|
</fieldset> |
||||||
|
|
||||||
|
</form> |
||||||
|
|
||||||
|
</div> |
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
|
||||||
|
</div> |
||||||
|
{% endblock content %} |
Reference in new issue