William Arnold avatar William Arnold committed f1c12c1

Make the sold memberships show up first on the people detail and show prices nicely.

Comments (0)

Files changed (1)

reg/templates/reg_member_view.html

 
 <br><br>
 
+<table id="current_memberships">
+    <caption>Paid Memberships</caption>
+    <thead>
+        <tr>
+            <th class="subhead">Event</th>
+            <th class="subhead">Type</th>
+            <th class="subhead">#</th>
+            <th class="subhead">Price Paid</th>
+            <th class="subhead">Method</th>
+            <th class="subhead">Comment</th>
+        </tr>
+    </thead><tbody>
+        {% for m in memberships %}
+        <tr class="{% cycle 'odd' 'even' %}">
+            <td>{{ m.event.name }}</td>
+            <td class="center">
+                {{ m.type.name }}
+                {% if m.quantity > 1%}<strong>x {{ m.quantity }}</strong>{% endif %}
+            </td>
+            <td class="right">{{ m.badge_number|default:'&mdash;' }}</td>
+            <td class="right">$ {{ m.price|floatformat:2 }}</td>
+            <td class="right">{{ m.payment_method }}</td>
+            <td class="right">{{ m.comment }}</td>
+        </tr>
+        {% empty %}
+            <tr><td colspan="6"><strong>None</strong></td></tr>
+        {% endfor %}
+    </tbody>
+</table>
+
 <table id="available_memberships">
     <caption>Available Memberships (Click to add to cart.)</caption>
     <thead>
                         <a href="{% url reg.views.cart_add person.pk, t.pk %}">{{t.name}}</a>
                     {% endif %}
                 </td>
-                <td class="right">${{t.price}}</td>
+                <td class="right">$ {{t.price|floatformat:2}}</td>
             </tr>
         {% endfor %}
     </tbody>
 
 <br><br>
 
-<table id="current_memberships">
-    <caption>Paid Memberships</caption>
-    <thead>
-        <tr>
-            <th class="subhead">Event</th>
-            <th class="subhead">Type</th>
-            <th class="subhead">#</th>
-            <th class="subhead">Price Paid</th>
-            <th class="subhead">Method</th>
-            <th class="subhead">Comment</th>
-        </tr>
-    </thead><tbody>
-        {% for m in memberships %}
-        <tr class="{% cycle 'odd' 'even' %}">
-            <td>{{ m.event.name }}</td>
-            <td class="center">
-                {{ m.type.name }}
-                {% if m.quantity > 1%}<strong>x {{ m.quantity }}</strong>{% endif %}
-            </td>
-            <td class="right">{{ m.badge_number|default:'&mdash;' }}</td>
-            <td class="right">{{ m.price }}</td>
-            <td class="right">{{ m.payment_method }}</td>
-            <td class="right">{{ m.comment }}</td>
-        </tr>
-        {% empty %}
-            <tr><td colspan="6"><strong>None</strong></td></tr>
-        {% endfor %}
-    </tbody>
-</table>
+
 {% endblock %}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.