update mescole and photo diagram
This commit is contained in:
@@ -2,13 +2,18 @@
|
||||
<i class="bi bi-list" style="font-size:1.2rem;"></i>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class='view'><?= $r['priority'] ?></span>
|
||||
<input class='inline-edit form-control form-control-sm'
|
||||
name='priority'
|
||||
type='text'
|
||||
value='<?= $r['priority'] ?>'>
|
||||
</td>
|
||||
<?php if ($r['id_status'] == 6): ?>
|
||||
<td>
|
||||
<span class='view'><?= $r['priority'] ?></span>
|
||||
<input class='inline-edit form-control form-control-sm'
|
||||
name='priority'
|
||||
type='text'
|
||||
value='<?= $r['priority'] ?>'>
|
||||
</td>
|
||||
<?php else: ?>
|
||||
<td></td>
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
<td>
|
||||
@@ -20,13 +25,53 @@
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class='view'><?= $r['mescola'] ?></span>
|
||||
<select class='inline-edit form-select form-select-sm select2'
|
||||
name='idmescola'>
|
||||
<?= selectOptions($mescole, $r['idmescola']) ?>
|
||||
|
||||
<?php
|
||||
// Trasformo in array gli ID mescole (arrivano da production_programmazione.php)
|
||||
$ids = array_filter(explode(",", $r['mescole_ids']));
|
||||
$count = count($ids);
|
||||
?>
|
||||
|
||||
<!-- VIEW MODE -->
|
||||
<span class="view">
|
||||
|
||||
<?php if ($count === 0): ?>
|
||||
|
||||
<span class="text-muted">-</span>
|
||||
|
||||
<?php elseif ($count === 1): ?>
|
||||
|
||||
<?= htmlspecialchars($r['mescola']) ?>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<button type="button"
|
||||
class="btn btn-sm btn-outline-secondary view-mescole-btn"
|
||||
data-id="<?= $r['id'] ?>"
|
||||
data-names="<?= htmlspecialchars($r['mescola']) ?>">
|
||||
<?= $count ?> mescole
|
||||
</button>
|
||||
|
||||
<?php endif; ?>
|
||||
|
||||
</span>
|
||||
|
||||
<!-- EDIT MODE: SELECT MULTIPLA -->
|
||||
<select class="inline-edit form-select form-select-sm select2"
|
||||
name="mescole[]" multiple>
|
||||
|
||||
<?php foreach ($mescole as $m): ?>
|
||||
<option value="<?= $m['id'] ?>"
|
||||
<?= in_array($m['id'], $ids) ? "selected" : "" ?>>
|
||||
<?= htmlspecialchars($m['nome']) ?>
|
||||
</option>
|
||||
<?php endforeach; ?>
|
||||
|
||||
</select>
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
<td data-line-id="<?= $r['id_linea'] ?>">
|
||||
<span class='view'><?= $r['linea'] ?></span>
|
||||
<select class='inline-edit form-select form-select-sm select2'
|
||||
|
||||
Reference in New Issue
Block a user