Exemple #1
0
                <?php
                    $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">