Esempio n. 1
0
 public function test_CreateTextPreview_CustomReplacement()
 {
     $s = 'Test string';
     $limit = 10;
     $replacement = '>>>';
     $result = It::createTextPreview($s, $limit, $replacement);
     $expected = 'Test st>>>';
     $this->assertEquals($expected, $result);
 }
        ?>

                <?php 
        foreach ($render_data['handler_sensor']['sea_level']['SeaLevelAWS'] as $key => $value) {
            ?>
                    <table style="<?php 
            echo $key ? 'display:none;' : '';
            ?>
">
                        <tr>
                            <td>&nbsp;</td>
                            <td colspan="6" style="text-align: center;" title="<?php 
            echo $value['sensor_display_name'] . ' - ' . $value['sensor_id_code'];
            ?>
 "><?php 
            echo It::createTextPreview($value['sensor_display_name'], 45, '...');
            ?>
</td>
                        </tr>
                        <tr>
                            <td>&nbsp;</td>
                            <th style="text-align: center;"><?php 
            echo It::t('home_aws', 'single__block_sea_mean');
            ?>
</th>
                            <th>&nbsp;</th>
                            <th style="text-align: center;"><?php 
            echo It::t('home_aws', 'single__block_sea_sigma');
            ?>
</th>
                            <th>&nbsp;</th>
Esempio n. 3
0
        $visibillityData = $visibilityClass === 'VisibilityAWS' ? $renderDataRecord : $renderDataRecord['visibility_1'];
        $hasFilterErrors = isset($visibillityData['last_filter_errors']);
        ?>
		<table style="<?php 
        echo $key ? 'display:none;' : '';
        ?>
">
			<tr>
				<td>&nbsp;</td>

				<td colspan="2" title="<?php 
        echo $renderDataRecord['sensor_display_name'] . ' - ' . $renderDataRecord['sensor_id_code'];
        ?>
 ">
					<?php 
        echo It::createTextPreview($renderDataRecord['sensor_display_name'], 15, '...');
        ?>
				</td>
			</tr>    
			<tr>
				<th><?php 
        echo It::t('home_aws', 'single__block_vis_last');
        ?>
</th>

				<td <?php 
        if ($hasFilterErrors) {
            ?>
 title="<?php 
            echo implode("; ", $visibillityData['last_filter_errors']);
            ?>
Esempio n. 4
0
        ?>

        <div class="data_box <?php 
        echo $key && fmod($key + 1, 4) == 0 ? '' : 'margin';
        ?>
">

            <div class="header">
                <a href="<?php 
        echo $this->createUrl('site/rgtable', array('station_id' => $station_data['station_id']));
        ?>
" title="<?php 
        echo $station_data['display_name'];
        ?>
"><?php 
        echo It::createTextPreview($station_data['display_name'], 23, '...');
        ?>
</a><br/>
                <?php 
        echo $station_data['station_id_code'];
        ?>
<br/>
                <?php 
        echo It::t('home_rg', 'panel__rain_guage_station');
        ?>
                 
            </div>

            <div class="content">
                <table>
                <tr>
Esempio n. 5
0
                        <td>Mean</td>
                        <td>&nbsp;</td>
                        <td>Sigma</td> 
                        <td>&nbsp;</td>
                        <td>Wave</td>
                        <td>&nbsp;</td>                    
                    </tr>    
                    <?php 
                foreach ($station_data->displaySensorsValues['sea_level_data'] as $k1 => $v1) {
                    ?>
                        <tr>
                            <th title="<?php 
                    echo $v1['sensor_id_code'];
                    ?>
"><?php 
                    echo It::createTextPreview($v1['sensor_display_name'], 20, '...');
                    ?>
</th>

                            <td <?php 
                    if (isset($v1['sea_level_mean']['last_filter_errors'])) {
                        ?>
 title="<?php 
                        echo implode("; ", $v1['sea_level_mean']['last_filter_errors']);
                        ?>
" <?php 
                    }
                    ?>
 >
                                <?php 
                    if ($v1['sea_level_mean'] && in_array('last', array_keys($v1['sea_level_mean']))) {