mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
Make templates a premium feature
This commit is contained in:
parent
58edb87c61
commit
5125aa0089
4 changed files with 62 additions and 16 deletions
|
@ -26,6 +26,8 @@ module.exports = ProjectEditorHandler =
|
|||
dropbox:false
|
||||
compileTimeout: 60
|
||||
compileGroup:"standard"
|
||||
templates: false
|
||||
references: false
|
||||
|
||||
if project.owner_ref.features?
|
||||
if project.owner_ref.features.collaborators?
|
||||
|
@ -37,7 +39,11 @@ module.exports = ProjectEditorHandler =
|
|||
if project.owner_ref.features.compileTimeout?
|
||||
result.features.compileTimeout = project.owner_ref.features.compileTimeout
|
||||
if project.owner_ref.features.compileGroup?
|
||||
result.features.compileGroup = project.owner_ref.features.compileGroup
|
||||
result.features.compileGroup = project.owner_ref.features.compileGroup
|
||||
if project.owner_ref.features.templates?
|
||||
result.features.templates = project.owner_ref.features.templates
|
||||
if project.owner_ref.features.references?
|
||||
result.features.references = project.owner_ref.features.references
|
||||
|
||||
|
||||
result.owner = @buildUserModelView project.owner_ref, "owner"
|
||||
|
|
|
@ -34,6 +34,8 @@ UserSchema = new Schema
|
|||
github: { type:Boolean, default: Settings.defaultFeatures.github }
|
||||
compileTimeout: { type:Number, default: Settings.defaultFeatures.compileTimeout }
|
||||
compileGroup: { type:String, default: Settings.defaultFeatures.compileGroup }
|
||||
templates: { type:Boolean, default: Settings.defaultFeatures.templates }
|
||||
references: { type:Boolean, default: Settings.defaultFeatures.references }
|
||||
}
|
||||
featureSwitches : {
|
||||
pdfng: { type: Boolean }
|
||||
|
|
|
@ -7,25 +7,61 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
|
|||
) ×
|
||||
h3 #{translate("publish_as_template")}
|
||||
.modal-body.modal-body-share
|
||||
span(ng-hide="problemTalkingToTemplateApi")
|
||||
form()
|
||||
label(for='Description') #{translate("template_description")}
|
||||
.form-group
|
||||
textarea.form-control(
|
||||
rows=5,
|
||||
name='Description',
|
||||
ng-model="templateDetails.description",
|
||||
value=""
|
||||
)
|
||||
div(ng-show="templateDetails.exists").text-center.templateDetails
|
||||
| #{translate("project_last_published_at")}
|
||||
strong {{templateDetails.publishedDate}}.
|
||||
a(ng-href="{{templateDetails.canonicalUrl}}") #{translate("view_in_template_gallery")}.
|
||||
span(ng-if="project.features.templates")
|
||||
span(ng-hide="problemTalkingToTemplateApi")
|
||||
form()
|
||||
label(for='Description') #{translate("template_description")}
|
||||
.form-group
|
||||
textarea.form-control(
|
||||
rows=5,
|
||||
name='Description',
|
||||
ng-model="templateDetails.description",
|
||||
value=""
|
||||
)
|
||||
div(ng-show="templateDetails.exists").text-center.templateDetails
|
||||
| #{translate("project_last_published_at")}
|
||||
strong {{templateDetails.publishedDate}}.
|
||||
a(ng-href="{{templateDetails.canonicalUrl}}") #{translate("view_in_template_gallery")}.
|
||||
|
||||
span(ng-show="problemTalkingToTemplateApi") #{translate("problem_talking_to_publishing_service")}.
|
||||
span(ng-show="problemTalkingToTemplateApi") #{translate("problem_talking_to_publishing_service")}.
|
||||
|
||||
div(ng-hide="project.features.templates")
|
||||
p #{translate("upgrade_to_get_feature", {feature:"templates"})}
|
||||
|
||||
ul.list-unstyled
|
||||
li
|
||||
i.fa.fa-check
|
||||
| #{translate("unlimited_projects")}
|
||||
|
||||
li
|
||||
i.fa.fa-check
|
||||
| #{translate("collabs_per_proj", {collabcount:'Multiple'})}
|
||||
|
||||
li
|
||||
i.fa.fa-check
|
||||
| #{translate("full_doc_history")}
|
||||
|
||||
li
|
||||
i.fa.fa-check
|
||||
| #{translate("sync_to_dropbox")}
|
||||
|
||||
li
|
||||
i.fa.fa-check
|
||||
| #{translate("sync_to_github")}
|
||||
|
||||
li
|
||||
i.fa.fa-check
|
||||
|#{translate("compile_larger_projects")}
|
||||
|
||||
p(ng-controller="FreeTrialModalController").text-center
|
||||
a.btn.btn-success(
|
||||
href
|
||||
ng-class="buttonClass"
|
||||
ng-click="startFreeTrial('templates')"
|
||||
) #{translate("start_free_trial")}
|
||||
|
||||
p.small(ng-show="startedFreeTrial")
|
||||
| #{translate("refresh_page_after_starting_free_trial")}
|
||||
|
||||
.modal-footer(ng-hide="problemTalkingToTemplateApi")
|
||||
button.btn.btn-default(
|
||||
|
|
|
@ -143,6 +143,8 @@ module.exports =
|
|||
versioning: true
|
||||
compileTimeout: 60
|
||||
compileGroup: "standard"
|
||||
references: true
|
||||
templates: true
|
||||
|
||||
plans: plans = [{
|
||||
planCode: "personal"
|
||||
|
|
Loading…
Reference in a new issue