mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-29 00:23:43 -05:00
put published date on template publishing area
This commit is contained in:
parent
413ef7440f
commit
149b51ddc6
2 changed files with 3 additions and 0 deletions
|
@ -297,6 +297,7 @@
|
||||||
|
|
||||||
#publishedAsTemplateArea(style="display:none;")
|
#publishedAsTemplateArea(style="display:none;")
|
||||||
a#templateLink(href='{{canonicalUrl}}') View Template
|
a#templateLink(href='{{canonicalUrl}}') View Template
|
||||||
|
p published at {{publishedDate}}
|
||||||
.btn.btn-warning#unPublishProjectAsTemplate unpublish project as template
|
.btn.btn-warning#unPublishProjectAsTemplate unpublish project as template
|
||||||
.btn.btn-success#republishProjectAsTemplate re publish project as template
|
.btn.btn-success#republishProjectAsTemplate re publish project as template
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,7 @@ define [
|
||||||
description: @model.get("description")
|
description: @model.get("description")
|
||||||
canonicalUrl: @model.get("template.canonicalUrl")
|
canonicalUrl: @model.get("template.canonicalUrl")
|
||||||
isPublished: @model.get("template.isPublished")
|
isPublished: @model.get("template.isPublished")
|
||||||
|
publishedDate: @model.get("template.publishedDate")
|
||||||
|
|
||||||
$(@el).html $(Mustache.to_html(@template, viewModel))
|
$(@el).html $(Mustache.to_html(@template, viewModel))
|
||||||
@publishedArea = $('#publishedAsTemplateArea')
|
@publishedArea = $('#publishedAsTemplateArea')
|
||||||
|
@ -201,6 +202,7 @@ define [
|
||||||
@model.set("template.isPublished", details.exists)
|
@model.set("template.isPublished", details.exists)
|
||||||
if details.exists
|
if details.exists
|
||||||
@model.set("template.canonicalUrl", details.canonicalUrl)
|
@model.set("template.canonicalUrl", details.canonicalUrl)
|
||||||
|
@model.set("template.publishedDate", details.publishedDate)
|
||||||
@publishedArea.show()
|
@publishedArea.show()
|
||||||
@unpublishedArea.hide()
|
@unpublishedArea.hide()
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in a new issue