Add placeholder for users without any campaigns

master
Sven Slootweg 11 years ago
parent 07ae0efce8
commit 033335b5e7

@ -447,6 +447,11 @@ div.logo.thumb
* DASHBOARD *
**************************************/
td.placeholder
{
padding: 16px 19px;
}
td.payment-methods
{
max-width: 240px;

@ -18,37 +18,43 @@
<th class="icon"><img src="/static/images/icons/projected.png" alt="Estimate of real donations per month, based on donation rate" title="Estimate of real donations per month, based on donation rate"></th>
<th>Payment methods</th>
</tr>
{%foreach campaign in campaigns}
<tr class="clickable" data-url="/dashboard/{%?campaign[urlname]}">
<td class="name">{%?campaign[name]}</td>
<td>
{%if campaign[one-off] == false}
Recurring
{%else}
Recurring &amp; One-off
{%/if}
</td>
<td class="numeric">{%?campaign[subscribers]}</td>
<td class="numeric">
{%if campaign[have-data] == true}
{%?campaign[rate]}%
{%else}
-
{%/if}
</td>
<td class="numeric">{%?campaign[total]}</td>
<td class="numeric total">{%?campaign[projection]}</td>
<td class="payment-methods">
{%foreach method in campaign[payment-methods]}
{%if isempty|method[image] == false}
<img class="logo thumb" src="{%?method[image]}" alt="{%?method[text]}">
{%if isempty|campaigns == true}
<tr>
<td colspan="7" class="placeholder">You do not currently have any campaigns.</td>
</tr>
{%else}
{%foreach campaign in campaigns}
<tr class="clickable" data-url="/dashboard/{%?campaign[urlname]}">
<td class="name">{%?campaign[name]}</td>
<td>
{%if campaign[one-off] == false}
Recurring
{%else}
<div class="logo thumb">{%?method[text]}</div>
Recurring &amp; One-off
{%/if}
{%/foreach}
</td>
</tr>
{%/foreach}
</td>
<td class="numeric">{%?campaign[subscribers]}</td>
<td class="numeric">
{%if campaign[have-data] == true}
{%?campaign[rate]}%
{%else}
-
{%/if}
</td>
<td class="numeric">{%?campaign[total]}</td>
<td class="numeric total">{%?campaign[projection]}</td>
<td class="payment-methods">
{%foreach method in campaign[payment-methods]}
{%if isempty|method[image] == false}
<img class="logo thumb" src="{%?method[image]}" alt="{%?method[text]}">
{%else}
<div class="logo thumb">{%?method[text]}</div>
{%/if}
{%/foreach}
</td>
</tr>
{%/foreach}
{%/if}
<tr class="total">
<td class="meta" colspan="2">Total</td>
<td class="numeric">{%?total-subscribers}</td>

Loading…
Cancel
Save