示例#1
0
<?php 
if ($cust !== null) {
    ?>
<p>
    <a class="btn" href="<?php 
    echo \Pasteque\get_report_url(PLUGIN_NAME, 'customers_diary', 'display');
    ?>
&id=<?php 
    echo $cust->id;
    ?>
"><?php 
    \pi18n("Customer's diary", PLUGIN_NAME);
    ?>
</a>
    <a class="btn" href="<?php 
    echo \Pasteque\get_report_url(PLUGIN_NAME, 'customers_prepaid_diary', 'display');
    ?>
&id=<?php 
    echo $cust->id;
    ?>
"><?php 
    \pi18n("Customer's prepaid diary", PLUGIN_NAME);
    ?>
</a>
</p>
<?php 
}
?>

<form class="edit" action="<?php 
echo \Pasteque\get_current_url();
示例#2
0
function __tpl_report_input($report, $values)
{
    // Export button
    echo "<div id=\"btn\"><a class=\"btn\" href=\"" . \Pasteque\get_report_url($report->getDomain(), $report->getId());
    foreach ($report->getParams() as $param) {
        echo "&" . $param['param'] . "=" . $values[$param['param']];
    }
    echo "\">" . \i18n("Export") . "</a></div>\n";
    echo "<br />\n";
    if (is_array($report->getParams()) && sizeof($report->getParams()) > 0) {
        // Input form
        echo "<form class=\"edit\" action=\"" . \Pasteque\get_current_url() . "\" " . "method=\"post\">";
        foreach ($report->getParams() as $param) {
            $id = $param['param'];
            echo "<div class=\"row\">";
            if ($param['label'] != null && $param['label'] != "" && $param['type'] != "hidden") {
                echo "<label for=\"" . $id . "\">" . $param['label'] . "</label>";
            }
            switch ($param['type']) {
                case DB::DATE:
                    $value = \i18nDate($values[$id]);
                    echo "<input type=\"text\" name=\"" . $id . "\" id=\"" . $id . "\" class=\"dateinput\" value=\"" . $value . "\" />";
                    break;
                case 'hidden':
                    $value = $values[$param['param']];
                    echo "<input type=\"hidden\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
                default:
                    $value = $values[$param['param']];
                    echo "<input type=\"text\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
            }
            echo "</div>\n";
        }
        // Send
        echo "<div class=\"row actions\">" . \Pasteque\form_send() . "</div>\n";
        echo "</form>\n";
    }
}
示例#3
0
}
?>
<h1><?php 
\pi18n("Products", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>


<?php 
\Pasteque\tpl_btn('btn-add', \Pasteque\get_module_url_action(PLUGIN_NAME, "product_edit"), \i18n('Add a product', PLUGIN_NAME), 'img/btn_add.png');
\Pasteque\tpl_btn('btn-import', \Pasteque\get_module_url_action(PLUGIN_NAME, "productsManagement"), \i18n('Import products', PLUGIN_NAME), 'img/btn_add.png');
\Pasteque\tpl_btn('btn-export ', \Pasteque\get_report_url(PLUGIN_NAME, "products_export"), \i18n('Export products', PLUGIN_NAME), 'img/btn_add.png');
?>

<div id="search">
<div class="title"><?php 
\pi18n("Search");
?>
</div>
<h5><?php 
\pi18n("by category", PLUGIN_NAME);
?>
</h5>
<?php 
\Pasteque\tpl_form('select', 'category', \Pasteque\CategoriesService::getAll());
?>
</div>
示例#4
0
}
?>
<h1><?php 
\pi18n("Stock check", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>

<?php 
// Mimic report export button
?>
<div id="btn"><a class="btn" href="<?php 
echo \Pasteque\get_report_url(PLUGIN_NAME, "check");
foreach ($_POST as $key => $value) {
    echo "&" . $key . "=" . $value;
}
?>
"><?php 
\pi18n("Export");
?>
</a></div>

<form class="edit" action="<?php 
echo \Pasteque\get_current_url();
?>
" id="move" method="post" enctype="multipart/form-data">
	<input type="hidden" name="send" value="true" />
	<?php 
示例#5
0
$prdLevel = array();
foreach ($levels as $level) {
    $prdLevel[$level->productId] = $level;
}
?>
<h1><?php 
\pi18n("Inventory", PLUGIN_NAME);
?>
</h1>

<?php 
\Pasteque\tpl_msg_box($message, $error);
?>

<?php 
\Pasteque\tpl_btn('btn-export ', \Pasteque\get_report_url(PLUGIN_NAME, "inventory"), \i18n('Export inventory', PLUGIN_NAME), 'img/btn_add.png');
?>

<?php 
if ($multilocations) {
    // Location picker
    ?>
<form class="edit" action="<?php 
    echo \Pasteque\get_current_url();
    ?>
" method="post">
	<div class="row">
		<?php 
    \Pasteque\form_select("location", \i18n("Location"), $locIds, $locNames, $currLocation);
    ?>
	</div>
示例#6
0
function __tpl_report_input($report, $values)
{
    echo "<div class=\"col-md-12 panel-group\" id=\"options\"" . " role=\"tablist\" aria-multiselectable=\"true\">\n";
    // Export button
    echo "\t<div><a class=\"btn btn-primary\" href=\"" . \Pasteque\get_report_url($report->getDomain(), $report->getId());
    foreach ($report->getParams() as $param) {
        echo "&" . $param['param'] . "=" . $values[$param['param']];
    }
    echo "\">" . \i18n("Export") . "</a></div>\n";
    // Collapsable options
    echo "\t<div class=\"panel panel-default\">\n";
    echo "\t\t<div class=\"panel-heading\" role=\"tab\" id=\"options-heading\">\n";
    echo "\t\t\t<h4 class=\"panel-title\">" . "<a role=\"button\" data-toggle=\"collapse\"" . " data-parent=\"#options\" href=\"#options-collapsed\"" . " aria-expanded=\"false\" aria-controls=\"options-collapsed\">" . "Options</a></h4>\n";
    echo "\t\t</div>\n";
    echo "\t\t<div id=\"options-collapsed\" class=\"panel-collapse collapse\"" . " role=\"tabpanel\" aria-labelledby=\"options-heading\">\n";
    echo "\t\t\t<div class=\"panel-body\">\n";
    if (is_array($report->getParams()) && sizeof($report->getParams()) > 0) {
        // Input form
        echo "\t\t\t<div class=\"col-md-4\">\n";
        echo "\t\t\t\t\t<form class=\"edit\" action=\"" . \Pasteque\get_current_url() . "\" " . "method=\"post\">\n";
        foreach ($report->getParams() as $param) {
            $id = $param['param'];
            switch ($param['type']) {
                case DB::DATE:
                    if ($param['label'] != null && $param['label'] != "" && $param['type'] != "hidden") {
                        echo "\t\t\t\t\t\t<label for=\"" . $id . "\">" . $param['label'] . "</label>\n";
                    }
                    $value = \i18nDate($values[$id]);
                    echo "\t\t\t\t\t\t<div data-date-format=\"yyyy-mm-dd\" class=\"input-group date col-md-6\" id=\"datepicker-" . $id . "\">\n";
                    echo "\t\t\t\t\t\t\t<input type=\"text\"" . " class=\"form-control\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\">\n";
                    echo "\t\t\t\t\t\t\t<div class=\"input-group-addon\">\n";
                    echo "\t\t\t\t\t\t\t\t<span class=\"glyphicon glyphicon-th\"></span>\n";
                    echo "\t\t\t\t\t\t\t</div>\n";
                    echo "\t\t\t\t\t\t</div>\n";
                    break;
                case 'hidden':
                    $value = $values[$param['param']];
                    echo "\t\t\t<input type=\"hidden\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
                default:
                    $value = $values[$param['param']];
                    echo "\t\t\t<input type=\"text\" name=\"" . $id . "\" id=\"" . $id . "\" value=\"" . $value . "\" />";
                    break;
            }
        }
        // Send
        echo "\t\t\t\t\t\t<div class=\"row actions\">" . \Pasteque\form_send() . "</div>\n";
        echo "\t\t\t\t\t</form>\n";
        echo "\t\t\t\t</div>\n";
    }
    echo "\t\t\t</div>\n";
    echo "\t\t</div>\n";
    echo "\t</div>\n";
    echo "</div>\n";
}