Merge pull request #5408 from relldoesphp/CRM-16107
[civicrm-core.git] / partials / crmMailing / edit.html
index 0d6f08e3b64e936705001dd0e2180ca988cc7fb3..b46a54ca28861c67f7d118c5a0be8716d8e11a7c 100644 (file)
@@ -1,6 +1,4 @@
-<div crm-ui-accordion crm-title="ts('Debug')" crm-collapsed="true">
-  <pre>{{mailing|json}}</pre>
-</div>
+<div crm-ui-debug="mailing"></div>
 
 <div ng-show="isSubmitted()">
   {{ts('This mailing has been submitted.')}}
       </div>
 
       <span crm-ui-wizard-buttons style="float:right;">
-        <button crm-icon="trash" ng-disabled="block.check()" crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}" on-yes="delete()">{{ts('Delete Draft')}}</button>
+        <button
+          crm-icon="trash"
+          ng-show="checkPerm('delete in CiviMail')"
+          ng-disabled="block.check()"
+          crm-confirm="{title:ts('Delete Draft'), message:ts('Are you sure you want to permanently delete this mailing?')}"
+          on-yes="delete()">{{ts('Delete Draft')}}</button>
         <button crm-icon="disk" ng-disabled="block.check()" ng-click="save().then(leave)">{{ts('Save Draft')}}</button>
       </span>
     </div>