diff --git a/templates/backOffice/custom/includes/module-block.html b/templates/backOffice/custom/includes/module-block.html new file mode 100644 index 00000000..8b8bd4d7 --- /dev/null +++ b/templates/backOffice/custom/includes/module-block.html @@ -0,0 +1,224 @@ +
| + {admin_sortable_header + current_order=$module_order + order='id' + reverse_order='id_reverse' + path={url path='/admin/modules'} + request_parameter_name='module_order' + label="{intl l='ID'}" + } + | + ++ + | + {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='Name'}" + } + | + ++ {admin_sortable_header + current_order=$module_order + order='code' + reverse_order='code_reverse' + path={url path='/admin/modules'} + request_parameter_name='module_order' + label="{intl l='Code'}" + } + | + +{intl l="version"} | + ++ {admin_sortable_header + current_order=$module_order + order='enabled' + reverse_order='enabled_reverse' + path={url path='/admin/modules'} + request_parameter_name='module_order' + label="{intl l='Enable/Disable'}" + } + | + ++ {admin_sortable_header + current_order=$module_order + order='manual' + reverse_order='manual_reverse' + path={url path='/admin/modules'} + request_parameter_name='module_order' + label="{intl l='Position'}" + } + | + + {hook name="modules.table-header" location="modules_table_header" } + +{intl l="Actions"} | +||
|---|---|---|---|---|---|---|---|---|---|
| {$ID} | ++ + + | ++ {$allowed = false} + {loop type="auth" name="auth" role='ADMIN' resource=$CODE access='VIEW'} + {$allowed = true} + {/loop} + {if $allowed && $CONFIGURABLE == 1 && $ACTIVE} + {$TITLE} + {else} + {$TITLE} + {/if} + | +{$CODE} | +{$VERSION} | + + {if $EXISTS} +
+
+ {if $MANDATORY ne 1 || $ACTIVE eq 0}
+
+
+
+
+ {else}
+
+ {/if}
+
+ |
+
+ + {admin_position_block + resource="admin.modules" + access="UPDATE" + path={url path="admin/module/update-position"} + url_parameter="module_id" + in_place_edit_class="modulePositionChange" + position=$POSITION + id=$ID + } + | + {else} ++ Warning + {intl l="This module cannot be started, some files are probably missing."} + | + {/if} + + {hook name="modules.table-row" location="modules_table_row" module_code={$CODE} } + ++ {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=' '} + {$btnstyle="btn-danger"} + {/elseloop} + + {$icon nofilter}{intl l="Shipping zones"} + {/if} + + {$buttons = []} + {if $EXISTS} + {if $CONFIGURABLE == 1 && $ACTIVE} + {$buttons[] = [ + 'type' => 'config', + 'class' => "config-btn-$ID", + 'title' => {intl l='Configure this module'}, + 'href' => {url path="/admin/module/%code" code=$CODE}, + 'auth' => ['resource' => 'admin.module'] + ]} + {/if} + + {if $HOOKABLE && $ACTIVE} + {$buttons[] = [ + 'type' => 'hook', + 'class' => "hook-btn-$ID", + 'title' => {intl l="Manage its hooks"}, + 'href' => {url path="/admin/module-hooks" module=$ID}, + 'auth' => ['resource' => 'admin.module-hook'] + ]} + {/if} + + {$buttons[] = [ + 'type' => 'edit', + 'class' => "hook-btn-$ID", + 'title' => {intl l='Edit this module'}, + 'href' => {url path="/admin/module/update/%id" id=$ID}, + 'auth' => ['resource' => 'admin.module'] + ]} + {/if} + + {if $MANDATORY ne 1} + {$buttons[] = [ + 'type' => 'delete', + 'class' => "module-delete-action", + 'title' => {intl l='Delete this module'}, + 'href' => "#delete_module_dialog", + 'data' => [ + 'id' => $ID, + 'toggle' => 'modal' + ], + 'auth' => ['resource' => 'admin.module'] + ]} + {/if} + + {include file='renderer/buttons.html' buttons=$buttons} + | +|
|
+ +
+ {intl l="No module of this type was found."}
+
+ |
+ |||||||||