publish-template.pug 2.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
  2. .modal-header
  3. button.close(
  4. type="button"
  5. data-dismiss="modal"
  6. ng-click="cancel()"
  7. ) ×
  8. h3 #{translate("publish_as_template")}
  9. div(ng-if="project.features.templates")
  10. .modal-body.modal-body-share
  11. span(ng-hide="problemTalkingToTemplateApi")
  12. form()
  13. label(for='Description') #{translate("template_description")}
  14. .form-group
  15. textarea.form-control(
  16. rows=5,
  17. name='Description',
  18. ng-model="templateDetails.description",
  19. value=""
  20. )
  21. div(ng-show="templateDetails.exists").text-center.templateDetails
  22. | #{translate("project_last_published_at")}
  23. strong {{templateDetails.publishedDate}}.
  24. a(ng-href="{{templateDetails.canonicalUrl}}") #{translate("view_in_template_gallery")}.
  25. span(ng-show="problemTalkingToTemplateApi") #{translate("problem_talking_to_publishing_service")}.
  26. .modal-footer(ng-hide="problemTalkingToTemplateApi")
  27. button.btn.btn-default(
  28. ng-click="cancel()",
  29. ng-disabled="state.publishInflight || state.unpublishInflight"
  30. )
  31. span #{translate("cancel")}
  32. button.btn.btn-info(
  33. ng-click="unpublishTemplate()",
  34. ng-disabled="state.publishInflight || state.unpublishInflight"
  35. ng-show="templateDetails.exists"
  36. )
  37. span(ng-show="!state.unpublishInflight") #{translate("unpublish")}
  38. span(ng-show="state.unpublishInflight") #{translate("unpublishing")}...
  39. button.btn.btn-primary(
  40. ng-click="publishTemplate()",
  41. ng-disabled="state.publishInflight || state.unpublishInflight"
  42. )
  43. span(ng-show="!state.publishInflight && !templateDetails.exists") #{translate("publish")}
  44. span(ng-show="!state.publishInflight && templateDetails.exists") #{translate("republish")}
  45. span(ng-show="state.publishInflight") #{translate("publishing")}...
  46. div(ng-hide="project.features.templates")
  47. .modal-body.modal-body-share
  48. p #{translate("upgrade_to_get_feature", {feature:"templates"})}
  49. ul.list-unstyled
  50. li
  51. i.fa.fa-check  
  52. | #{translate("unlimited_projects")}
  53. li
  54. i.fa.fa-check  
  55. | #{translate("collabs_per_proj", {collabcount:'Multiple'})}
  56. li
  57. i.fa.fa-check  
  58. | #{translate("full_doc_history")}
  59. li
  60. i.fa.fa-check  
  61. | #{translate("sync_to_dropbox")}
  62. li
  63. i.fa.fa-check  
  64. | #{translate("sync_to_github")}
  65. li
  66. i.fa.fa-check  
  67. |#{translate("compile_larger_projects")}
  68. .modal-footer(ng-controller="FreeTrialModalController")
  69. .text-center
  70. a.btn.btn-success(
  71. href
  72. ng-class="buttonClass"
  73. ng-click="startFreeTrial('templates')"
  74. ) #{translate("start_free_trial")}
  75. .row-spaced-small.small(ng-show="startedFreeTrial")
  76. | #{translate("refresh_page_after_starting_free_trial")}