Inital commit
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
<li><a href="{url path='/admin/brand'}">{intl l="Brands"}</a></li>
|
||||
</ul>
|
||||
|
||||
{module_include location='brands_top'}
|
||||
{hook name='brands.top' location='brands_top'}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -32,7 +32,7 @@
|
||||
{intl l='Brands'}
|
||||
{loop type="auth" name="can_create" role="ADMIN" resource="admin.brand" access="CREATE"}
|
||||
<span class="pull-right">
|
||||
<a class="btn btn-default btn-primary" title="{intl l='Add a new brand'}" href="#creation_dialog" data-toggle="modal">
|
||||
<a class="btn btn-primary" title="{intl l='Add a new brand'}" href="#creation_dialog" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-plus-sign"></span>
|
||||
</a>
|
||||
</span>
|
||||
@@ -46,7 +46,7 @@
|
||||
current_order=$order
|
||||
order='id'
|
||||
reverse_order='id-reverse'
|
||||
path='/admin/brands'
|
||||
path='/admin/brand'
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
@@ -83,28 +83,28 @@
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='brands_table_header'}
|
||||
{hook name='brands.table-header' location='brands_table_header'}
|
||||
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="brands" type="brand" visible="*" backend_context="1" lang=$lang_id order=$order}
|
||||
{loop name="brands" type="brand" visible="*" backend_context="1" lang=$lang_id order=$order return_url=false}
|
||||
<tr>
|
||||
<td>{$ID}</td>
|
||||
|
||||
<td>
|
||||
{loop type="image" name="folder_image" source="brand" source_id="$ID" limit="1" width="50" height="50" resize_mode="crop" backend_context="1"}
|
||||
<a href="{url path="admin/brand/update/$OBJECT_ID"}" title="{intl l='Edit this brand'}">
|
||||
<img src="{$IMAGE_URL}" alt="{$TITLE}" />
|
||||
<img src="{$IMAGE_URL nofilter}" alt="{$TITLE}" />
|
||||
</a>
|
||||
{/loop}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.brand" access="UPDATE"}
|
||||
<a title="{intl l='Change this brand'}" href="{url path="/admin/brand/update/$ID"}">{$TITLE}</a>
|
||||
<a title="{intl l='Change this brand'}" href="{url path="/admin/brand/update/%id" id=$ID}">{$TITLE}</a>
|
||||
{/loop}
|
||||
{elseloop rel="can_change"}
|
||||
{$TITLE}
|
||||
@@ -137,18 +137,21 @@
|
||||
{/elseloop}
|
||||
</td>
|
||||
|
||||
{module_include location='brands_table_row'}
|
||||
{hook name='brands.table-row' location='brands_table_row' brand_id={$ID}}
|
||||
|
||||
<td class="actions">
|
||||
<div class="btn-group">
|
||||
<div class="btn-toolbar btn toolbar-primary">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
</div>
|
||||
<div class="toolbar-options hidden">
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.brand" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs brand-change" title="{intl l='Change this brand'}" href="{url path="/admin/brand/update/$ID"}">
|
||||
<a class="brand-change" title="{intl l='Change this brand'}" href="{url path="/admin/brand/update/%id" id=$ID}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.brand" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs brand-delete" title="{intl l='Delete this brand'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<a class="brand-delete" title="{intl l='Delete this brand'}" href="#delete_dialog" data-id="{$ID}" data-toggle="modal">
|
||||
<span class="glyphicon glyphicon-trash"></span>
|
||||
</a>
|
||||
{/loop}
|
||||
@@ -158,7 +161,7 @@
|
||||
{/loop}
|
||||
{elseloop rel="brands"}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<td colspan="100">
|
||||
<div class="alert alert-info">
|
||||
{intl l="No brand has been created yet. Click the + button to create one."}
|
||||
</div>
|
||||
@@ -172,7 +175,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{module_include location='brands_bottom'}
|
||||
{hook name='brands.bottom' location='brands_bottom'}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
@@ -184,34 +187,29 @@
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "creation_dialog"}
|
||||
{form_hidden_fields form=$form}
|
||||
{form_hidden_fields exclude="locale"}
|
||||
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
{render_form_field field="success_url" value={url path='/admin/brand/update/_ID_'}}
|
||||
|
||||
{render_form_field form=$form field="locale" value=$LOCALE}
|
||||
{/loop}
|
||||
|
||||
{render_form_field form=$form field="success_url" value={url path='/admin/brand/update/_ID_'}}
|
||||
|
||||
{custom_render_form_field form=$form field="title"}
|
||||
{custom_render_form_field field="title"}
|
||||
{loop type="lang" name="default-lang" default_only="1"}
|
||||
{* Switch edition to the current locale *}
|
||||
<input type="hidden" name="edit_language_id" value="{$ID}" />
|
||||
|
||||
{render_form_field form=$form field="locale" value=$LOCALE}
|
||||
{render_form_field field="locale" value=$LOCALE}
|
||||
|
||||
<div class="input-group">
|
||||
<input type="text" {form_field_attributes form=$form field="title"}>
|
||||
<input type="text" {form_field_attributes field="title"}>
|
||||
<span class="input-group-addon"><img src="{image file="assets/img/flags/{$CODE}.png"}" alt="{$TITLE}" /></span>
|
||||
</div>
|
||||
{/loop}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{render_form_field form=$form field="visible"}
|
||||
{custom_render_form_field field="visible"}
|
||||
<input type="checkbox" checked {form_field_attributes field="visible"}> {$label}
|
||||
{/custom_render_form_field}
|
||||
|
||||
{module_include location='brand_create_form'}
|
||||
{hook name='brand.create-form' location='brand_create_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
@@ -225,7 +223,7 @@
|
||||
dialog_ok_label = {intl l="Create this brand"}
|
||||
|
||||
form_action = {url path='/admin/brand/create'}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_enctype = {form_enctype}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
{/form}
|
||||
@@ -236,7 +234,7 @@
|
||||
{capture "delete_dialog"}
|
||||
<input type="hidden" name="brand_id" id="brand_delete_id" value="" />
|
||||
|
||||
{module_include location='brand_delete_form'}
|
||||
{hook name='brand.delete-form' location='brand_delete_form'}
|
||||
|
||||
{/capture}
|
||||
|
||||
@@ -247,7 +245,7 @@
|
||||
dialog_title = {intl l="Delete brand"}
|
||||
dialog_message = {intl l="Do you really want to delete this brand ?"}
|
||||
|
||||
form_action = {url path='/admin/brand/delete'}
|
||||
form_action = {token_url path='/admin/brand/delete'}
|
||||
form_content = {$smarty.capture.delete_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
@@ -314,5 +312,5 @@
|
||||
{/block}
|
||||
|
||||
{block name="javascript-last-call"}
|
||||
{module_include location='brands-js'}
|
||||
{hook name='brand.js' location='brand_js'}
|
||||
{/block}
|
||||
Reference in New Issue
Block a user