diff --git a/services/web/app/coffee/Features/Templates/TemplatesWebController.coffee b/services/web/app/coffee/Features/Templates/TemplatesWebController.coffee index ea0a36058a..aaca34a52c 100644 --- a/services/web/app/coffee/Features/Templates/TemplatesWebController.coffee +++ b/services/web/app/coffee/Features/Templates/TemplatesWebController.coffee @@ -70,7 +70,7 @@ module.exports = TemplatesWebController = if err? logger.err err:err, user_id:user_id, tag_name:tag_name, "something went wrong in _renderCanonicalPage" return res.send 500 - data.title = data.tag.name + data.title = data?.tag?.name res.render "templates/tag", data _getDataFromTemplatesApi: (path, callback)-> diff --git a/services/web/app/views/templates/template.jade b/services/web/app/views/templates/template.jade index 195658e4da..4f922fa0a9 100644 --- a/services/web/app/views/templates/template.jade +++ b/services/web/app/views/templates/template.jade @@ -8,8 +8,9 @@ block content h2 a(href="/templates") Templates | › - a(href=tag.tagPagePath) #{tag.name} - | › + - if(tag) + a(href=tag.tagPagePath) #{tag.name} + | › | #{template.name} .row .col-md-6 @@ -24,7 +25,7 @@ block content .template-details-section h3 About div !{template.description} - div(ng-controller="openInSlController") + div(ng-controller="openInSlController").download-buttons a.btn.btn-primary.btn-large(href=template.open_in_sharelatex_url, ng-click='open()', ng-disabled="isDisabled", rel='nofollow') {{openInSlText}} |   diff --git a/services/web/public/stylesheets/app/templates.less b/services/web/public/stylesheets/app/templates.less index 1b3e6231f1..ffd3c6cf85 100644 --- a/services/web/public/stylesheets/app/templates.less +++ b/services/web/public/stylesheets/app/templates.less @@ -33,7 +33,9 @@ margin-top: 0px; } -.social_buttons { + + +.download-buttons, .social_buttons { padding-top: 20px; }