codeigniter_test/application/views/admin/edit_post.php
2020-01-02 22:49:45 +07:00

61 lines
2.6 KiB
PHP

<div class="span9 well">
<?php
$att = array('id' => 'biodata-form');
echo form_open('admin/save_edit_post', $att);
echo form_hidden('id',$edit->id);
?>
<div class="navbar">
<div class="navbar-inner">
<div class="head"><img src="<?php echo base_url(); ?>image/page_white_edit.png" style="vertical-align: middle"> Edit Post</div>
</div>
</div>
<table cellspacing="20" id="edit">
<tr>
<td>Judul</td>
<td><input type="text" name="judul" value="<?php echo $edit->post_title; ?>" class="input"/></td>
</tr>
<tr>
<td>Content</td>
<td><div id="notes-button-bar"></div>
<textarea id="notes"><?php echo $edit->post_content; ?></textarea>
<textarea id="copy_html" name="isi" class="input"></textarea>
<div id="notes-preview"></div>
</td>
</tr>
<tr>
<td colspan="2" align="right"><a href="<?php echo base_url().'admin/list_post'; ?>"> <button type="button" name="Cancel" id="cancel" class="btn ">Cancel</button></a>
<button id="save" class="btn btn-primary">Save</button>
<a href="#notes-preview" rel="facebox"><button type="button" class="btn btn-info">Preview</button></a>
</td>
</tr>
</table>
<!--script-->
<script src="<?php echo base_url(); ?>bootstrap/js/jquery.js"></script>
<script src="<?php echo base_url(); ?>js/facebox-master/src/facebox.js" type="text/javascript"></script>
<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap-dropdown.js"></script>
<script src="<?php echo base_url(); ?>bootstrap/js/bootstrap-collapse.js"></script>
<script src="<?php echo base_url(); ?>css/wmd-master/wmd.js"></script>
<script src="<?php echo base_url(); ?>css/wmd-master/showdown.js"></script>
<script type="text/javascript">
new WMDEditor({
input: "notes",
button_bar: "notes-button-bar",
preview: "notes-preview",
output: "copy_html",
buttons: "bold italic link ol ul heading undo redo hr image code blockquote",
modifierKeys: true,
autoFormatting: false
});
jQuery(document).ready(function($) {
$('a[rel*=facebox]').facebox({
loadingImage : '<?php echo base_url(); ?>js/facebox-master/src/loading.gif',
closeImage : '<?php echo base_url(); ?>js/facebox-master/src/closelabel.png'
})
})
</script>
</div>
</div>
</div>
</body>
</html>