diff --git a/filemanager/filemanager.py b/filemanager/filemanager.py index dd8db3256..c6ef1c0ff 100755 --- a/filemanager/filemanager.py +++ b/filemanager/filemanager.py @@ -10,7 +10,7 @@ from filemanager.models import Trash class FileManager: - modes = {'php': 'application/x-httpd-php', 'javascript': 'javascript', 'python': 'text/x-python'} + modes = {'php': 'application/x-httpd-php', 'javascript': 'javascript', 'python': 'text/x-python', 'html': 'text/html'} def __init__(self, request, data): self.request = request @@ -18,13 +18,14 @@ class FileManager: @staticmethod def findMode(fileName): - if fileName.endswith('.php'): return FileManager.modes['php'] elif fileName.endswith('js'): return FileManager.modes['javascript'] elif fileName.endswith('.py'): return FileManager.modes['python'] + elif fileName.endswith('.html'): + return FileManager.modes['html'] @staticmethod def findModeFiles(mode): @@ -73,6 +74,29 @@ class FileManager: return """ """ + elif mode == 'text/html': + return """ + + + + + + + + + + +""" @staticmethod def findThemeFile(theme):