Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
added /_internal/settings/tools
  • Loading branch information
daisuke-morita committed Jun 11, 2013
1 parent 243ee58 commit f526ad3
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions _internal/system/settings/border-template.html
Expand Up @@ -26,6 +26,8 @@
<a href="/_internal/settings"><i class="icon-file"></i> Contents</a></li>
<li class="<% if (command.match('^/layout')) { %>active<% } %>">
<a href="/_internal/settings/layout"><i class="icon-list-alt"></i> Layout</a></li>
<li class="<% if (command.match('^/tools')) { %>active<% } %>">
<a href="/_internal/settings/tools"><i class="icon-wrench"></i> Tools</a></li>
</ul>
</div>
</div>
Expand Down
Empty file.
8 changes: 8 additions & 0 deletions lib/site.js
Expand Up @@ -60,6 +60,14 @@ Site.prototype.deleteContent = function(request, response) {
});
};

Site.prototype.tools = function(request, response, context) {
this.repository.getLayout(function(layout) {
context.layout = layout;
File.serveTemplateWithBorder(
response, absPath('settings/tools.html'), _settingsTemplatePath, context);
});
};

Site.prototype.listContentPaths = function(request, response, context) {
this.repository.listContentPaths(function(paths) {
context.contentPaths = paths;
Expand Down
3 changes: 3 additions & 0 deletions server.js
Expand Up @@ -63,6 +63,9 @@ app.use(function(request, response){
else if (command.match('^/contents/delete')) {
site.deleteContent(request, response);
}
else if (command == '/tools') {
site.tools(request, response, context);
}
else {
site.listContentPaths(request, response, context);
}
Expand Down

0 comments on commit f526ad3

Please sign in to comment.