Răsfoiți Sursa

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

James Allen 10 ani în urmă
părinte
comite
38876a9d4c
1 a modificat fișierele cu 32 adăugiri și 30 ștergeri
  1. 32 30
      services/web/app/views/project/editor/publish-template.jade

+ 32 - 30
services/web/app/views/project/editor/publish-template.jade

@@ -6,8 +6,8 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
 			ng-click="cancel()"
 		) ×
 		h3 #{translate("publish_as_template")}
-	.modal-body.modal-body-share
-		span(ng-if="project.features.templates")
+	div(ng-if="project.features.templates")
+		.modal-body.modal-body-share
 			span(ng-hide="problemTalkingToTemplateApi")
 				form()
 					label(for='Description') #{translate("template_description")}
@@ -24,8 +24,32 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
 					a(ng-href="{{templateDetails.canonicalUrl}}") #{translate("view_in_template_gallery")}.
 
 			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")}
 
-		div(ng-hide="project.features.templates")
+			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
@@ -52,36 +76,14 @@ script(type="text/ng-template", id="publishProjectAsTemplateModalTemplate")
 				li
 					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")
-				| #{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")}...
+				.row-spaced-small.small(ng-show="startedFreeTrial")
+					| #{translate("refresh_page_after_starting_free_trial")}