forked from pedrofranceschi/Blogode
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d683dab
commit aa4ace5
Showing
6 changed files
with
111 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
body { | ||
background-color: #FFFFFF; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
Admin panel.<br/><br/> | ||
|
||
<a href="/admin/posts">Manage posts</a> | ||
<a href="/admin/posts">Manage posts</a><br/><br/> | ||
<a href="/admin/template">Manage template</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
<script src="http://code.jquery.com/jquery-1.4.4.js"></script> | ||
<script> | ||
function updateCurrentEditFile() { | ||
$("input[name=\"file_type\"]").val($("select#template_select_list").val()); | ||
$.get('/admin/template/get_file_content?file_type=' + $("select#template_select_list").val(), function(data) { | ||
$('textarea#elm1').text(data); | ||
}); | ||
} | ||
function updateFileContent() { | ||
$.ajax({ | ||
type: "PUT", | ||
url: "/admin/template/set_file_content", | ||
data: { content: $("textarea#elm1").val(), file_type: $("input[name=\"file_type\"]").val() }, | ||
success: function() { | ||
} | ||
}); | ||
} | ||
</script> | ||
|
||
<body onLoad="updateCurrentEditFile();"> | ||
|
||
<h1>Template manager</h1> | ||
|
||
File to edit: | ||
<select id="template_select_list" onChange="updateCurrentEditFile();"> | ||
<option value="layout">Content template</option> | ||
<option value="index">Index</option> | ||
<option value="post_show">Post reading</option> | ||
<option value="stylesheet">Stylesheet</option> | ||
</select> | ||
|
||
<br/><br/> | ||
|
||
Template editor: | ||
<br/><br/> | ||
|
||
<input type="hidden" name="file_type"/> | ||
<textarea id="elm1" name="content" rows="15" cols="80" style="550px; height:300px;"> | ||
</textarea><br/><br/> | ||
|
||
<input type="submit" id="submit" value="Save" onClick="updateFileContent();"/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters