diff options
Diffstat (limited to 'views/mods')
| -rw-r--r-- | views/mods/mod_productgroups/index.phtml | 16 | ||||
| -rw-r--r-- | views/mods/mod_productgroups/show_2.phtml | 4 |
2 files changed, 16 insertions, 4 deletions
diff --git a/views/mods/mod_productgroups/index.phtml b/views/mods/mod_productgroups/index.phtml index 66599a8..18b19d1 100644 --- a/views/mods/mod_productgroups/index.phtml +++ b/views/mods/mod_productgroups/index.phtml @@ -80,16 +80,28 @@ <table class="table wpsg-table-order table-bordered table-hover table-striped wpsg-table-customer">
<thead>
<tr>
+ <th class="wpsg_pic_col"></th>
<th class="wpsg_order col_name" data-order="nr"><?php echo __("Name", 'wpsg'); ?></th>
<th class="wpsg_order col_template" data-order="template"><?php echo __("Template", 'wpsg'); ?></th>
<th class="wpsg_order col_products" data-order="products"><?php echo __("Produkte", 'wpsg'); ?></th>
</tr>
</thead>
<tbody>
- <?php foreach ($this->view['arData'] as $pg) { ?>
+ <?php foreach ($this->view['arData'] as /** @var wpsg_productgroup */ $pg) { ?>
<tr>
+ <td class="wpsg_pic_col">
+ <?php if ($pg->getImage() > 0) { ?>
+
+ <?php echo \wp_get_attachment_image($pg->getImage(), [75, 75]); ?>
+
+ <?php } ?>
+ </td>
<td class="col_name">
- <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php echo WPSG_URL_WP; ?>wp-admin/admin.php?page=wpsg-Productgroups&wpsg_mod_action=edit&edit_id=<?php echo $pg->id; ?>" class="row-title"><?php echo $pg->name; ?></a></strong>
+ <strong><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
+
+ echo wpsg_admin_url('Productgroups', '', ['wpsg_mod_action' => 'edit', 'edit_id' => $pg->id]);
+
+ ?>" class="row-title"><?php echo $pg->name; ?></a></strong>
<div class="row-actions">
<span class="edit"><a title="<?php echo __("Diese Produktgruppe bearbeiten", "wpsg"); ?>" href="<?php
diff --git a/views/mods/mod_productgroups/show_2.phtml b/views/mods/mod_productgroups/show_2.phtml index 9c8d12a..135791b 100644 --- a/views/mods/mod_productgroups/show_2.phtml +++ b/views/mods/mod_productgroups/show_2.phtml @@ -9,13 +9,13 @@ if (isset($_REQUEST['show'])) { - $oProductgroup = productgroup::getInstance(intval($_REQUEST['show'])); + $oProductgroup = \wpsg_productgroup::getInstance(intval($_REQUEST['show'])); $arProducts = $oProductgroup->findProducts(); $view = 'products'; } else { - $arProductgroups = productgroup::find(); + $arProductgroups = \wpsg_productgroup::find(); $view = 'productgroups'; } |
