Sort out title of wiki

This commit is contained in:
James Allen 2014-08-05 17:08:38 +01:00
parent 2ea7dee682
commit a7cf8d6b0a
5 changed files with 14 additions and 16 deletions

View file

@ -16,16 +16,11 @@ module.exports = HomeController =
else else
res.redirect '/project' res.redirect '/project'
else else
if homepageExists HomeController.home(req, res)
res.render 'external/home',
title: 'ShareLaTeX.com'
else
res.redirect "/login"
home: (req, res)-> home: (req, res)->
if homepageExists if homepageExists
res.render 'external/home', res.render 'external/home'
title: 'ShareLaTeX.com'
else else
res.redirect "/login" res.redirect "/login"

View file

@ -34,7 +34,7 @@ module.exports =
dropboxHandler.getUserRegistrationStatus user._id, (err, status)-> dropboxHandler.getUserRegistrationStatus user._id, (err, status)->
userIsRegisteredWithDropbox = !err? and status.registered userIsRegisteredWithDropbox = !err? and status.registered
res.render 'user/settings', res.render 'user/settings',
title:'Your settings', title:'Account Settings',
userHasDropboxFeature: user.features.dropbox userHasDropboxFeature: user.features.dropbox
userIsRegisteredWithDropbox: userIsRegisteredWithDropbox userIsRegisteredWithDropbox: userIsRegisteredWithDropbox
user: user, user: user,

View file

@ -15,9 +15,15 @@ module.exports = WikiController =
return next(error) if error? return next(error) if error?
WikiController._getPageContent page, (error, page) -> WikiController._getPageContent page, (error, page) ->
return next(error) if error? return next(error) if error?
if page.title == "Main Page"
title = "Documentation"
else
title = page.title
res.render "wiki/page", { res.render "wiki/page", {
page: page page: page
contents: contents contents: contents
title: title
} }
_getPageContent: (page, callback = (error, data = { content: "", title: "" }) ->) -> _getPageContent: (page, callback = (error, data = { content: "", title: "" }) ->) ->

View file

@ -3,10 +3,10 @@ html(itemscope, itemtype='http://schema.org/Product')
block vars block vars
head head
- if (typeof(priority_title) !== "undefined" && priority_title) -if (typeof(title) == "undefined")
title= title + ' - Online LaTeX Editor ShareLaTeX' title ShareLaTeX, the Online LaTeX Editor
- else -else
title= 'Online LaTeX Editor ShareLaTeX - ' +title title= title + ' - ShareLaTeX, the Online LaTeX Editor'
link(rel="icon", href="/favicon.ico") link(rel="icon", href="/favicon.ico")
link(rel='stylesheet', href='/stylesheets/style.css?fingerprint='+fingerprint('/stylesheets/style.css')) link(rel='stylesheet', href='/stylesheets/style.css?fingerprint='+fingerprint('/stylesheets/style.css'))
link(href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css",rel="stylesheet") link(href="//netdna.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css",rel="stylesheet")

View file

@ -9,9 +9,6 @@ block content
.col-xs-9.page .col-xs-9.page
.card .card
.page-header .page-header
- if (page.title == "Main Page") h1 #{title}
h1 ShareLaTeX Documentation
- else
h1 #{page.title}
| !{page.content} | !{page.content}