Inital commit
This commit is contained in:
@@ -16,11 +16,14 @@
|
||||
label="{intl l='ID'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th> </th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$module_order
|
||||
order='alpha'
|
||||
reverse_order='alpha_reverse'
|
||||
order='title'
|
||||
reverse_order='title_reverse'
|
||||
path={url path='/admin/modules'}
|
||||
request_parameter_name='module_order'
|
||||
label="{intl l='Name'}"
|
||||
@@ -38,16 +41,7 @@
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{admin_sortable_header
|
||||
current_order=$module_order
|
||||
order='title'
|
||||
reverse_order='title_reverse'
|
||||
path={url path='/admin/modules'}
|
||||
request_parameter_name='module_order'
|
||||
label="{intl l='Description'}"
|
||||
}
|
||||
</th>
|
||||
<th>{intl l="version"}</th>
|
||||
|
||||
<th class="text-center">
|
||||
{admin_sortable_header
|
||||
@@ -71,32 +65,46 @@
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='modules_table_header'}
|
||||
{hook name="modules.table-header" location="modules_table_header" }
|
||||
|
||||
<th class="actions">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop type="module" name="module.{$module_type}" module_type={$module_type|default:1} order=$module_order backend_context=1}
|
||||
<tr {if ! $EXISTS}class="warning"{/if}>
|
||||
|
||||
{$hidden = $smarty.post.hidden|default:'0'}
|
||||
|
||||
{loop type="module" name="module.{$module_type}" module_type={$module_type|default:1} order=$module_order backend_context=1 hidden=$hidden }
|
||||
{loop type="auth" role="ADMIN" name="can_view_module.{$module_type}" access="VIEW" resource="admin.module" module=$CODE}
|
||||
<tr id="module-{$ID}" {if ! $EXISTS || $MANDATORY}class="warning"{/if}>
|
||||
<td>{$ID}</td>
|
||||
<td nowrap>
|
||||
<a href="#" class="module-information text-info" data-id="{$ID}" title="{intl l='Get more information about this module'}"><span class="glyphicon glyphicon-question-sign"></span></a>
|
||||
<a href="#" class="module-documentation text-primary" data-id="{$ID}" title="{intl l='Read module documentation'}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
</td>
|
||||
<td>{$TITLE}</td>
|
||||
<td>{$CODE}</td>
|
||||
<td>{$CHAPO}</td>
|
||||
<td>{$VERSION}</td>
|
||||
|
||||
{if $EXISTS}
|
||||
<td class="text-center">
|
||||
<div class="make-switch switch-small module-activation" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
|
||||
{if $MANDATORY ne 1 || $ACTIVE eq 0}
|
||||
<div class="make-switch switch-small module-activation" data-mandatory="{$MANDATORY}" data-id="{$ID}" data-on="success" data-off="danger" data-on-label="<i class='glyphicon glyphicon-ok-circle'></i>" data-off-label="<i class='glyphicon glyphicon-remove-circle'></i>">
|
||||
<input type="checkbox" {if $ACTIVE}checked{/if}>
|
||||
</div>
|
||||
<noscript>
|
||||
{if $ACTIVE}
|
||||
<a title="{intl l="Deactivate %title module" title={$TITLE}}" href="{url path="/admin/module/toggle-activation/{$ID}"}">{intl l="deactivation"}</a>
|
||||
<a title="{intl l="Deactivate %title module" title={$TITLE}}" href="{url path="/admin/module/toggle-activation/%id" id=$ID}">{intl l="deactivation"}</a>
|
||||
{else}
|
||||
<a title="{intl l="activate %title module" title={$TITLE}}" href="{url path="/admin/module/toggle-activation/{$ID}"}">{intl l="activation"}</a>
|
||||
<a title="{intl l="activate %title module" title={$TITLE}}" href="{url path="/admin/module/toggle-activation/%id" id=$ID}">{intl l="activation"}</a>
|
||||
{/if}
|
||||
</noscript>
|
||||
{else}
|
||||
<i class="glyphicon glyphicon-ban-circle text-danger" aria-hidden="true"></i>
|
||||
{/if}
|
||||
|
||||
</td>
|
||||
|
||||
<td class="text-center">
|
||||
@@ -117,33 +125,75 @@
|
||||
</td>
|
||||
{/if}
|
||||
|
||||
{module_include location='modules_table_row'}
|
||||
{hook name="modules.table-row" location="modules_table_row" module_code={$CODE} }
|
||||
|
||||
<td class="text-right">
|
||||
<div class="btn-group">
|
||||
<td class="actions">
|
||||
{if $module_type == 2}
|
||||
{ifloop rel="area-attached"}
|
||||
{$zones=""}
|
||||
{loop name="area-attached" type="area" module_id=$ID}
|
||||
{$zones="`$zones`, `$NAME`"}
|
||||
{$zone_count=$LOOP_TOTAL}
|
||||
{/loop}
|
||||
{$title={intl l='%count shipping zone(s) are attached to this module: %zones. Click here to change' count={$zone_count} zones={$zones|ltrim:', '}}}
|
||||
{$btnstyle="btn-info"}
|
||||
{$icon=''}
|
||||
{/ifloop}
|
||||
{elseloop rel="area-attached"}
|
||||
{$title={intl l='No shipping zone attached to this module, click here to attach one'}}
|
||||
{$icon='<span class="glyphicon glyphicon glyphicon-exclamation-sign"></span> '}
|
||||
{$btnstyle="btn-danger"}
|
||||
{/elseloop}
|
||||
|
||||
<a class="{if ! $ACTIVE}disabled {/if} btn {$btnstyle} btn-xs config-btn-{$ID}" title="{$title}" href="{url path="/admin/configuration/shipping_zones/update/%id" id=$ID}">{$icon nofilter}{intl l="Shipping zones"}</a>
|
||||
{/if}
|
||||
<div class="separate-from-left btn-toolbar btn toolbar-primary">
|
||||
<span class="glyphicon glyphicon-cog"></span>
|
||||
</div>
|
||||
<div class="toolbar-options hidden">
|
||||
{if $EXISTS}
|
||||
|
||||
{if $CONFIGURABLE == 1}
|
||||
{loop type="auth" name="can_change" role="ADMIN" module=$CODE access="VIEW"}
|
||||
<a class="{if ! $ACTIVE}disabled {/if} btn btn-primary btn-xs" id="config-btn-{$ID}" title="{intl l='Configure this module'}" href="{url path="/admin/module/$CODE"}">{intl l="Configure"}</a>
|
||||
<a class="config-btn-{$ID}{if ! $ACTIVE} disabled no-follow-link{/if}" title="{intl l='Configure this module'}" href="{url path="/admin/module/%code" code=$CODE}"><span class="glyphicon glyphicon-wrench"></span></a>
|
||||
{/loop}
|
||||
{/if}
|
||||
|
||||
{if $HOOKABLE}
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.module-hook" access="VIEW"}
|
||||
<a class="hook-btn-{$ID}{if ! $ACTIVE} disabled no-follow-link{/if}" title="{intl l="Manage its hooks"}" href="{url path="/admin/module-hooks" module="$ID"}" ><span class="glyphicon glyphicon-indent-left"></span></a>
|
||||
{/loop}
|
||||
{/if}
|
||||
|
||||
{*loop type="auth" name="can_change" role="ADMIN" resource="admin.modules" access="VIEW"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"><span class="glyphicon glyphicon-book"></span></a>
|
||||
<a title="{intl l='Read the documentation of this module'}" href="{url path="/admin/module/documentation/$ID"}"></a>
|
||||
{/loop*}
|
||||
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.module" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this module'}" href="{url path="/admin/module/update/$ID"}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
<a title="{intl l='Edit this module'}" href="{url path="/admin/module/update/%id" id=$ID}"><span class="glyphicon glyphicon-edit"></span></a>
|
||||
{/loop}
|
||||
{/if}
|
||||
|
||||
{if $MANDATORY ne 1}
|
||||
{loop type="auth" name="can_delete" role="ADMIN" resource="admin.module" access="DELETE"}
|
||||
<a class="btn btn-default btn-xs module-delete-action" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
<a class="module-delete-action" title="{intl l='Delete this module'}" href="#delete_module_dialog" data-id="{$ID}" data-toggle="modal"><span class="glyphicon glyphicon-trash"></span></a>
|
||||
{/loop}
|
||||
{/if}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/loop}
|
||||
{/loop}
|
||||
{elseloop rel="module.`$module_type`"}
|
||||
<tr>
|
||||
<td colspan="8">
|
||||
<br />
|
||||
<div class="alert alert-info">
|
||||
{intl l="No module of this type was found."}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/elseloop}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user