<h1>{{$lang.Producers}}</h1>
<a href="?p=producers-form" class="new_element">{{$lang.New_producer}}</a>
{{if count( $aProducers ) > 0}}
	<form action="?p={{$_GET.p}}" method="post">
		<fieldset>
			<table class="list">
				<thead>
					<tr>
						<th class="id">{{$lang.Id}}</th><th class="photo">{{$lang.Photo}}</th><th class="name">{{$lang.Name}}</th><th class="position">{{$lang.Position}}</th><th class="margin">{{$lang.Margin}}</th><th class="actions">{{$lang.Actions}}</th>
					</tr>
				</thead>
				<tbody>
					{{foreach from=$aProducers item=aProducer}}
						<tr>
							<td class="id">{{$aProducer.iProducer}}</td>
							<td class="photo">{{if isset( $aProducer.sLogoUrl )}}<a href="{{$config.dir_files}}{{$aProducer.sLogoUrl}}" class="photo"><img src="{{$config.dir_files}}30/{{$aProducer.sLogoUrl}}" alt="(f)"/></a>{{/if}}</td>
							<td class="name"><a href="?p={{$aActions.f}}-form&amp;iProducer={{$aProducer.iProducer}}">{{$aProducer.sName}}</a></td>
							<td class="position">{{$aProducer.iPosition}}</td>
							<td class="margin">{{if !empty( $aProducer.sMargin )}}{{$aProducer.sMargin}} <a href="?p={{$aActions.f}}-margin_ajax&amp;iProducer={{$aProducer.iProducer}}" class="colorbox"><img src="{{$config.dir_templates}}admin/images/ico/margin-producer.png" alt="producer" title="{{$lang.Update_all_margins_producer}}" /></a>{{/if}}</td>
							<td class="actions">
								<a href="?p={{$aActions.f}}-form&amp;iProducer={{$aProducer.iProducer}}"><img src="{{$config.dir_templates}}admin/images/ico/edit.png" alt="{{$lang.Edit}}" title="{{$lang.Edit}}" /></a>
								<a class="delete" href="?p={{$aActions.f}}-delete&amp;iProducer={{$aProducer.iProducer}}" onclick="return del( );"><img src="{{$config.dir_templates}}admin/images/ico/delete.png" alt="{{$lang.Delete}}" title="{{$lang.Delete}}"/></a>
							</td>
						</tr>
					{{/foreach}}
				</tbody>
			</table>
		</fieldset>
	</form>
{{else}}
	<div class="msg" id="error">
		<img src="{{$config.dir_templates}}admin/images/ico/msg_error.png" class="imgv" alt="" /> {{$lang.Data_not_found}}
	</div>
{{/if}}