publish-template.jade 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. .modal-body.modal-body-share
  10. span(ng-hide="problemTalkingToTemplateApi")
  11. form()
  12. label(for='Description') #{translate("template_description")}
  13. .form-group
  14. textarea.form-control(
  15. rows=5,
  16. name='Description',
  17. ng-model="templateDetails.description",
  18. ng-blur="updateProjectDescription()",
  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")}...