Task #408: Statusgründe

This commit is contained in:
bison-paolo
2016-09-29 17:17:58 +02:00
parent 9a8863e5ef
commit 233b60d916
7 changed files with 438 additions and 51 deletions
+99
View File
@@ -0,0 +1,99 @@
<?php
$this->load->view('templates/header', array('title' => 'StatusEdit'));
$s = $status;
?>
<div class="row">
<div class="span4">
<h2>Status: <?php echo $s->status_kurzbz; ?></h2>
<form method="post" action="../saveStatus">
<table>
<tr>
<td colspan="2">
beschreibung:<br/><br/>
<input type="text" name="beschreibung" value="<?php echo $s->beschreibung; ?>" /><br/>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
Anmerkung:<br/><br/>
<textarea name="anmerkung"><?php echo $s->anmerkung; ?></textarea><br/>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
Bezeichnung mehrsprachig:<br/><br/>
<?php
if (isset($s->bezeichnung_mehrsprachig))
{
$val = str_replace("{", "", $s->bezeichnung_mehrsprachig);
$val = str_replace("}", "", $val);
$val = str_replace("\"", "", $val);
$val = explode(",", $val);
}
else
{
$val = array();
}
$i = 0;
?>
<?php foreach ($sprache as $sp): ?>
<?php echo $sp->sprache; ?>:<br/>
<?php
if (!isset($val[$i]))
{
$val[$i] = "";
}
else
{
$val = str_replace("|", ",", $val);
}
?>
<input type="text" name="bezeichnung_mehrsprachig[]" value="<?php echo $val[$i++]; ?>" /><br/>
<?php endforeach ?>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td colspan="2" align="center">
<button type="submit">Save</button>
</td>
</tr>
</table>
<input type="hidden" name="status_kurzbz" value="<?php echo $s->status_kurzbz; ?>" />
</form>
</div>
</div>
</body>
<?php
if (!is_null($update))
{
?>
<script>
parent.document.getElementById("StatusgrundLeft").contentWindow.location.reload(true);
</script>
<?php
}
?>
</html>
+36
View File
@@ -0,0 +1,36 @@
<?php
$this->load->view('templates/header', array('title' => 'StatusgrundList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '4:{sorter:false}'));
?>
<div class="row">
<div class="span4">
<a href="../newGrund/<?php echo $status_kurzbz; ?>" target="StatusgrundBottom">+ Neu Grund</a>
</div>
</div>
<div class="row">
<div class="span4">
<table id="t1" class="tablesorter">
<thead>
<tr>
<th class='table-sortable:default'>ID</th>
<th>Aktiv</th>
<th>Bezeichnung mehrsprachig</th>
<th>Beschreibung</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($statusGrund as $s): ?>
<tr>
<td><a href="../editGrund/<?php echo $s->statusgrund_kurzbz; ?>" target="StatusgrundBottom"><?php echo $s->status_kurzbz; ?></a></td>
<td><?php echo $s->aktiv; ?></td>
<td><?php echo $s->bezeichnung_mehrsprachig; ?></td>
<td><?php echo $s->beschreibung; ?></td>
<td><a href="../editGrund/<?php echo $s->statusgrund_kurzbz; ?>" target="StatusgrundBottom">Edit</a></td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</div>
</body>
</html>
@@ -11,20 +11,24 @@
<th class='table-sortable:default'>Status</th>
<th>beschreibung</th>
<th>anmerkung</th>
<th>ext_id</th>
<th>bezeichnung_mehrsprachig</th>
<th></th>
</tr>
</thead>
<tbody>
<?php foreach ($status as $s): ?>
<tr>
<td><a href="editGrund/<?php echo $s->status_kurzbz; ?>" target="StatusgrundBottom"><?php echo $s->status_kurzbz; ?></a></td>
<td>
<a href="listGrund/<?php echo $s->status_kurzbz; ?>" target="StatusgrundTop" onClick="parent.document.getElementById('StatusgrundBottom').src=''">
<?php echo $s->status_kurzbz; ?>
</a>
</td>
<td><?php echo $s->beschreibung; ?></td>
<td><?php echo $s->anmerkung; ?></td>
<td><?php echo $s->ext_id; ?></td>
<td><?php echo $s->bezeichnung_mehrsprachig; ?></td>
<td><a href="editGrund/<?php echo $s->status_kurzbz; ?>" target="StatusgrundBottom">Edit</a></td>
<td>
<a href="editStatus/<?php echo $s->status_kurzbz; ?>" target="StatusgrundBottom" onClick="parent.document.getElementById('StatusgrundTop').src=''">
Edit
</a>
</td>
</tr>
<?php endforeach ?>
</tbody>
+16 -3
View File
@@ -6,14 +6,27 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
</head>
<frameset rows="40%,*">
<frame src="Statusgrund/listStatus" id="StatusgrundTop" name="StatusgrundTop" frameborder="0" />
<frame src="" id="StatusgrundBottom" name="StatusgrundBottom" frameborder="0" />
<frameset cols="30%, *">
<frame src="Statusgrund/listStatus" id="StatusgrundLeft" name="StatusgrundLeft" frameborder="1" />
<noframes>
<body bgcolor="#FFFFFF">
This application works only with a frames-enabled browser.<br />
</body>
</noframes>
<frameset rows="30%, *">
<frame src="" id="StatusgrundTop" name="StatusgrundTop" frameborder="1" />
<noframes>
<body bgcolor="#FFFFFF">
This application works only with a frames-enabled browser.<br />
</body>
</noframes>
<frame src="" id="StatusgrundBottom" name="StatusgrundBottom" frameborder="1" />
<noframes>
<body bgcolor="#FFFFFF">
This application works only with a frames-enabled browser.<br />
</body>
</noframes>
</frameset>
</frameset>
</html>
+14 -3
View File
@@ -6,8 +6,8 @@
<div class="row">
<div class="span4">
<h2>Status: <?php echo $sg->status_kurzbz; ?></h2>
<form method="post" action="../saveGrund">
<h2>Status grund: <?php echo $sg->status_kurzbz; ?></h2>
<form method="post" action="<?php echo APP_ROOT . "index.ci.php/crm/Statusgrund/saveGrund";?>">
<table>
<tr>
<td colspan="2">
@@ -112,9 +112,20 @@
</tr>
</table>
<input type="hidden" name="statusgrund_kurzbz" value="<?php echo isset($sg->statusgrund_kurzbz) ? $sg->statusgrund_kurzbz : ""; ?>" />
<input type="hidden" name="status_kurzbz" value="<?php echo $sg->status_kurzbz; ?>" />
</form>
</div>
</div>
</body>
<?php
if (!is_null($update))
{
?>
<script>
parent.document.getElementById("StatusgrundTop").contentWindow.location.reload(true);
</script>
<?php
}
?>
</html>
+66
View File
@@ -0,0 +1,66 @@
<?php
$this->load->view('templates/header', array('title' => 'StatusgrundNew'));
?>
<div class="row">
<div class="span4">
<h2>New status grund</h2>
<form method="post" action="<?php echo APP_ROOT . "index.ci.php/crm/Statusgrund/insGrund";?>">
<table>
<tr>
<td colspan="2">
Bezeichnung mehrsprachig:<br/><br/>
<?php foreach ($sprache as $s): ?>
<?php echo $s->sprache; ?>:<br/>
<input type="text" name="bezeichnung_mehrsprachig[]" value="" /><br/>
<?php endforeach ?>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td colspan="2">
Beschreibung:<br/><br/>
<?php foreach ($sprache as $s): ?>
<?php echo $s->sprache; ?>:<br/>
<textarea name="beschreibung[]"></textarea><br/>
<?php endforeach ?>
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td>
Aktiv:
</td>
<td>
<input type="checkbox" name="aktiv" />
</td>
</tr>
<tr>
<td colspan="2">
&nbsp;
</td>
</tr>
<tr>
<td colspan="2" align="center">
<button type="submit">Save</button>
</td>
</tr>
</table>
<input type="hidden" name="status_kurzbz" value="<?php echo $status_kurzbz; ?>" />
</form>
</div>
</div>
</body>
</html>