From 033335b5e7bbbb33b083105ff0bed07a70e6b977 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Mon, 25 Feb 2013 12:11:53 +0100 Subject: [PATCH] Add placeholder for users without any campaigns --- public_html/static/css/style.css | 5 +++ public_html/templates/dashboard.tpl | 64 ++++++++++++++++------------- 2 files changed, 40 insertions(+), 29 deletions(-) diff --git a/public_html/static/css/style.css b/public_html/static/css/style.css index 8046f9e..9b7f984 100644 --- a/public_html/static/css/style.css +++ b/public_html/static/css/style.css @@ -447,6 +447,11 @@ div.logo.thumb * DASHBOARD * **************************************/ +td.placeholder +{ + padding: 16px 19px; +} + td.payment-methods { max-width: 240px; diff --git a/public_html/templates/dashboard.tpl b/public_html/templates/dashboard.tpl index 6b3310f..cedea74 100644 --- a/public_html/templates/dashboard.tpl +++ b/public_html/templates/dashboard.tpl @@ -18,37 +18,43 @@ Estimate of real donations per month, based on donation rate Payment methods - {%foreach campaign in campaigns} - - {%?campaign[name]} - - {%if campaign[one-off] == false} - Recurring - {%else} - Recurring & One-off - {%/if} - - {%?campaign[subscribers]} - - {%if campaign[have-data] == true} - {%?campaign[rate]}% - {%else} - - - {%/if} - - {%?campaign[total]} - {%?campaign[projection]} - - {%foreach method in campaign[payment-methods]} - {%if isempty|method[image] == false} - + {%if isempty|campaigns == true} + + You do not currently have any campaigns. + + {%else} + {%foreach campaign in campaigns} + + {%?campaign[name]} + + {%if campaign[one-off] == false} + Recurring {%else} - + Recurring & One-off {%/if} - {%/foreach} - - - {%/foreach} + + {%?campaign[subscribers]} + + {%if campaign[have-data] == true} + {%?campaign[rate]}% + {%else} + - + {%/if} + + {%?campaign[total]} + {%?campaign[projection]} + + {%foreach method in campaign[payment-methods]} + {%if isempty|method[image] == false} + + {%else} + + {%/if} + {%/foreach} + + + {%/foreach} + {%/if} Total {%?total-subscribers}