'list', 'label' => __('Lista'), 'action' => '@stAllegroPlugin?action=list&product_id=' . $sf_request->getParameter('product_id')),
);
if (!$sf_request->getParameter('product_id'))
{
$actions[] = array('type' => 'edit', 'label' => __('Edycja produktu'), 'action' => '@stProduct?action=edit&id=' . $offer->getAllegroAuction()->getProduct()->getId());
}
else
{
$actions[] = array('type' => 'list', 'label' => __('Lista wszystkich ofert'), 'action' => '@stAllegroPlugin?action=list');
}
echo st_get_admin_actions($actions);
?>
'save', 'label' => __('Zapisz'));
if (!$offer->getPublication() || !isset($offer->getPublication()->status) || $offer->getPublication()->status == stAllegroApi::STATUS_INACTIVE)
{
if ($offer->getId())
{
$actions = array_merge(array(array('type' => 'delete', 'label' => __('Usuń'), 'action' => '@stAllegroPlugin?action=delete&id=' . $sf_request->getParameter('id') . '&product_id=' . $sf_request->getParameter('product_id'), 'params' => array('confirm' => __('Jesteś pewien, że chcesz usunąć szkic')))), $actions);
}
$actions[] = array('type' => 'save', 'label' => __('Wystaw'), 'params' => array('name' => 'publish'));
}
else
{
if ($offer->getPublication() && ($offer->getPublication()->status == stAllegroApi::STATUS_ACTIVE || $offer->getPublication()->status == stAllegroApi::STATUS_ENDED))
{
$actions = array_merge(array(array('type' => 'duplicate', 'label' => __('Wystaw podobną'), 'action' => '@stAllegroPlugin?action=duplicate&id=' . $sf_request->getParameter('id') . '&product_id=' . $sf_request->getParameter('product_id'))), $actions);
}
if ($offer->getPublication() && $offer->getPublication()->status == stAllegroApi::STATUS_ENDED)
{
$actions[] = array('type' => 'save', 'label' => __('Wznów'), 'params' => array('name' => 'publish'));
}
if ($offer->getPublication() && $offer->getPublication()->status == stAllegroApi::STATUS_ACTIVE)
{
$actions = array_merge(array(array('type' => 'delete', 'label' => __('Zakończ'), 'action' => '@stAllegroPlugin?action=end&id=' . $sf_request->getParameter('id') . '&product_id=' . $sf_request->getParameter('product_id'), 'params' => array('confirm' => __('Jesteś pewien, że chcesz zakończyć ofertę')))), $actions);
}
}
echo st_get_admin_actions($actions);
?>