浏览代码

Hide download for deleted refused emails

Son NK 5 年之前
父节点
当前提交
e21e27eefa
共有 2 个文件被更改,包括 7 次插入4 次删除
  1. 6 3
      app/dashboard/templates/dashboard/refused_email.html
  2. 1 1
      cron.py

+ 6 - 3
app/dashboard/templates/dashboard/refused_email.html

@@ -27,9 +27,12 @@
           Sent {{ refused_email.created_at | dt }}
           Sent {{ refused_email.created_at | dt }}
         </div>
         </div>
 
 
-
-        <a href="{{ refused_email.get_url() }}" class="mt-4">View →</a>
-        <div class="small-text">This will download a ".eml" file that you can open in your favorite email client</div>
+        {% if refused_email.deleted %}
+          Email deleted {{ refused_email.deleted_at | dt }}
+        {% else %}
+          <a href="{{ refused_email.get_url() }}" class="mt-4">Download →</a>
+          <div class="small-text">This will download a ".eml" file that you can open in your favorite email client</div>
+        {% endif %}
 
 
       </div>
       </div>
     {% endfor %}
     {% endfor %}

+ 1 - 1
cron.py

@@ -189,7 +189,7 @@ if __name__ == "__main__":
             "notify_trial_end",
             "notify_trial_end",
             "notify_manual_subscription_end",
             "notify_manual_subscription_end",
             "notify_premium_end",
             "notify_premium_end",
-            "delete_refused_emails"
+            "delete_refused_emails",
         ],
         ],
     )
     )
     args = parser.parse_args()
     args = parser.parse_args()