Exemplo n.º 1
0
/**
 * @param $lang
 * @param $key
 * @param $value
 *
 * @return mixed
 */
function displayField($lang, $key, $value)
{
    if (!$value) {
        echo '<strong style="color: red">' . jgettext('Empty') . '</strong>';
        return;
    }
    if ($value == '**TRANSLATE**') {
        echo '<strong style="color: red">' . jgettext('Translate') . '</strong>';
    } else {
        echo EcrHtml::cleanHTML($value);
    }
}
Exemplo n.º 2
0
/**
 * displays a span class="hasTip" which will be rendered as a moootools tooltip
 *
 * @param string $string the (html) string to display
 * @param integer $cutAfter numer of letters to display
 * @return html span with string as title
 */
function displayCuttedTT($string, $cutAfter)
{
    $ret = EcrHtml::cleanHTML(substr($string, 0, $cutAfter));
    if (strlen($string) > strlen($ret)) {
        $ret .= '<span class="hasTip" style="border-bottom: 1px dotted orange" title="' . $string . '">...</span>';
    }
    return $ret;
}
Exemplo n.º 3
0
        } else {
            $dfString = '<span style="color: orange;">' . $dString . '</span>';
        }
    } else {
        $isHeader = false;
        if (!$started) {
            ?>
            <ul id="orderMe" style="list-style-type: none;">
            <?php 
            $started = true;
        }
        if ($lang->value) {
            $dString = $lang->key . '=' . $lang->value;
            $dfString = '<span style="color: blue;">' . $lang->key . '</span>';
            $dfString .= '<strong style="color: red;"> = </strong>';
            $dfString .= EcrHtml::cleanHTML($lang->value);
        } else {
            $dString = '';
            $dfString = '&nbsp;';
        }
    }
    if (!$isHeader) {
        ?>
        <li class="handle">
            <?php 
        echo '<input type="hidden" name="langfile[]" value="' . $dString . '" />';
        echo $dfString;
        ?>
</li>
    <?php 
    }