Don't show publish buttons when showing free trial for templates

This commit is contained in:
James Allen 2016-01-19 16:10:50 +00:00
parent ed5872702a
commit 38876a9d4c

View file

@ -6,8 +6,8 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
ng-click="cancel()"
) ×
h3 #{translate("publish_as_template")}
div(ng-if="project.features.templates")
.modal-body.modal-body-share
span(ng-if="project.features.templates")
span(ng-hide="problemTalkingToTemplateApi")
form()
label(for='Description') #{translate("template_description")}
@ -25,7 +25,31 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
span(ng-show="problemTalkingToTemplateApi") #{translate("problem_talking_to_publishing_service")}.
.modal-footer(ng-hide="problemTalkingToTemplateApi")
button.btn.btn-default(
ng-click="cancel()",
ng-disabled="state.publishInflight || state.unpublishInflight"
)
span #{translate("cancel")}
button.btn.btn-info(
ng-click="unpublishTemplate()",
ng-disabled="state.publishInflight || state.unpublishInflight"
ng-show="templateDetails.exists"
)
span(ng-show="!state.unpublishInflight") #{translate("unpublish")}
span(ng-show="state.unpublishInflight") #{translate("unpublishing")}...
button.btn.btn-primary(
ng-click="publishTemplate()",
ng-disabled="state.publishInflight || state.unpublishInflight"
)
span(ng-show="!state.publishInflight && !templateDetails.exists") #{translate("publish")}
span(ng-show="!state.publishInflight && templateDetails.exists") #{translate("republish")}
span(ng-show="state.publishInflight") #{translate("publishing")}...
div(ng-hide="project.features.templates")
.modal-body.modal-body-share
p #{translate("upgrade_to_get_feature", {feature:"templates"})}
ul.list-unstyled
@ -53,35 +77,13 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
i.fa.fa-check  
|#{translate("compile_larger_projects")}
p(ng-controller="FreeTrialModalController").text-center
.modal-footer(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")
.row-spaced-small.small(ng-show="startedFreeTrial")
| #{translate("refresh_page_after_starting_free_trial")}
.modal-footer(ng-hide="problemTalkingToTemplateApi")
button.btn.btn-default(
ng-click="cancel()",
ng-disabled="state.publishInflight || state.unpublishInflight"
)
span #{translate("cancel")}
button.btn.btn-info(
ng-click="unpublishTemplate()",
ng-disabled="state.publishInflight || state.unpublishInflight"
ng-show="templateDetails.exists"
)
span(ng-show="!state.unpublishInflight") #{translate("unpublish")}
span(ng-show="state.unpublishInflight") #{translate("unpublishing")}...
button.btn.btn-primary(
ng-click="publishTemplate()",
ng-disabled="state.publishInflight || state.unpublishInflight"
)
span(ng-show="!state.publishInflight && !templateDetails.exists") #{translate("publish")}
span(ng-show="!state.publishInflight && templateDetails.exists") #{translate("republish")}
span(ng-show="state.publishInflight") #{translate("publishing")}...