Add missing templates from spree_backend

This commit is contained in:
luisramos0
2019-12-26 18:55:52 +00:00
parent 784de340d1
commit 7eba657b2f
4 changed files with 30 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
$(document).ready(function() {
if ($('#customer_autocomplete_template').length > 0) {
window.customerTemplate = Handlebars.compile($('#customer_autocomplete_template').text());
}
});

View File

@@ -35,6 +35,10 @@
@import 'plugins/font-awesome';
@import 'plugins/select2';
@import 'sections/image_settings';
@import 'sections/orders';
@import 'sections/products';
@import 'hacks/mozilla';
@import 'hacks/opera';
@import 'hacks/ie';

View File

@@ -1,3 +1,5 @@
require 'open_food_network/permissions'
module Permissions
class Order
def initialize(user)

View File

@@ -0,0 +1,19 @@
<script type='text/template' id='customer_autocomplete_template'>
<div class='customer-autocomplete-item'>
<div class='customer-details'>
<h5>{{customer.email}}</h5>
{{#if bill_address.firstname }}
<strong>{{t 'bill_address' }}</strong>
{{bill_address.firstname}} {{bill_address.lastname}}<br>
{{bill_address.address1}}, {{bill_address.address2}}<br>
{{bill_address.city}}<br>
{{#if bill_address.state_id }}
{{bill_address.state.name}}
{{else}}
{{bill_address.state_name}}
{{/if}}
{{bill_address.country.name}}
{{/if}}
</div>
</div>
</script>