Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

172 lines (163 sloc) 5.723 kb
<h1>Biodiesel Member [% member.member_id %]</h1>
[% IF !member %]
[% SET message = "Sorry, that member cannot be found." %]
[% END %]
[% INCLUDE message.tt %]
[% SET muri = "/members/" _ member.member_id %]
[% IF member %]
[% IF member.unpaid_transactions.size > 0 %]
<div class="alert-message error">This member has <a href="[% muri %]/unpaid">un-paid transactions!</a></div>
[% END %]
[% IF member.frozen %]
<div class="alert-message warning">This member's account is <strong>frozen</strong>!</div>
[% END %]
[% IF member.active %]
<div id="details">
<p>
<table class="common-table zebra-striped">
<tr>
<td><strong>Member ID</strong></td>
<td>[% member.member_id %]</td>
</tr>
<tr>
<td><strong>Name</strong></td>
<td>[% member.name %]</td>
</tr>
[% IF is_admin %]
<tr>
<td><strong>Private Notes:</strong></td>
<td>[% member.notes | html %]</td>
</tr>
[% END %]
<tr>
<td><strong>Phone Number</strong></td>
<td><a href="tel:[% member.phone_num %]">[% member.phone_num %]</a></td>
</tr>
<tr>
<td><strong>Email Address</strong></td>
<td><a href="mailto:[% member.email %]">[% member.email %]</a></td>
</tr>
<tr>
<td><strong>Home Address</strong></td>
<td>[% member.address %]</td>
</tr>
<tr>
<td><strong>Joined Co-op</strong></td>
<td>[% member.start_pretty_date %]</td>
</tr>
<tr>
<td><strong>Dues Paid Until</strong></td>
<td>[% member.dues_paid_until_pretty_date %]</td>
</tr>
<tr>
<td><strong>Send protest emails after every fill-up?</strong></td>
<td>[% IF member.in_protest %]Yes[% ELSE %]No[% END %]</td>
</tr>
<tr>
<td><strong>Opted out of email?</strong></td>
<td>[% IF member.email_optout %]Yes[% ELSE %]No[% END %]</td>
</tr>
<tr>
<td><strong>Account Frozen?</strong></td>
<td>[% IF member.frozen %]Yes[% ELSE %]No[% END %]</td>
</tr>
[% IF member.billing_error && is_admin %]
<tr>
<td><strong>Billing Error</strong></td>
<td>[% member.billing_error %] - <a href="[% muri %]/clear-billing-error" class="btn">Clear error & try again</a></td>
</tr>
[% END %]
<tr>
<td><strong>Payment details</strong></td>
<td>
[% IF member.payment_hash %]
<a href="[% member.payment_profile_url( is_admin ) %]">Update payment details</a>
[% ELSE %]
<a href="[% member.payment_profile_url( is_admin) %]">Add payment details</a>
[% END %]
</td>
</tr>
</table>
</p>
<hr />
<p>
[% IF is_admin %]
<a class="btn" href="[% muri %]/edit">Edit this member!</a> &middot;
[% If member.frozen %]
<a class="btn" href="[% muri %]/freeze">Un-Freeze</a> &middot;
[% ELSE %]
<a class="btn" href="[% muri %]/freeze">Freeze</a> &middot;
[% END %]
<a class="btn" href="[% muri %]/change-pin">Change PIN</a> &middot;
<a class="btn" href="[% muri %]/cancel">Cancel Membership</a>
</p>
<p>
<a class="btn" href="[% muri %]/send-update-payment-email">Send request to update Payment Profile</a>
<a class="btn" href="[% muri %]/send-email">Email this member</a>
[% ELSE %]
[% SET muri = "/member" %]
<a class="btn" href="[% muri %]/edit">Edit my details</a> &middot;
<a class="btn" href="[% muri %]/change-pin">Change my PIN</a> &middot;
<a class="btn" href="[% muri %]/change-password">Change my password</a> &middot;
<a class="btn" href="[% muri %]/cancel">Cancel my membership</a>
[% END %]
</p>
<hr />
</div>
[% ELSE %]
[% IF is_admin %]
<div class="alert-message warning">This person has cancelled their co-op membership.</div>
[% IF member.cancel_reason %]
<p><strong>Their reason for leaving:</strong> [% member.cancel_reason %]</p>
[% END %]
[% END %]
<p>
<table class="common-table zebra-striped">
<tr>
<td><strong>ID</strong></td>
<td>[% member.member_id %]</td>
</tr>
<tr>
<td><strong>Name</strong></td>
<td>[% member.name %]</td>
</tr>
<tr>
<td><strong>Phone</strong></td>
<td><a href="tel:[% member.phone_num %]">[% member.phone_num %]</a></td>
</tr>
<tr>
<td><strong>Email</strong></td>
<td><a href="mailto:[% member.email %]">[% member.email %]</a></td>
</tr>
<tr>
<td><strong>Joined</strong></td>
<td>[% member.start_pretty_date %]</td>
</tr>
</table>
</p>
<p>
<a class="btn" href="[% muri %]/send-email">Email this member</a>
</p>
[% END %]
<h3>Activity:</h3>
<ul>
<li>Fuel purchases: [% stats.fuel_sales(member.member_id) %]</li>
<li>Fuel purchased: [% stats.fuel_for_member(member.member_id) %]L</li>
<li>
<a href="[% muri %]/txns">Recent Transactions</a>
</li>
<li>
[% IF member.unpaid_transactions.size > 0 %]
<a href="[% muri %]/unpaid">Unpaid Transactions ([% member.unpaid_transactions.size %])</a>
[% ELSE %]
[% IF is_admin %]This member has[% ELSE %]You have[% END %] no unpaid transactions.
[% END %]
</li>
</ul>
[% END %]
[% IF is_admin %]
<p>
<a class="btn" href="/members">Back to members list</a><br />
<a class="btn" href="/">Back to admin section</a><br />
</p>
[% END %]
Jump to Line
Something went wrong with that request. Please try again.