mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
moved info and home controller into static page feature
This commit is contained in:
parent
2288591bae
commit
73bbd5b495
4 changed files with 8 additions and 7 deletions
|
@ -1,11 +1,12 @@
|
|||
logger = require('logger-sharelatex')
|
||||
_ = require('underscore')
|
||||
User = require('./UserController')
|
||||
Quotes = require('../models/Quote').Quote
|
||||
User = require('../../controllers/UserController')
|
||||
Quotes = require('../../models/Quote').Quote
|
||||
|
||||
Path = require "path"
|
||||
fs = require "fs"
|
||||
homepageExists = fs.existsSync Path.resolve(__dirname + "/../../views/external/home.jade")
|
||||
|
||||
homepageExists = fs.existsSync Path.resolve(__dirname + "/../../../views/external/home.jade")
|
||||
|
||||
module.exports = HomeController =
|
||||
index : (req,res)->
|
||||
|
@ -23,7 +24,7 @@ module.exports = HomeController =
|
|||
|
||||
externalPage: (page, title) ->
|
||||
return (req, res, next = (error) ->) ->
|
||||
path = Path.resolve(__dirname + "/../../views/external/#{page}.jade")
|
||||
path = Path.resolve(__dirname + "/../../../views/external/#{page}.jade")
|
||||
fs.exists path, (exists) -> # No error in this callback - old method in Node.js!
|
||||
if exists
|
||||
res.render "external/#{page}.jade",
|
|
@ -4,7 +4,7 @@ Assert = require 'assert'
|
|||
Settings = require 'settings-sharelatex'
|
||||
User = require('../models/User').User
|
||||
Project = require('../models/Project').Project
|
||||
HomeController = require("../controllers/HomeController")
|
||||
HomeController = require("../Features/StaticPages/HomeController")
|
||||
AuthenticationController = require("../Features/Authentication/AuthenticationController")
|
||||
_ = require('underscore')
|
||||
metrics = require('../infrastructure/Metrics')
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
UserController = require('./controllers/UserController')
|
||||
AdminController = require('./controllers/AdminController')
|
||||
HomeController = require('./controllers/HomeController')
|
||||
HomeController = require('./Features/StaticPages/HomeController')
|
||||
ProjectController = require("./controllers/ProjectController")
|
||||
ProjectApiController = require("./Features/Project/ProjectApiController")
|
||||
InfoController = require('./controllers/InfoController')
|
||||
InfoController = require('./Features/StaticPages/InfoController')
|
||||
SpellingController = require('./Features/Spelling/SpellingController')
|
||||
SecurityManager = require('./managers/SecurityManager')
|
||||
AuthorizationManager = require('./Features/Security/AuthorizationManager')
|
||||
|
|
Loading…
Reference in a new issue