<commit_before><?php
/**
 *
 * @author <NAME> <<EMAIL>>
 * @copyright Telaxus LLC
 * @license MIT
 * @version 0.1
 * @package epesi-CRM
 * @subpackage Assets
 */
defined("_VALID_ACCESS") || die('Direct access forbidden');

class CRM_AssetsCommon extends ModuleCommon {
    public static function menu() {
        return array('CRM'=>array('__submenu__'=>1,'Assets'=>array()));
    }

    public static function display_asset_id($r, $nolink) {
        return Utils_RecordBrowserCommon::create_linked_label_r('crm_assets', 'asset_id', $r, $nolink);
    }

    public static function display_info($r, $nolink) {
        return 'More info will be here';
    }

    public static function watchdog_label($rid = null, $events = array(), $details = true) {
        return Utils_RecordBrowserCommon::watchdog_label(<commit_msg>Assets display info partially added<commit_after><?php
/**
 *
 * @author <NAME> <<EMAIL>>
 * @copyright Telaxus LLC
 * @license MIT
 * @version 0.1
 * @package epesi-CRM
 * @subpackage Assets
 */
defined("_VALID_ACCESS") || die('Direct access forbidden');

class CRM_AssetsCommon extends ModuleCommon {
    public static function menu() {
        return array('CRM'=>array('__submenu__'=>1,'Assets'=>array()));
    }

    public static function display_asset_id($r, $nolink) {
        return Utils_RecordBrowserCommon::create_linked_label_r('crm_assets', 'asset_id', $r, $nolink);
    }

    public static function display_info($r, $nolink) {
        /* monitor */
        if($r['category']<3) {
            $str = Base_LangCommon::t('Computer');
            if($r['category']==3) $str .= '('.Base_LangCommon::t('Laptop').')';
/* TODO complete summary for comp
 */
            $str .= ', more info later';
            return $str;
        }
        if($r['category']==3) {
            $type = Utils_CommonDataCommon::get_translated_array('crm_assets_monitor_type');
            $str = Base_LangCommon::t('Display type').': '.$type[$r['display_type']];
            $str .= ', '.Base_LangCommon::t('Screen size').': '.$r['screen_size'];
            return $str;
        }
        if($r['category']==4) {
            $type = Utils_CommonDataCommon::get_translated_array('crm_assets_printer_type');
            $str = Base_LangCommon::t('Printer type').': '.$type[$r['printer_type']];
            $color = $r['color_printing'] ? 'Yes': 'No';
            $str .= ', '.Base_LangCommon::t('Color printing').': '.Base_LangCommon::t($color);
            return $str;
        }
        return Base_LangCommon::t('This is non-categorized asset.');
    }

    public static function watchdog_label($rid = null, $events = array(), $details = true) {
        return Utils_RecordBrowserCommon::watchdog_label(
{'fraction_non_alphanumeric': 0.1647622558053815, 'fraction_numerical': 0.003685956505713233, 'mean_word_length': 3.3424, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2961719', 'n_tokens_mistral': 845, 'n_tokens_neox': 825, 'n_words': 172}