Seri писал(а):
Хотел спросить возможность переделать для TPL
С этим вопросом разобрался.
// Ajax upload items
if (!is_null(Core_Array::getRequest('ajaxLoadItems')))
{
$tplName = Core_Array::get(Core_Page::instance()->libParams, 'informationsystemTpl');
ob_start();
$Informationsystem_Controller_Show->tpl($tplName);
$Informationsystem_Controller_Show->show();
Core::showJson(ob_get_clean());
}
{if count($aInformationsystem_Items) == $controller->limit}
{$totals = $controller->limit * ($controller->page + 1)}
{if ($controller->total - $totals)}
{* Store in the variable $group ID of the current group *}
{$group = $controller->group}
{* Choose Group Path *}
{if $group != 0}
{$oInformationsystem_Group = Core_Entity::factory('Informationsystem_Group', $group)}
{capture name="group_link"}{$oInformationsystem_Group->Informationsystem->Structure->getPath()|escape}{$oInformationsystem_Group->getPath()|escape}{/capture}
{$group_link = $smarty.capture.group_link}
{else}
{$group_link = $oInformationsystem->Structure->getPath()|escape}
{/if}
<div class="col-xs-12">
<a class="btn btn-primary full-width margin-top-30 load-more-items full-width" onclick="$(this).find('i').addClass('fa-spin'); $.showInfoItems('{$group_link}page-{$controller->page + 2}/')">
<i class="fa fa-refresh"></i>
Показать еще
</a>
</div>
{/if}
{/if}