seinheit.ch/application/view/AdminPage/edit.phtml
2013-07-19 13:37:38 +02:00

74 lines
No EOL
2.3 KiB
PHTML

<script src="<?php echo $this->base ?>/codemirror/lib/codemirror.js"></script>
<link rel="stylesheet" href="<?php echo $this->base ?>/codemirror/lib/codemirror.css">
<script src="<?php echo $this->base ?>/codemirror/mode/htmlmixed/htmlmixed.js"></script>
<script src="<?php echo $this->base ?>/codemirror/mode/javascript/javascript.js"></script>
<script src="<?php echo $this->base ?>/codemirror/mode/css/css.js"></script>
<script src="<?php echo $this->base ?>/codemirror/mode/xml/xml.js"></script>
<script type="text/javascript">
window.onload = function(){
var myCodeMirror = CodeMirror.fromTextArea(
document.getElementById('content'),
{
mode: "htmlmixed"
}
);
}
</script>
<div id="admin">
<h3>Page bearbeiten</h3>
<form action="<?php echo $this->base ?>/adminPage/save" method="post">
<div style="display: none"><input type="hidden" name="id" value="<?php echo $this->page['id'] ?>" /></div>
<dl>
<dt>Aktiv</dt>
<dd>
<input type="checkbox" name="active" <?php if($this->page['active']) echo 'checked="checked"' ?> />
</dd>
</dl>
<dl>
<dt>Titel</dt>
<dd>
<input class="textfield" type="text" name="title" value="<?php echo $this->page['title'] ?>"/>
</dd>
</dl>
<dl>
<dt>Untertitel</dt>
<dd>
<input class="textfield" type="text" name="subtitle" value="<?php echo $this->page['subtitle'] ?>"/>
</dd>
</dl>
<dl>
<dt>Url</dt>
<dd>
<input class="textfield" type="text" name="url" value="<?php echo $this->page['url'] ?>"/>
</dd>
</dl>
<dl>
<dt>Headerbild</dt>
<dd>
<input class="textfield" type="text" name="header_image" value="<?php echo $this->page['header_image'] ?>"/>
<a href="javascript: void(0);" onclick="window.open('/adminPage/image/type/header', 'fenster1', 'width=600,height=400,status=yes,scrollbars=yes,resizable=yes');">Auswählen</a>
</dd>
</dl>
<dl>
<dt>Inhalt</dt>
<dd>
<textarea id="content" name="content" rows="15" cols="80"><?php echo /*htmlentities*/($this->page['content']) ?></textarea>
</dd>
</dl>
<dl>
<dt>Bild&nbsp;für&nbsp;Inhalt</dt>
<dd>
<a href="javascript: void(0);" onclick="window.open('/adminPage/image/type/page', 'fenster2', 'width=600,height=400,status=yes,scrollbars=yes,resizable=yes');">Auswählen</a>
</dd>
</dl>
<p>
<input type="submit" name="save" value="speichern" />
</p>
</form>
</div>