echo $par ? 'par' : 'odd'; ?> "> <td><img class="thumbnail" src="?<?php echo $imgSrc; ?> " /> <td><?php echo $composition->label; ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'composition_edit', array("productId" => $composition->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("comp", $composition->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php } } ?> </tbody> </table> <?php
?> <tr> <td><?php echo $profile->label; ?> </td> <td><?php echo $profile->rate; ?> </td> <td class="edition"> <a href="<?php echo \Pasteque\get_module_url_action(PLUGIN_NAME, 'discountprofile_edit', array('id' => $profile->id)); ?> "><img src="<?php echo \Pasteque\get_template_url(); ?> img/edit.png" alt="<?php \pi18n('Edit'); ?> " title="<?php \pi18n('Edit'); ?> "></a> </td> </tr> <?php } ?> </tbody> </table>
echo $currency->label; ?> </td> <td><?php if ($currency->isMain) { \pi18n("Main", PLUGIN_NAME); } else { echo $currency->rate; } ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'currency_edit', array("id" => $currency->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("currency", $currency->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php } ?> </tbody> </table> <?php
echo $par ? 'par' : 'odd'; ?> "> <td><?php echo $set->label; ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'set_edit', array("id" => $set->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("set", $set->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php } ?> </tbody> </table> <?php if (count($sets) == 0) { ?> <div class="alert"><?php \pi18n("No attribute set found", PLUGIN_NAME); ?>
function printprovider($printprovider, $level, &$par) { $par = !$par; if ($printprovider->hasImage) { $imgSrc = \Pasteque\PT::URL_ACTION_PARAM . "=img&w=provider&id=" . $printprovider->id; } else { $imgSrc = \Pasteque\PT::URL_ACTION_PARAM . "=img&w=provider"; } ?> <tr class="row-<?php echo $par ? 'par' : 'odd'; ?> "> <td> <?php for ($i = 0; $i < $level; $i++) { echo " "; } ?> <img class="thumbnail" src="?<?php echo $imgSrc; ?> " /> <td><?php echo $printprovider->label; ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'provider_edit', array("id" => $printprovider->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("prov", $printprovider->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php }
function tpl_js_btn($class, $onclick, $label, $id = NULL, $image_btn = NULL, $alt = NULL, $title = NULL) { $btn = "<a class=\"" . $class . "\" onclick=\"javascript:" . $onclick . ";return false;\""; if (isset($id)) { $btn .= "id=\"" . $id . "\" "; } $btn .= ">"; if (isset($image_btn)) { $btn .= "<img src=\"" . \Pasteque\get_template_url() . "img/" . $image_btn . "\""; if (isset($alt)) { $btn .= " alt =\"" . $alt . "\""; } if (isset($title)) { $btn .= " title =\"" . $title . "\""; } $btn .= "/>"; } $btn .= $label . "</a>"; echo $btn; }
foreach ($areas as $area) { ?> <tr> <td><?php echo $area->label; ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'area_edit', array("id" => $area->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("area", $area->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php } ?> </tbody> </table> <?php if (count($areas) == 0) { ?> <div class="alert"><?php \pi18n("No area found", PLUGIN_NAME); ?>
?> </td> <td class="edition"> <a href="<?php echo \Pasteque\get_module_url_action(PLUGIN_NAME, 'cust_tax_edit', array('id' => $custTax->id)); ?> "><img src="<?php echo \Pasteque\get_template_url(); ?> img/edit.png" alt="<?php \pi18n('Edit'); ?> " title="<?php \pi18n('Edit'); ?> "></a> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("custtax", $custTax->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php } ?> </tbody> </table> <?php
foreach ($attributes as $attr) { ?> <tr> <td><?php echo $attr->label; ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'attribute_edit', array("id" => $attr->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("attribute", $attr->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php } ?> </tbody> </table> <?php if (count($attributes) == 0) { ?> <div class="alert"><?php \pi18n("No attribute found", PLUGIN_NAME); ?>
function printCategory($printCategory, $level, &$par) { $par = !$par; if ($printCategory->hasImage) { $imgSrc = \Pasteque\PT::URL_ACTION_PARAM . "=img&w=category&id=" . $printCategory->id; } else { $imgSrc = \Pasteque\PT::URL_ACTION_PARAM . "=img&w=category"; } ?> <tr class="row-<?php echo $par ? 'par' : 'odd'; ?> "> <td> <?php for ($i = 0; $i < $level; $i++) { echo " "; } ?> <img class="thumbnail" src="?<?php echo $imgSrc; ?> " /> <td><?php echo $printCategory->label; ?> </td> <td class="edition"> <?php \Pasteque\tpl_btn("edition", \Pasteque\get_module_url_action(PLUGIN_NAME, 'category_edit', array("id" => $printCategory->id)), "", 'img/edit.png', \i18n('Edit'), \i18n('Edit')); ?> <form action="<?php echo \Pasteque\get_current_url(); ?> " method="post"><?php \Pasteque\form_delete("cat", $printCategory->id, \Pasteque\get_template_url() . 'img/delete.png'); ?> </form> </td> </tr> <?php $categories = \Pasteque\CategoriesService::getChildren($printCategory->id); $level++; foreach ($categories as $childCategory) { printCategory($childCategory, $level, $par); } }