<?php
/**
 * Smarty plugin
 *
 * @category Smarty
 * @license /_licenses/untermStrich/agb_normal.pdf
 * @author Christian Wengg
 * @copyright 2009 untermStrich
 * @package Smarty
 * @subpackage plugins
 * @version $Id$
*/

/**
 * Smarty boolean view function plugin
 *
 * Purpose:  Create the view for a bool value for is_add2indirect_costs fields
 *
 * @param   array   $params Parameters:
 *                  <ul>
 *                      <li>value   boolean     The variable</li>
 *                  </ul>
 * @return  string  The field source
 */
function smarty_function_is_add2indirect_costs(array $params)
{
    if (isset($params['value'])) {
        $title = '';
        if (isset($params['title'])) {
            $title = $params['title'];
        }
        
        if ($params['value']==1) {
            $CI = CI_Controller::get_instance();
            return '<div class="dialog_make_btn14 is_add2indirect_costs_2d" title="'.$title.'">IC</div>';
        } else {
            return '';
        }
    } else {
        return '';
    }
}

