<label><?=$key?>:</label> <div class="width100"> <table class="flatten-sub-table width100"> <?php foreach ($values as $id => $value): $index = 0; $status = Arr::path($job_values, 'data' . intval($id) . '.status'); $old = Arr::path($job_values, 'data' . intval($id) . '.value'); ?> <?php if (0 == $index++ % 2) :?> <tr> <?php endif; ?> <td> <div class="status-cell <?=$status === -1 ? 'bg-success has-success' : ($status === 1 ? 'bg-warning has-warning' : '')?>"> <label class=""><?=$value?>:</label> <?php if ($old):?> <br/><label class="old_value control-label <?=strlen($old) > 100 ? 'shorten' : ''?> " >Last submitted value: <span class=""><?=Columns::output($old, Columns::get_type(intval($id)))?></span></label> <?php endif;?> <p class="column-value"> <?=Columns::input('data-' . crc32($key) . '[' . $id . ']', NULL, Columns::get_type(intval($id)), $id == 242 ? Arr::path($job, 'data.242') : '', '', Arr::path(Form::$required, array($key, $id)))?> </p> </div> </td> <?php if (0 == $index % 2) :?> </tr> <?php endif; ?> <?php endforeach;?> </table> </div> </td> <?php if ($tdIndex++==0 && sizeof($columns) == $index): ?> <td class="extra"></td> <?php endif; ?>
$relation_id = ($id > 161 && $id < 182 ? $relation_id = $id+28 : ($id > 189 && $id < 210 ? $relation_id = $id-28 : false)); if (0 == $index++ % 2) echo '<tr>'; if (Arr::get($submissions, 'data.' . $id)) $class = 'bg-danger'; elseif ($id > 161 && $id < 182 && $value != (isset($values['data' . ($id + 28)]) ? $values['data' . ($id+28)]: Arr::path($job, 'data.' . ($id+28), ''))) $class = 'bg-warning'; elseif ($id > 189 && $id < 210 && $value != (isset($values['data' . ($id - 28)]) ? $values['data' . ($id-28)]: Arr::path($job, 'data.' . ($id-28), ''))) $class = 'bg-warning'; else $class = ''; ?> <td class="<?=$class?>" <?= $id > 161 && $id < 182 ? "data-has-actual-relation='$relation_id'" : ''?> <?= $id > 189 && $id < 210 ? "data-has-variation-relation='$relation_id'" : ''?><?= $id > 242 && $id < 255 ? "data-has-additional-relation='$relation_id'" : ''?>> <label class="left-label"><?=HTML::chars($name)?><?=isset($values['data' . $id]) ? '*' : ''?>: </label> <div class=""> <?php $type = Columns::get_type($id); if (Columns::allowed($id) == Columns::COLUMN_WRITE && !Columns::get_readonly($id)):?> <?php echo Columns::input('data', $id, $type, $value); if (isset($submissions['data.' . $id])):?> <ul class="list-unstyled radio-container"> <li><label><input type="radio" class="submission-select" data-id="data-<?=$id?>" name="submission-data[<?=$id?>]" value="0" />Keep current</label></li> <?php $multi = substr($type, 0, 4) == 'enum' && Enums::is_multi(substr($type, 5)); if (Group::current('allow_assign')) foreach ($submissions['data.' . $id] as $submission): $user = User::get($submission['user_id']);?> <li><label> <input type="radio" class="submission-select" data-id="data-<?=$id?>" name="submission-data[<?=$id?>]" value="<?=$submission['id']?>" /> <?=$type == 'date' ? date('Y-m-d H:i:s', $submission['value']) :HTML::chars($submission['value']) ? : '<span class="glyphicon glyphicon-remove"></span>'?> (<?=date('d-m-Y H:i', $submission['time']) . ' - ' . Arr::get($user, 'login', 'Unknown user') . ' / ' . Arr::get($companies, Arr::get($user, 'company_id'), 'Unknown company')?>) </label></li> <?php endforeach;?> </ul> <?php endif; else:?> <p class="form-control-static"> <?=Columns::output($value, $type)?>