예제 #1
0
        $val = ob_get_clean();
        $arResult['FILTER'][$i]['type'] = 'custom';
        $arResult['FILTER'][$i]['enableWrapper'] = false;
        $arResult['FILTER'][$i]['value'] = $val;
        $filterFieldInfo = array('typeName' => 'WIDGET_PERIOD', 'id' => $filterID, 'params' => array('data' => array('paramName' => "{$filterID}", 'elementId' => $elementID), 'editor' => array('id' => $periodEditorID)));
        $filterFieldInfos[] = $filterFieldInfo;
    }
}
?>
<div class="crm-btn-panel"><span id="<?php 
echo htmlspecialcharsbx($settingButtonID);
?>
" class="crm-btn-panel-btn"></span></div>
<div class="crm-filter-wrap"><?php 
$counter = new CCrmUserCounter(CCrmPerms::GetCurrentUserID(), CCrmUserCounter::CurrentDealActivies);
$APPLICATION->IncludeComponent('bitrix:crm.interface.filter', 'flat', array('GRID_ID' => $quid, 'FILTER' => $arResult['FILTER'], 'FILTER_ROWS' => $arResult['FILTER_ROWS'], 'FILTER_FIELDS' => $arResult['FILTER_FIELDS'], 'FILTER_PRESETS' => $arResult['FILTER_PRESETS'], 'RENDER_FILTER_INTO_VIEW' => false, 'OPTIONS' => $arResult['OPTIONS'], 'ENABLE_PROVIDER' => true, 'NAVIGATION_BAR' => array('ITEMS' => array(array('icon' => 'table', 'id' => 'list', 'active' => false, 'counter' => $counter->GetValue(false), 'url' => $arResult['PATH_TO_LIST'], 'hint' => array('title' => GetMessage('CRM_WGT_LIST_HINT_TITLE'), 'content' => GetMessage('CRM_WGT_LIST_HINT_CONTENT'), 'disabling' => GetMessage('CRM_WGT_DISABLE_LIST_HINT'))), array('icon' => 'chart', 'id' => 'widget', 'active' => true, 'url' => $arResult['PATH_TO_WIDGET'])), 'BINDING' => array('category' => 'crm.navigation', 'name' => 'index', 'key' => strtolower($arResult['NAVIGATION_CONTEXT_ID'])))), $component, array('HIDE_ICONS' => true));
?>
</div><?php 
if ($arResult['NEED_FOR_REBUILD_DEAL_STATISTICS']) {
    ?>
<div id="rebuildDealStatsMsg" class="crm-view-message">
		<?php 
    echo GetMessage('CRM_WGT_REBUILD_DEAL_STATISTICS', array('#ID#' => 'rebuildDealStatsLink', '#URL#' => '#'));
    ?>
	</div><?php 
}
?>
<div class="<?php 
echo $className;
?>
" id="<?php 
예제 #2
0
    $stdItems['DEAL'] = array('ID' => 'DEAL', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_DEAL'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_DEAL_TITLE'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_INDEX'] !== '' ? $arParams['PATH_TO_DEAL_INDEX'] : $arParams['PATH_TO_DEAL_LIST']), 'ICON' => 'deal', 'COUNTER' => $counter->GetValue($arResult['ACTIVE_ITEM_ID'] === 'DEAL'), 'ACTIONS' => array(array('ID' => 'CREATE', 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_EDIT'], array('deal_id' => 0)))));
}
if ($isAdmin || !$userPermissions->HavePerm('QUOTE', BX_CRM_PERM_NONE, 'READ')) {
    $counter = new CCrmUserCounter(CCrmPerms::GetCurrentUserID(), CCrmUserCounter::CurrentQuoteActivies);
    $stdItems['QUOTE'] = array('ID' => 'QUOTE', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_QUOTE'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_QUOTE_TITLE'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_QUOTE_LIST']), 'ICON' => 'quote', 'COUNTER' => $counter->GetValue($arResult['ACTIVE_ITEM_ID'] === 'QUOTE'), 'ACTIONS' => array(array('ID' => 'CREATE', 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_QUOTE_EDIT'], array('quote_id' => 0)))));
}
//if(IsModuleInstalled('sale'))
//{
if ($isAdmin || !$userPermissions->HavePerm('INVOICE', BX_CRM_PERM_NONE, 'READ')) {
    $counterValue = CCrmInvoice::GetCounterValue();
    $stdItems['INVOICE'] = array('ID' => 'INVOICE', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_INVOICE'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_INVOICE_TITLE'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_LIST']), 'ICON' => 'invoice', 'COUNTER' => $counterValue, 'ACTIONS' => array(array('ID' => 'CREATE', 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_INVOICE_EDIT'], array('invoice_id' => 0)))));
}
//}
if ($isAdmin || !$userPermissions->HavePerm('LEAD', BX_CRM_PERM_NONE, 'READ')) {
    $counter = new CCrmUserCounter(CCrmPerms::GetCurrentUserID(), CCrmUserCounter::CurrentLeadActivies);
    $stdItems['LEAD'] = array('ID' => 'LEAD', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_LEAD'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_LEAD_TITLE'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LEAD_LIST']), 'ICON' => 'lead', 'COUNTER' => $counter->GetValue($arResult['ACTIVE_ITEM_ID'] === 'LEAD'), 'ACTIONS' => array(array('ID' => 'CREATE', 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_LEAD_EDIT'], array('lead_id' => 0)))));
}
if (IsModuleInstalled('report')) {
    $stdItems['REPORT'] = array('ID' => 'REPORT', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_REPORT'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_REPORT'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_REPORT_LIST']), 'ICON' => 'report');
}
if ($isAdmin || !$userPermissions->HavePerm('DEAL', BX_CRM_PERM_NONE, 'READ')) {
    $stdItems['DEAL_FUNNEL'] = array('ID' => 'DEAL_FUNNEL', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_FUNNEL'), 'BRIEF_NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_FUNNEL_BRIEF'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_FUNNEL'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_DEAL_FUNNEL']), 'ICON' => 'funnel');
}
$stdItems['EVENT'] = array('ID' => 'EVENT', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_EVENT_2'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_EVENT_2'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_EVENT_LIST']), 'ICON' => 'event');
if ($isAdmin || !$userPermissions->HavePerm('CONFIG', BX_CRM_PERM_NONE, 'READ')) {
    $stdItems['CATALOGUE'] = array('ID' => 'CATALOGUE', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_CATALOGUE_2'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_CATALOGUE_2'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_PRODUCT_LIST']), 'ICON' => 'catalog');
}
$stdItems['SETTINGS'] = array('ID' => 'SETTINGS', 'NAME' => GetMessage('CRM_CTRL_PANEL_ITEM_SETTINGS'), 'TITLE' => GetMessage('CRM_CTRL_PANEL_ITEM_SETTINGS'), 'URL' => CComponentEngine::MakePathFromTemplate($arParams['PATH_TO_SETTINGS']), 'ICON' => 'settings');
// <-- Prepere standard items
$items = array();
$itemInfos = isset($arParams['ITEMS']) && is_array($arParams['ITEMS']) ? $arParams['ITEMS'] : array();