diff options
Diffstat (limited to '')
-rw-r--r-- | admin/survey/classes/class.SurveyVariableView.php | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/admin/survey/classes/class.SurveyVariableView.php b/admin/survey/classes/class.SurveyVariableView.php index 4dc1557..c2d04b7 100644 --- a/admin/survey/classes/class.SurveyVariableView.php +++ b/admin/survey/classes/class.SurveyVariableView.php @@ -33,6 +33,8 @@ class VariableView { #inicializiramo class za datoteke
self::$SDF = SurveyDataFile::get_instance();
self::$SDF->init($sid);
+
+ self::$SDF->prepareFiles();
self::$headFileName = self::$SDF->getHeaderFileName();
self::$dataFileName = self::$SDF->getDataFileName();
@@ -44,23 +46,18 @@ class VariableView { public static function displayVariables() {
global $lang;
- echo '<table class="variableView">';
+ echo '<table class="variableView">';
- echo '<thead><tr>';
- echo '<th>'.$lang['srv_variableView_h_'].'</th>';
+ echo '<tr>';
+ echo '<th>'.$lang['srv_variableView_h_name'].'</th>';
echo '<th>'.$lang['srv_variableView_h_type'].'</th>';
- echo '<th>'.$lang['srv_variableView_h_width'].'</th>';
- echo '<th>'.$lang['srv_variableView_h_decimals'].'</th>';
- echo '<th>'.$lang['srv_variableView_h_label'].'</th>';
echo '<th>'.$lang['srv_variableView_h_measure'].'</th>';
- echo '</tr></thead>';
-
- echo '<tbody>';
+ echo '<th>'.$lang['srv_variableView_h_label'].'</th>';
+ echo '</tr>';
foreach (self::$_HEADERS AS $skey => $spremenljivka) {
-
- if (is_numeric($spremenljivka['tip']) && $spremenljivka['tip'] != '' && $spremenljivka['tip'] != 'm' && $spremenljivka['tip'] != 'sm') {
-
+ if (isset($spremenljivka['tip']) && is_numeric($spremenljivka['tip']) && $spremenljivka['tip'] != '' && $spremenljivka['tip'] != 'm' && $spremenljivka['tip'] != 'sm') {
+
$spss = $spremenljivka['grids'][0]['variables'][0]['spss'];
$spss_type = substr($spss,0,1);
$spss_length = explode('.',substr($spss,1));
@@ -70,16 +67,13 @@ class VariableView { echo '<tr>';
echo '<td>'.$spremenljivka['variable'].'</td>';
- echo '<td>'.$legenda['izrazanje'].'</td>';
- echo '<td>'.(int)$spss_length['0'].'</td>';
- echo '<td>'.(int)$spss_length['1'].'</td>';
- echo '<td>'.$spremenljivka['naslov'].'</td>';
+ echo '<td class="nowrap">'.$legenda['izrazanje'].'</td>';
echo '<td>'.$legenda['skala'].'</td>';
+ echo '<td>'.((strlen($spremenljivka['naslov']) > 100) ? substr($spremenljivka['naslov'], 0, 97).'...' : $spremenljivka['naslov']).'</td>';
echo '</tr>';
}
}
- echo '</tbody>';
echo '</table>';
}
}
\ No newline at end of file |