phrases stuff

This commit is contained in:
Gerry Raab
2016-07-05 00:22:53 +02:00
parent 39c0350af8
commit a6c61d0bc1
4 changed files with 19 additions and 5 deletions
@@ -35,6 +35,7 @@ class Phrases extends FHC_Controller
if (empty($phrase_id))
exit;
$phrase_inhalt = $this->phraseslib->getPhraseInhalt($phrase_id);
$phrase = $this->phraseslib->getPhrase($phrase_id);
if ($phrase_inhalt->error)
show_error($phrase_inhalt->retval);
//var_dump($vorlage);
@@ -42,6 +43,7 @@ class Phrases extends FHC_Controller
$data = array
(
'phrase_id' => $phrase_id,
'phrase' => $phrase->retval[0]->phrase,
'phrase_inhalt' => $phrase_inhalt->retval
);
$v = $this->load->view('system/phrasesinhaltList.php', $data);
@@ -14,6 +14,7 @@
<td><?php echo $this->templatelib->widget("organisationseinheit_widget", array('oe_kurzbz' => $orgeinheit_kurzbz)); ?></td>
<td>Preview</td>
</tr>
<tr><td>Orgform</td><td><?php echo $this->templatelib->widget("orgform_widget", array('orgform_kurzbz' => $orgform_kurzbz)); ?></td><td></td></tr>
<tr><td>Sprache</td><td><?php echo $this->templatelib->widget("sprache_widget", array('sprache' => $sprache)); ?></td><td></td></tr>
<tr><td>Text</td><td><textarea name="text" style="width:500px; height:300px;" id="markitup"><?php echo $text ?></textarea></td>
<td valign="top">
+4 -3
View File
@@ -1,5 +1,5 @@
<?php
$this->load->view('templates/header', array('title' => 'PhrasesList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '2:{sorter:false}'));
$this->load->view('templates/header', array('title' => 'PhrasesList', 'tablesort' => true, 'tableid' => 't1', 'headers' => '3:{sorter:false}'));
?>
<div class="row">
<div class="span4">
@@ -17,6 +17,7 @@ App: aufnahme
<table id="t1" class="tablesorter">
<thead>
<tr><th class='table-sortable:default'>ID</th>
<th>App</th>
<th class='table-sortable:default'>Phrase</th>
<th></th>
</tr>
@@ -24,9 +25,9 @@ App: aufnahme
<tbody>
<?php foreach ($phrases as $p): ?>
<tr><td><a href="edit/<?php echo $p->phrase_id; ?>" target="PhrasesBottom"><?php echo $p->phrase_id; ?></a></td>
<td><?php echo $p->phrase; ?></td>
<td><?php echo $p->app; ?></td>
<td><a href="edit/<?php echo $p->phrase_id; ?>" target="PhrasesBottom"><?php echo $p->phrase; ?></a></td>
<td><a href="view/<?php echo $p->phrase_id; ?>" target="PhrasesBottom">Inhalte anzeigen</a></td>
</tr>
<?php endforeach ?>
</tbody>
+12 -2
View File
@@ -4,7 +4,7 @@
<div class="row">
<div class="span4">
<h2>Phrase Inhalt - <?php echo $phrase_id; ?></h2>
<h2>Phrase Inhalt - <?php echo $phrase; ?></h2>
<form method="post" action="../newtext" target="PhrasesBottom">
<input type="hidden" name="phrase_id" value="<?php echo $phrase_id; ?>"/>
<button type="submit">Neu</button>
@@ -31,13 +31,23 @@
<td><?php echo $v->text; ?></td>
<td><?php echo $v->description; ?></td>
<td><a href="../edittext/<?php echo $v->phrasentext_id; ?>" target="PhrasesBottom">edit</a></td>
<td><a href="../deltext/<?php echo $v->phrasentext_id; ?>/<?php echo $phrase_id ?>" target="PhrasesBottom">delete</a></td>
<td>
<a href="javascript:void(0);" onclick="delPhrasentext(<?php echo $v->phrasentext_id; ?>, <?php echo $phrase_id; ?>)">delete</a>
</td>
</tr>
<?php endforeach ?>
</tbody>
</table>
</div>
</div>
<script>
function delPhrasentext(id,pid)
{
var c = confirm("Wirklich löschen?");
if (c == true)
window.location.href = "../deltext/"+id+"/"+pid;
}
</script>
<?php
$this->load->view('templates/footer');