ClickAndCollect : quasiment terminé
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
{extends file="admin-layout.tpl"}
|
||||
|
||||
{block name="page-title"}{intl l='My places' d="pointretrait"}{/block}
|
||||
{block name="page-title"}{intl l='My places' d="clickandcollect"}{/block}
|
||||
|
||||
{block name="check-access"}update{/block}
|
||||
{block name="check-module"}PointRetrait{/block}
|
||||
{block name="check-module"}ClickAndCollect{/block}
|
||||
|
||||
{block name="after-bootstrap-css"}
|
||||
<link rel="stylesheet"
|
||||
@@ -19,36 +19,36 @@
|
||||
|
||||
<div class="general-block-decorator">
|
||||
<div class="title title-without-tabs">
|
||||
{intl l="Edit a place" d="pointretrait"} : <b>{loop name="places" type="pdr_places" id={$place_id}}{$TITLE}{/loop}</b>
|
||||
{intl l="Edit a place" d="clickandcollect"} : <b>{loop name="places" type="pdr_places" id={$place_id}}{$TITLE}{/loop}</b>
|
||||
</div>
|
||||
|
||||
<ul class="nav nav-tabs" id="tabbed-menu">
|
||||
{loop name="auth-general" type="auth" role="ADMIN" resource="admin" access="VIEW" module="ClickAndCollect"}
|
||||
<li class="active"><a href="#main" data-toggle="tab">{intl l="Main" d="pointretrait"}</a></li>
|
||||
<li class="active"><a href="#main" data-toggle="tab">{intl l="Main" d="clickandcollect"}</a></li>
|
||||
{/loop}
|
||||
{loop name="auth-schedule" type="auth" role="ADMIN" resource="admin.schedule" access="VIEW" module="ClickAndCollect"}
|
||||
<li><a href="#schedule" data-toggle="tab">{intl l="Schedule" d="pointretrait"}</a></li>
|
||||
<li><a href="#schedule" data-toggle="tab">{intl l="Schedule" d="clickandcollect"}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
|
||||
<div class="tab-content">
|
||||
{loop name="auth-general-tab" type="auth" role="ADMIN" resource="admin" access="VIEW" module="ClickAndCollect"}
|
||||
<div class="tab-pane fade in active" id="main">
|
||||
{include file="includes/main.html"}
|
||||
{include file="includes/cnc-main.html"}
|
||||
</div>
|
||||
{/loop}
|
||||
{loop name="auth-schedule-tab" type="auth" role="ADMIN" resource="admin.schedule" access="VIEW" module="ClickAndCollect"}
|
||||
<div class="tab-pane fade" id="schedule">
|
||||
{include file="includes/schedule.html"}
|
||||
{include file="includes/cnc-schedule.html"}
|
||||
</div>
|
||||
{/loop}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" id="message-pas-de-coordonnees" value="{intl l='Message no location' d='pointretrait'}" />
|
||||
<input type="hidden" id="message-pas-de-coordonnees" value="{intl l='Message no location' d='clickandcollect'}" />
|
||||
</div>
|
||||
|
||||
{include file="modal/schedule-modal.html"}
|
||||
{include file="modal/cnc-schedule-modal.html"}
|
||||
|
||||
{/block}
|
||||
|
||||
@@ -77,6 +77,6 @@
|
||||
});
|
||||
</script>
|
||||
{/javascripts}
|
||||
{include file="js/main-js.html"}
|
||||
{include file="js/schedule-js.html"}
|
||||
{include file="js/cnc-main-js.html"}
|
||||
{include file="js/cnc-schedule-js.html"}
|
||||
{/block}
|
||||
@@ -23,7 +23,7 @@
|
||||
<div class="table-responsive">
|
||||
<table class="table table-striped table-condensed" id="areas-table">
|
||||
<caption class="clearfix">
|
||||
{intl l='My deposit places' d='clickandcollect'}
|
||||
{intl l='My Click and Collect places' d='clickandcollect'}
|
||||
</caption>
|
||||
|
||||
<thead>
|
||||
@@ -51,7 +51,7 @@
|
||||
</caption>
|
||||
|
||||
<tbody>
|
||||
{loop name="places" type="pdr_places"}
|
||||
{loop name="places" type="pdr_places" click_and_collect=1}
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/module/ClickAndCollect/edit?place_id=$ID"}">{$TITLE}</a></td>
|
||||
<td>
|
||||
@@ -61,16 +61,24 @@
|
||||
<input type="checkbox" class="link" {if $ACTIVE == 1}checked="checked"{/if}>
|
||||
</div>
|
||||
</td>
|
||||
<td>{$ADDRESS1}<br>{$ZIPCODE} {$CITY}{if $LATITUDE eq '' or $LONGITUDE eq ''}<img src="{image file='assets/img/pin.svg' source='PointRetrait'}" title="Pas de coordonnées pour ce point de retrait" alt="Pas de coordonnées" class="pin-pdr" />{/if}</td>
|
||||
<td>{$DELIVERY_DAYS}{if $DELIVERY_DAYS eq ''}<i>{intl l="There is no schedule for this place" d='clickandcollect'}</i>{/if}</td>
|
||||
<td>{$ADDRESS1}<br>{$ZIPCODE} {$CITY}{if $LATITUDE eq '' or $LONGITUDE eq ''}<img src="{image file='assets/img/pin.svg' source='ClickAndCollect'}" title="Pas de coordonnées pour ce point de retrait" alt="Pas de coordonnées" class="pin-pdr" />{/if}</td>
|
||||
<td>
|
||||
{if $DELIVERY_DAYS eq ''}
|
||||
<i>{intl l="There is no schedule for this place" d='clickandcollect'}</i>
|
||||
{else}
|
||||
{loop name="schedules-loop" type="pdr_schedule" place_id={$ID}}
|
||||
{$DAY_LABEL} de {format_date date=$BEGIN format="H\hi"} à {format_date date=$END format="H\hi"}<br>
|
||||
{/loop}
|
||||
{/if}
|
||||
</td>
|
||||
<td>{$PRICE} €</td>
|
||||
<td>{$MINIMUM_AMOUNT} €</td>
|
||||
<td class="actions">
|
||||
<div class="btn-group" role="group">
|
||||
<a class="btn btn-info btn-responsive" title="{intl l='Edit this place'}" href="{url path="/admin/module/ClickAndCollect/edit?place_id=$ID"}">
|
||||
<a class="btn btn-info btn-responsive" title="{intl l='Edit this place' d='clickandcollect'}" href="{url path="/admin/module/ClickAndCollect/edit?place_id=$ID"}">
|
||||
<i class="glyphicon glyphicon-edit"></i>
|
||||
</a>
|
||||
<a class="btn btn-danger btn-responsive place-delete" title="{intl l='Delete this place'}" data-target="#place-delete" data-toggle="modal" data-id="{$ID}">
|
||||
<a class="btn btn-danger btn-responsive place-delete" title="{intl l='Delete this place' d='clickandcollect'}" data-target="#place-delete" data-toggle="modal" data-id="{$ID}">
|
||||
<i class="glyphicon glyphicon-trash"></i>
|
||||
</a>
|
||||
</div>
|
||||
@@ -85,14 +93,14 @@
|
||||
</div>
|
||||
|
||||
{* CREATE Modal *}
|
||||
{form name="pdr.place.create"}
|
||||
{form name="cnc.place.create"}
|
||||
{capture "place_create"}
|
||||
{include file="form/place-create.html" form_name="pdr.place.create"}
|
||||
{include file="form/cnc-place-create.html" form_name="cnc.place.create"}
|
||||
{/capture}
|
||||
|
||||
{include file="includes/generic-create-dialog.html"
|
||||
dialog_id = "place-create-modal"
|
||||
dialog_title = {intl l="Create a new place" d="pointretrait"}
|
||||
dialog_title = {intl l="Create a new place" d="clickandcollect"}
|
||||
dialog_body = {$smarty.capture.place_create nofilter}
|
||||
dialog_ok_label = {intl l="Create"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
@@ -103,14 +111,14 @@
|
||||
|
||||
{* DELETE modal *}
|
||||
{capture "place_delete"}
|
||||
{intl l="Do you really want to remove this place ?" d="pointretrait"}
|
||||
{intl l="Do you really want to remove this place ?" d="clickandcollect"}
|
||||
<input type="hidden" name="attr-place-id" id="attr-place-id" value="999"/>
|
||||
<input type="hidden" name="success_url" value="{url path='/admin/module/ClickAndCollect'}"/>
|
||||
{/capture}
|
||||
|
||||
{include file="includes/generic-confirm-dialog.html"
|
||||
dialog_id = "place-delete"
|
||||
dialog_title = {intl l="Delete a place" d="pointretrait"}
|
||||
dialog_title = {intl l="Delete a place" d="clickandcollect"}
|
||||
dialog_message = {$smarty.capture.place_delete nofilter}
|
||||
dialog_ok_label = {intl l="Delete"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
{form name=$form_name}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{render_form_field form=$form field="success_url" value={$success_url|default:{url path='/admin/module/PointRetrait'}}}
|
||||
{render_form_field form=$form field="success_url" value={$success_url|default:{url path='/admin/module/ClickAndCollect'}}}
|
||||
|
||||
{form_field form=$form field="title"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{form_field form=$form field="price"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
{form_field form=$form field="minimum_amount"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
{form_field form=$form field="address1"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
{form_field form=$form field="address2"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
{form_field form=$form field="zipcode"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
{form_field form=$form field="city"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -99,4 +99,8 @@
|
||||
<input type="hidden" id="{$label_attr.for}" name="{$name}" value="1"/>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="click_and_collect"}
|
||||
<input type="hidden" id="{$label_attr.for}" name="{$name}" value="1"/>
|
||||
{/form_field}
|
||||
|
||||
{/form}
|
||||
@@ -1,8 +1,8 @@
|
||||
{form name=$form_name}
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{render_form_field form=$form field="success_url" value={url path="/admin/module/PointRetrait/edit?place_id={$place_id}#schedule"}}
|
||||
{render_form_field form=$form field="error_url" value={url path="/admin/module/PointRetrait/edit?place_id={$place_id}#schedule"}}
|
||||
{render_form_field form=$form field="success_url" value={url path="/admin/module/ClickAndCollect/edit?place_id={$place_id}#schedule"}}
|
||||
{render_form_field form=$form field="error_url" value={url path="/admin/module/ClickAndCollect/edit?place_id={$place_id}#schedule"}}
|
||||
|
||||
{form_field form=$form field="place_id"}
|
||||
<div class="form-group hidden">
|
||||
@@ -50,7 +50,7 @@
|
||||
|
||||
{form_error form=$form field="begin_time"}{$message}{/form_error}
|
||||
<div class='input-group time' id="{$label_attr.for}">
|
||||
<input type='text' class="form-control" name="{$name}" value="{$BEGIN|default:"14:00"}"/>
|
||||
<input type='text' class="form-control" name="{$name}" value="{$BEGIN|default:"08:00"}"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-time"></span>
|
||||
</span>
|
||||
@@ -66,7 +66,7 @@
|
||||
|
||||
{form_error form=$form field="end_time"}{$message}{/form_error}
|
||||
<div class='input-group time' id="{$label_attr.for}">
|
||||
<input type='text' class="form-control" name="{$name}" value="{$END|default:"16:00"}"/>
|
||||
<input type='text' class="form-control" name="{$name}" value="{$END|default:"18:00"}"/>
|
||||
<span class="input-group-addon">
|
||||
<span class="glyphicon glyphicon-time"></span>
|
||||
</span>
|
||||
@@ -1,4 +1,4 @@
|
||||
{form name='pdr.place.view.main'}
|
||||
{form name='cnc.place.view.main'}
|
||||
<div class="form-container">
|
||||
|
||||
{if $form_error}
|
||||
@@ -6,14 +6,14 @@
|
||||
{/if}
|
||||
|
||||
{loop name="places" type="pdr_places" id="$place_id"}
|
||||
<form action="{url path='/admin/module/PointRetrait/edit' place_id=$place_id}" method="POST" class="clearfix" {form_enctype form=$form}>
|
||||
<form action="{url path='/admin/module/ClickAndCollect/edit' place_id=$place_id}" method="POST" class="clearfix" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{include file = "includes/inner-form-toolbar.html"
|
||||
hide_flags = true
|
||||
hide_submit_buttons = false
|
||||
page_url = "{url path='/admin/module/PointRetrait/edit&place_id=$place_id'}"
|
||||
close_url = "{url path='/admin/module/PointRetrait'}"
|
||||
page_url = "{url path='/admin/module/ClickAndCollect/edit&place_id=$place_id'}"
|
||||
close_url = "{url path='/admin/module/ClickAndCollect'}"
|
||||
current_tab = "main"
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
{form_field form=$form field="title"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d='pointretrait'}
|
||||
{intl l=$label d='clickandcollect'}
|
||||
</label>
|
||||
<input type="text" id="{$label_attr.for}" class="form-control large" name="{$name}" value="{$TITLE}" {if $required}required{/if} /> 
|
||||
</div>
|
||||
@@ -38,7 +38,7 @@
|
||||
{form_field form=$form field="active"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
</label>
|
||||
|
||||
<div class="make-switch switch-small toggle-active" data-id="{$ID}" data-on="success"
|
||||
@@ -49,17 +49,21 @@
|
||||
<input type="hidden" id="{$label_attr.for}" name="{$name}" value="{$ACTIVE}"/>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="click_and_collect"}
|
||||
<input type="hidden" value="1" id="{$label_attr.for}" name="{$name}">
|
||||
{/form_field}
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-2">
|
||||
{form_field form=$form field="price"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$PRICE}" {if $required}required{/if} /> €
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$PRICE}" {if $required}required{/if} />
|
||||
</div>
|
||||
{form_error form=$form field="price"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
@@ -69,11 +73,11 @@
|
||||
{form_field form=$form field="minimum_amount"}
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$MINIMUM_AMOUNT}" {if $required}required{/if} /> €
|
||||
<input type="text" id="{$label_attr.for}" class="form-control etroit" name="{$name}" value="{$MINIMUM_AMOUNT}" {if $required}required{/if} />
|
||||
</div>
|
||||
{form_error form=$form field="minimum_amount"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
@@ -86,7 +90,7 @@
|
||||
{form_field form=$form field="address1"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -104,7 +108,7 @@
|
||||
{form_field form=$form field="address2"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -122,7 +126,7 @@
|
||||
{form_field form=$form field="zipcode"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -137,7 +141,7 @@
|
||||
{form_field form=$form field="city"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
@@ -155,22 +159,22 @@
|
||||
{form_field form=$form field="access_comment"}
|
||||
<div class="form-group">
|
||||
<label class="control-label" for="{$label_attr.for}">
|
||||
{intl l=$label d="pointretrait"}
|
||||
{intl l=$label d="clickandcollect"}
|
||||
{if $required}<span class="required">*</span>{/if}
|
||||
</label>
|
||||
|
||||
<div class="control-input">
|
||||
<textarea id="{$label_attr.for}" name="{$name}" maxlength="400" class="form-control">{if $form_error}{$value}{/if}{$ACCESS_COMMENT}</textarea>
|
||||
</div>
|
||||
<span class="help-block">{intl l="Access comment help" d="pointretrait"}</span>
|
||||
<span class="help-block">{intl l="Access comment help" d="clickandcollect"}</span>
|
||||
</div>
|
||||
{form_error form=$form field="access_comment"}{$message}{/form_error}
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<div class="bouton-geoloc">
|
||||
<img src="{image file='assets/img/compass.svg' source='PointRetrait'}" alt="Geolocate" id="submit-geoloc"/>
|
||||
<span>{intl l="Recenter map" d="pointretrait"}</span>
|
||||
<img src="{image file='assets/img/compass.svg' source='ClickAndCollect'}" alt="Geolocate" id="submit-geoloc"/>
|
||||
<span>{intl l="Recenter map" d="clickandcollect"}</span>
|
||||
</div>
|
||||
{form_field form=$form field="latitude"}
|
||||
<input type="hidden" value="{$LATITUDE}" id="{$label_attr.for}" name="{$name}">
|
||||
@@ -1,18 +1,18 @@
|
||||
{form name='pdr.place.view.schedule'}
|
||||
{form name='cnc.place.view.schedule'}
|
||||
<div class="form-container">
|
||||
|
||||
{if $form_error}
|
||||
<div class="alert alert-danger">{$form_error_message}</div>
|
||||
{/if}
|
||||
|
||||
<form action="{url path="/admin/module/PointRetrait/edit?place_id={$place_id}"}" method="POST" class="clearfix" {form_enctype form=$form}>
|
||||
<form action="{url path="/admin/module/ClickAndCollect/edit?place_id={$place_id}"}" method="POST" class="clearfix" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
{include
|
||||
file = "includes/inner-form-toolbar.html"
|
||||
hide_flags = true
|
||||
hide_submit_buttons = true
|
||||
close_url = "{url path='/admin/module/PointRetrait'}"
|
||||
close_url = "{url path='/admin/module/ClickAndCollect'}"
|
||||
current_tab = "schedule"
|
||||
}
|
||||
|
||||
@@ -26,10 +26,10 @@
|
||||
<table class="table table-striped table-condensed">
|
||||
|
||||
<caption class="clearfix">
|
||||
{loop name="auth-create" type="auth" role="ADMIN" resource="admin.pdr.schedule" access="CREATE" module="ClickAndCollect"}
|
||||
{loop name="auth-create" type="auth" role="ADMIN" resource="admin.cnc.schedule" access="CREATE" module="ClickAndCollect"}
|
||||
<div class="pull-right">
|
||||
<a class="btn btn-default btn-primary place-schedule-create"
|
||||
title="{intl l='Add a new withdrawal day' d='pointretrait'}"
|
||||
title="{intl l='Add a new opening day' d='clickandcollect'}"
|
||||
data-target="#place-schedule-create" data-toggle="modal">
|
||||
<i class="glyphicon glyphicon-plus-sign"></i>
|
||||
</a>
|
||||
@@ -39,10 +39,10 @@
|
||||
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Withdrawal day" d="pointretrait"}</th>
|
||||
<th>{intl l="Withdrawal beginning time" d="pointretrait"}</th>
|
||||
<th>{intl l="Withdrawal ending time" d="pointretrait"}</th>
|
||||
<th>{intl l="Actions" d="pointretrait"}</th>
|
||||
<th>{intl l="Working day" d="clickandcollect"}</th>
|
||||
<th>{intl l="Start time" d="clickandcollect"}</th>
|
||||
<th>{intl l="End time" d="clickandcollect"}</th>
|
||||
<th>{intl l="Actions" d="clickandcollect"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
@@ -55,9 +55,9 @@
|
||||
{* Actions *}
|
||||
<td>
|
||||
<div class="btn-group">
|
||||
{loop name="auth-edit" type="auth" role="ADMIN" resource="admin.pdr.schedule" access="UPDATE" module="ClickAndCollect"}
|
||||
{loop name="auth-edit" type="auth" role="ADMIN" resource="admin.cnc.schedule" access="UPDATE" module="ClickAndCollect"}
|
||||
<a class="btn btn-info btn-responsive place-schedule-update-default"
|
||||
title="{intl l='Edit this withdrawal day' d='pointretrait'}"
|
||||
title="{intl l='Edit this working day' d='clickandcollect'}"
|
||||
data-target="#place-schedule-update" data-toggle="modal" data-id="{$ID}"
|
||||
data-day="{$DAY}"
|
||||
data-begin="{format_date date=$BEGIN format='H:i'}"
|
||||
@@ -65,9 +65,9 @@
|
||||
<i class="glyphicon glyphicon-edit"></i>
|
||||
</a>
|
||||
{/loop}
|
||||
{loop name="auth-delete" type="auth" role="ADMIN" resource="admin.pdr.schedule" access="DELETE" module="ClickAndCollect"}
|
||||
{loop name="auth-delete" type="auth" role="ADMIN" resource="admin.cnc.schedule" access="DELETE" module="ClickAndCollect"}
|
||||
<a class="btn btn-danger btn-responsive place-schedule-delete"
|
||||
title="{intl l='Delete this withdrawal day' d='pointretrait'}"
|
||||
title="{intl l='Delete this working day' d='clickandcollect'}"
|
||||
data-target="#place-schedule-delete" data-toggle="modal" data-id="{$ID}">
|
||||
<i class="glyphicon glyphicon-trash"></i>
|
||||
</a>
|
||||
@@ -81,7 +81,7 @@
|
||||
<tr>
|
||||
<td colspan="1000">
|
||||
<div class="alert alert-info">
|
||||
{intl l="There is no schedule for this place" d="pointretrait"}
|
||||
{intl l="There is no schedule for this place" d="clickandcollect"}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
@@ -33,7 +33,6 @@
|
||||
marker = new google.maps.Marker({
|
||||
position: new google.maps.LatLng($("#latitude").val(), $("#longitude").val()),
|
||||
map: map,
|
||||
draggable: true,
|
||||
title: $(document.getElementById("title")).val()
|
||||
});
|
||||
}
|
||||
@@ -53,8 +52,7 @@
|
||||
resultsMap.setCenter(results[0].geometry.location);
|
||||
marker = new google.maps.Marker({
|
||||
map: resultsMap,
|
||||
position: results[0].geometry.location,
|
||||
draggable: true
|
||||
position: results[0].geometry.location
|
||||
});
|
||||
$("#latitude").val(results[0].geometry.location.lat);
|
||||
$("#longitude").val(results[0].geometry.location.lng);
|
||||
@@ -1,3 +1,3 @@
|
||||
<li class="{if $admin_current_location == 'clickandcollect'}active{/if}" id="clickandcollect">
|
||||
<a title="{intl l='Module name' d='clickandcollect'}" href="{url path='/admin/module/ClickAndCollect'}" ><span class="glyphicon glyphicon-pushpin"></span> {intl l='Module name' d='clickandcollect'}</a>
|
||||
<a title="{intl l='Module name' d='clickandcollect'}" href="{url path='/admin/module/ClickAndCollect'}" ><span class="glyphicon glyphicon-home"></span> {intl l='Module name' d='clickandcollect'}</a>
|
||||
</li>
|
||||
@@ -1,23 +1,23 @@
|
||||
{* DELETE modal *}
|
||||
{capture "schedule_delete"}
|
||||
{intl l="Do you really want to remove this schedule entry ?" d="pointretrait"}
|
||||
{intl l="Do you really want to remove this schedule entry ?" d="clickandcollect"}
|
||||
<input type="hidden" name="schedule_id" id="attr-place-schedule-id-delete" value=""/>
|
||||
<input type="hidden" name="place_id" value="{$smarty.get.place_id}"/>
|
||||
<input type="hidden" name="success_url" value="{url path="/admin/module/PointRetrait/edit?area_id={$area_id}#schedule"}"/>
|
||||
<input type="hidden" name="success_url" value="{url path="/admin/module/ClickAndCollect/edit?area_id={$area_id}#schedule"}"/>
|
||||
{/capture}
|
||||
|
||||
{include file="includes/generic-confirm-dialog.html"
|
||||
dialog_id = "place-schedule-delete"
|
||||
dialog_title = {intl l="Delete an entry of schedule" d="pointretrait"}
|
||||
dialog_title = {intl l="Delete an entry of schedule" d="clickandcollect"}
|
||||
dialog_message = {$smarty.capture.schedule_delete nofilter}
|
||||
dialog_ok_label = {intl l="Delete"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
form_action = {token_url path='/admin/module/PointRetrait/schedule/delete'}
|
||||
form_action = {token_url path='/admin/module/ClickAndCollect/schedule/delete'}
|
||||
}
|
||||
|
||||
|
||||
{* UPDATE Modal*}
|
||||
{form name="pdr.place.update.schedule"}
|
||||
{form name="cnc.place.update.schedule"}
|
||||
{capture "schedule_update"}
|
||||
{form_field form=$form field="place-schedule_id"}
|
||||
<input type="hidden" name="schedule_id" id="attr-place-schedule-id-update" value=""/>
|
||||
@@ -26,34 +26,34 @@
|
||||
<input type="hidden" name="place_id" id="place_id" value="{$smarty.get.place_id}"/>
|
||||
{/form_field}
|
||||
|
||||
{include file="form/place-schedule-create.html" form_name="pdr.place.update.schedule" update=true}
|
||||
{include file="form/cnc-place-schedule-create.html" form_name="cnc.place.update.schedule" update=true}
|
||||
{/capture}
|
||||
|
||||
{include file="includes/generic-create-dialog.html"
|
||||
dialog_id = "place-schedule-update"
|
||||
dialog_title = {intl l="Edit this withdrawal day" d="pointretrait"}
|
||||
dialog_title = {intl l="Edit this opening day" d="clickandcollect"}
|
||||
dialog_body = {$smarty.capture.schedule_update nofilter}
|
||||
dialog_ok_label = {intl l="Save"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
form_action = {url path='admin/module/PointRetrait/schedule/update'}
|
||||
form_action = {url path='admin/module/ClickAndCollect/schedule/update'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
}
|
||||
{/form}
|
||||
|
||||
|
||||
{* CREATE Modal *}
|
||||
{form name="pdr.place.create.schedule"}
|
||||
{form name="cnc.place.create.schedule"}
|
||||
{capture "schedule_create"}
|
||||
{include file="form/place-schedule-create.html" form_name="pdr.place.create.schedule" place_id=$smarty.get.place_id}
|
||||
{include file="form/cnc-place-schedule-create.html" form_name="cnc.place.create.schedule" place_id=$smarty.get.place_id}
|
||||
{/capture}
|
||||
|
||||
{include file="includes/generic-create-dialog.html"
|
||||
dialog_id = "place-schedule-create"
|
||||
dialog_title = {intl l="Add a new withdrawal day" d="pointretrait"}
|
||||
dialog_title = {intl l="Add a new opening day" d="clickandcollect"}
|
||||
dialog_body = {$smarty.capture.schedule_create nofilter}
|
||||
dialog_ok_label = {intl l="Create"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
form_action = {url path="admin/module/PointRetrait/schedule/create"}
|
||||
form_action = {url path="admin/module/ClickAndCollect/schedule/create"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
}
|
||||
{/form}
|
||||
@@ -18,20 +18,41 @@
|
||||
height:450px;
|
||||
width:100%;
|
||||
}
|
||||
/********************************************/
|
||||
|
||||
tr.ligne-cnc {
|
||||
border-top: 2px solid gray !important;
|
||||
border-bottom: 1px solid gray !important;
|
||||
}
|
||||
tr.ligne-cnc:nth-child(1) {
|
||||
background-color: #f5f5f5;
|
||||
}
|
||||
tr.ligne-cnc:nth-child(1) .creneau > td {
|
||||
background-color: white;
|
||||
}
|
||||
tr.ligne-cnc:nth-child(2) {
|
||||
background-color: white;
|
||||
}
|
||||
tr.ligne-cnc > td:first-child {
|
||||
border-left: 1px solid gray !important;
|
||||
}
|
||||
tr.ligne-cnc > td:last-child {
|
||||
border-right: 1px solid gray !important;
|
||||
}
|
||||
tr.ligne-cnc td {
|
||||
padding: 5px !important;
|
||||
}
|
||||
|
||||
tr.ligne-pdr > td {
|
||||
border: 1px solid gray !important;
|
||||
}
|
||||
.ligne-pdr > td {
|
||||
padding: 5px !important;
|
||||
}
|
||||
.creneau > td {
|
||||
text-align: left !important;
|
||||
font-size: 1.2rem;
|
||||
padding: 2px 0 2px 20px !important;
|
||||
}
|
||||
.creneau:first-child > td {
|
||||
padding-top: 10px !important;
|
||||
}
|
||||
|
||||
div.titre-pdr {
|
||||
div.titre-cnc {
|
||||
font-size: 1.6rem;
|
||||
color: #e74c3c;
|
||||
font-weight: 600;
|
||||
@@ -46,7 +67,11 @@ div.titre-pdr {
|
||||
}
|
||||
.table-schedule {
|
||||
background-color: #f5f5f5 !important;
|
||||
border-color: white !important;
|
||||
border: none !important;
|
||||
}
|
||||
.cnc-bouton-radio {
|
||||
vertical-align:middle !important;
|
||||
text-align: center !important;
|
||||
}
|
||||
|
||||
.img-pin {
|
||||
@@ -63,3 +88,11 @@ span.pin-number {
|
||||
color: #e74c3c;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.next-date {
|
||||
color: #e74c3c;
|
||||
font-weight: 400;
|
||||
}
|
||||
.next-date .b {
|
||||
font-weight: 900;
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<div class="panel panel-default col-sm-6">
|
||||
{loop type="pdr_places" name="place-loop" id={$place_id}}
|
||||
<div class="panel-heading">{intl l="Order to withdraw" d="pointretrait"}</div>
|
||||
<div class="panel-heading">{intl l="Order to withdraw" d="clickandcollect"}</div>
|
||||
<div class="panel-body">
|
||||
<span class="org"><strong>{$TITLE}</strong></span>
|
||||
<address class="adr">
|
||||
@@ -15,9 +15,9 @@
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
<div class="panel-heading">{intl l="Scheduled date" d="clickandcollect"}</div>
|
||||
<div class="panel-heading">{intl l="Starting date" d="clickandcollect"}</div>
|
||||
<div class="panel-body">
|
||||
<span>{$day} entre {format_date date=$begin_time format="H\hi"} et {format_date date=$end_time format="H\hi"}</span>
|
||||
<span>{$day}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -1,16 +1,17 @@
|
||||
<script type="text/html" id="pdr_ui">
|
||||
<script type="text/html" id="cnc_ui">
|
||||
|
||||
{loop type="pdr_places" name="places-first-loop"}
|
||||
{assign var=module_id value=$MODULE_ID}
|
||||
{loop type="delivery" name="cnc-delivery-loop" code="clickandcollect"}
|
||||
{assign var=cnc_module_id value=$ID}
|
||||
{/loop}
|
||||
|
||||
<td colspan="3">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-4">
|
||||
{form name="thelia.order.delivery"}
|
||||
{form_field field='delivery-module'}
|
||||
<label for="delivery-method_{$module_id}">
|
||||
<input type="radio" delivery-mode="cnc" name="{$name}" id="delivery-method_{$module_id}" value="{$module_id}">
|
||||
<label for="delivery-method_{$cnc_module_id}">
|
||||
<input type="radio" delivery-mode="cnc" name="{$name}" id="delivery-method_{$cnc_module_id}" value="{$cnc_module_id}">
|
||||
<strong>{intl l="Module name - customer" d="clickandcollect"}</strong>
|
||||
<br>
|
||||
</label>
|
||||
@@ -20,15 +21,17 @@
|
||||
<div class="col-sm-4"> </div>
|
||||
</div>
|
||||
|
||||
<div class="row message-explicatif">{intl l="Message explicatif" d="clickandcollect"}</div>
|
||||
|
||||
<div class="row" id="select-cnc">
|
||||
<div class="col-md-5">
|
||||
{form name="thelia.order.delivery"}
|
||||
<div class="table-responsive" style="border: 0px solid gray">
|
||||
<table class="table table-condensed table-main">
|
||||
{loop type="pdr_places" name="places-loop" active=true click_and_collect=1 order="city"}
|
||||
<tr class="ligne-pdr">
|
||||
{loop type="pdr_places" name="places-loop-cnc" active=true click_and_collect=1 order="city"}
|
||||
<tr class="ligne-cnc">
|
||||
<td>
|
||||
<div class="titre-pdr"><img src="{image file='assets/img/pin.png' source='ClickAndCollect'}" class="img-pin"><span class="pin-number">{$ID}</span>{$TITLE}</div>
|
||||
<div class="titre-cnc"><img src="{image file='assets/img/pin.png' source='ClickAndCollect'}" class="img-pin"><span class="pin-number">{$ID}</span>{$TITLE}</div>
|
||||
<span class="adresse">{$ADDRESS1}</span><br>
|
||||
<span class="adresse">{$ZIPCODE} {$CITY}</span><br>
|
||||
{if {cart attr='total_taxed_price_without_discount'} < $MINIMUM_AMOUNT}
|
||||
@@ -37,15 +40,22 @@
|
||||
</div>
|
||||
{else}
|
||||
<table class="table table-schedule">
|
||||
{assign var="nextDate" value=""}
|
||||
{loop type="pdr_schedule" name="schedule-loop" place_id={$ID}}
|
||||
<tr class="creneau">
|
||||
<td style="padding:10px; text-align: center">{$DAY_LABEL} {$CALCULATED_DAY} {format_date date=$BEGIN format="H\hi"} à {format_date date=$END format="H\hi"}</td>
|
||||
<td style="padding:10px; text-align: center"><input type="radio" name="pdr-choosen-day" value="{$ID}"{if {cart attr='total_taxed_price_without_discount'} < $MINIMUM_AMOUNT} disabled{/if} /></td>
|
||||
<td>{$DAY_LABEL}</td>
|
||||
<td>{format_date date=$BEGIN format="H\hi"}</td>
|
||||
<td>{format_date date=$END format="H\hi"}</td>
|
||||
</tr>
|
||||
{if $nextDate eq ''}
|
||||
{assign var="nextDate" value="$DAY_LABEL $CALCULATED_DAY"}
|
||||
{/if}
|
||||
{/loop}
|
||||
</table>
|
||||
{/if}
|
||||
|
||||
<div class="next-date">{intl l="Message availability" d="clickandcollect"} <b>{$nextDate}</b></div>
|
||||
|
||||
<div class="price">
|
||||
{if $PRICE > 0}
|
||||
{format_number number=$PRICE} €
|
||||
@@ -54,6 +64,7 @@
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
<td class="cnc-bouton-radio"><input type="radio" name="cnc-choosen-place" value="{$ID}"{if {cart attr='total_taxed_price_without_discount'} < $MINIMUM_AMOUNT} disabled{/if} /></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
</table>
|
||||
@@ -61,11 +72,11 @@
|
||||
{/form}
|
||||
</div>
|
||||
<div class="col-md-7">
|
||||
<input type="hidden" id="map-center-lat" value={{module_config module='PlanificationLivraison' key='map_center_latitude' locale='en_US'}|default:50.75075530537203} />
|
||||
<input type="hidden" id="map-center-lon" value={{module_config module='PlanificationLivraison' key='map_center_longitude' locale='en_US'}|default:2.252608244005041} />
|
||||
<input type="hidden" id="map-center-lat-cnc" value={{module_config module='PlanificationLivraison' key='map_center_latitude' locale='en_US'}|default:50.75075530537203} />
|
||||
<input type="hidden" id="map-center-lon-cnc" value={{module_config module='PlanificationLivraison' key='map_center_longitude' locale='en_US'}|default:2.252608244005041} />
|
||||
|
||||
<table id="coordinates" class="hidden">
|
||||
{loop type="pdr_places" name="places-loop" active=true order="city"}
|
||||
<table id="coordinates-cnc" class="hidden">
|
||||
{loop type="pdr_places" name="places-loop-cnc" active=true click_and_collect=1 order="city"}
|
||||
<tr>
|
||||
<td>{$ID}
|
||||
<td>{$LATITUDE}</td>
|
||||
@@ -84,28 +95,20 @@
|
||||
|
||||
<script>
|
||||
|
||||
// Masquer par défaut les options du mode PDR
|
||||
// Masquer par défaut les options du mode CNC
|
||||
$(document).ready(function(){
|
||||
$("#delivery-module-{$module_id}").html($('#cnc_ui').html());
|
||||
$("#delivery-module-{$cnc_module_id}").html($('#cnc_ui').html());
|
||||
$('#select-cnc').slideUp('fast');
|
||||
});
|
||||
|
||||
// Gestion du pliage/dépliage du mode PDR
|
||||
// Gestion du pliage/dépliage du mode CNC
|
||||
$('input[type=radio][delivery-mode]').click(function() {
|
||||
$('div[id^="select"]').not($('#select-' + $(this).attr('delivery-mode'))).slideUp();
|
||||
$('#select-' + $(this).attr('delivery-mode')).slideDown('fast');
|
||||
});
|
||||
|
||||
|
||||
function loadScript() {
|
||||
var script = document.createElement('script');
|
||||
script.type = 'text/javascript';
|
||||
script.src = "https://maps.googleapis.com/maps/api/js?callback=initMap" +
|
||||
"&key={module_config module='PlanificationLivraison' key='googlemap_api_key' locale='en_US'}";
|
||||
document.body.appendChild(script);
|
||||
}
|
||||
|
||||
function initMap() {
|
||||
function initMapCnc() {
|
||||
const LIMITES = {
|
||||
north: 50.85043724044059,
|
||||
east: 2.6869845409159923,
|
||||
@@ -114,7 +117,7 @@
|
||||
};
|
||||
|
||||
var opt = {
|
||||
center: new google.maps.LatLng($("#map-center-lat").val(), $("#map-center-lon").val()),
|
||||
center: new google.maps.LatLng($("#map-center-lat-cnc").val(), $("#map-center-lon-cnc").val()),
|
||||
zoom: 12,
|
||||
streetViewControl: true,
|
||||
mapTypeControl: true,
|
||||
@@ -124,21 +127,21 @@
|
||||
}
|
||||
};
|
||||
|
||||
Data.map = new google.maps.Map(document.getElementById('cnc_map'), opt);
|
||||
DataCnc.map = new google.maps.Map(document.getElementById('cnc_map'), opt);
|
||||
|
||||
displayPins();
|
||||
displayPinsCnc();
|
||||
}
|
||||
|
||||
function displayPins() {
|
||||
function displayPinsCnc() {
|
||||
var arrays = [];
|
||||
$('#coordinates').eq(0).find('tr').each((r,row) => arrays.push($(row).find('td,th').map((c,cell) => $(cell).text()).toArray()))
|
||||
$('#coordinates-cnc').eq(0).find('tr').each((r,row) => arrays.push($(row).find('td,th').map((c,cell) => $(cell).text()).toArray()))
|
||||
|
||||
arrays.forEach(function(place) {
|
||||
var marker = new google.maps.Marker({
|
||||
title: place[3],
|
||||
label: place[0],
|
||||
position: new google.maps.LatLng(place[1], place[2]),
|
||||
map: Data.map
|
||||
map: DataCnc.map
|
||||
});
|
||||
});
|
||||
|
||||
@@ -147,17 +150,12 @@
|
||||
|
||||
/*********************************************************/
|
||||
|
||||
var Data = {
|
||||
var DataCnc = {
|
||||
markers: [],
|
||||
map: null,
|
||||
geocoder: null,
|
||||
bounds: null
|
||||
};
|
||||
|
||||
if (typeof(google) === 'undefined') {
|
||||
loadScript();
|
||||
} else {
|
||||
initMap();
|
||||
}
|
||||
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user