Show sponsor details on the view/claim benefit page
authorMagnus Hagander <magnus@hagander.net>
Tue, 25 Sep 2018 17:08:27 +0000 (19:08 +0200)
committerMagnus Hagander <magnus@hagander.net>
Tue, 25 Sep 2018 17:08:27 +0000 (19:08 +0200)
Because you often want the URL and the Display Name of the sponsor when
confirming a logo, for example...

template/confsponsor/admin_benefit.html
template/confsponsor/admin_sponsor.html
template/confsponsor/admin_sponsor_details.html [new file with mode: 0644]

index 700d76d593a95ed57282edab890285187acb538c..febbba2db73313c890205dee1ca6da4e62d4b0b2 100644 (file)
@@ -4,7 +4,10 @@
 {%block layoutblock%}
 <h1>Conference Sponsorship - {{sponsor}}</h1>
 
-<h2>{{benefit.benefit}}</h2>
+<h3>Sponsor details</h3>
+{%include "confsponsor/admin_sponsor_details.html" %}
+
+<h2>Claimed benefit: {{benefit.benefit}}</h2>
 {%if benefit.confirmed%}
 <p>This benefit has been fully confirmed.</p>
 {%else%}
index 9a11eead83b7600eb779469817556fd1500a9e9d..d4b7b7b8d38b50fe0d4cef60daa4e25af071d08c 100644 (file)
@@ -16,70 +16,7 @@ div.panelwrap {
 {%block layoutblock%}
 <h1>Conference Sponsorship - {{sponsor}}</h1>
 
-<table class="table table-condensed">
-  <tr>
-    <th class="col-md-2">Conference:</th>
-    <td>{{conference}}</td>
-  </tr>
-  <tr>
-    <th>Sponsor:</th>
-    <td>{{sponsor.name}}</td>
-  </tr>
-  <tr>
-    <th>Display name:</th>
-    <td>{{sponsor.displayname}}</td>
-  </tr>
-  <tr>
-    <th style="vertical-align:top;">Invoice address:</th>
-    <td>{{sponsor.invoiceaddr|linebreaks}}</td>
-  </tr>
-{%if euvat%}
-  <tr>
-    <th>VAT number:</th>
-    <td>{{sponsor.vatnumber}}</td>
-  </tr>
-{%endif%}
-  <tr>
-    <th>URL:</th>
-    <td>{{sponsor.url}}</td>
-  </tr>
-  <tr>
-    <th>Level:</th>
-    <td>{{sponsor.level}}</td>
-  </tr>
-{%if sponsor.twittername%}
-  <tr>
-    <th>Twittername:</th>
-    <td>{{sponsor.twittername}}</td>
-  </tr>
-{%endif%}
-  <tr>
-    <th>Status:</th>
-    <td>{%if sponsor.confirmed%}Confirmed ({{sponsor.confirmedat}}){%else%}<i>Awaiting confirmation (signed up {{sponsor.signupat}})</i>{%endif%}</td>
-  </tr>
-{%if sponsor.invoice%}
-  <tr>
-    <th>Payment status:</th>
-    <td>{%if sponsor.invoice.paidat%}Paid {{sponsor.invoice.paidat}}{%elif sponsor.invoice.isexpired%}Overdue{%else%}Invoiced{%endif%}</td>
-  </tr>
-{%endif%}
-  <tr>
-    <th>Edit:</th>
-    <td><a class="btn btn-default btn-sm" href="edit/">Edit sponsor</a></td>
-  </tr>
-  <tr>
-    <th>View:</th>
-    <td><a class="btn btn-default btn-sm" href="/events/sponsor/{{sponsor.id}}/">View as end user</a></td>
-  </tr>
-  <tr>
-    <th>Managers:</th>
-    <td><ul>
-       {%for m in sponsor.managers.all%}
-       <li>{{m.first_name}} {{m.last_name}} ({{m.email}})</li>
-       {%endfor%}
-    </ul></td>
-  </tr>
-</table>
+{%include "confsponsor/admin_sponsor_details.html" with details=1 %}
 
 {%if sponsor.confirmed%}
 
diff --git a/template/confsponsor/admin_sponsor_details.html b/template/confsponsor/admin_sponsor_details.html
new file mode 100644 (file)
index 0000000..ca72a1a
--- /dev/null
@@ -0,0 +1,66 @@
+<table class="table table-condensed">
+  <tr>
+    <th class="col-md-2">Conference:</th>
+    <td>{{conference}}</td>
+  </tr>
+  <tr>
+    <th>Sponsor:</th>
+    <td>{{sponsor.name}}</td>
+  </tr>
+  <tr>
+    <th>Display name:</th>
+    <td>{{sponsor.displayname}}</td>
+  </tr>
+  <tr>
+    <th style="vertical-align:top;">Invoice address:</th>
+    <td>{{sponsor.invoiceaddr|linebreaks}}</td>
+  </tr>
+{%if euvat%}
+  <tr>
+    <th>VAT number:</th>
+    <td>{{sponsor.vatnumber}}</td>
+  </tr>
+{%endif%}
+  <tr>
+    <th>URL:</th>
+    <td>{{sponsor.url}}</td>
+  </tr>
+  <tr>
+    <th>Level:</th>
+    <td>{{sponsor.level}}</td>
+  </tr>
+{%if sponsor.twittername%}
+  <tr>
+    <th>Twittername:</th>
+    <td>{{sponsor.twittername}}</td>
+  </tr>
+{%endif%}
+  <tr>
+    <th>Status:</th>
+    <td>{%if sponsor.confirmed%}Confirmed ({{sponsor.confirmedat}}){%else%}<i>Awaiting confirmation (signed up {{sponsor.signupat}})</i>{%endif%}</td>
+  </tr>
+{%if details%}
+{%if sponsor.invoice%}
+  <tr>
+    <th>Payment status:</th>
+    <td>{%if sponsor.invoice.paidat%}Paid {{sponsor.invoice.paidat}}{%elif sponsor.invoice.isexpired%}Overdue{%else%}Invoiced{%endif%}</td>
+  </tr>
+{%endif%}
+  <tr>
+    <th>Edit:</th>
+    <td><a class="btn btn-default btn-sm" href="edit/">Edit sponsor</a></td>
+  </tr>
+  <tr>
+    <th>View:</th>
+    <td><a class="btn btn-default btn-sm" href="/events/sponsor/{{sponsor.id}}/">View as end user</a></td>
+  </tr>
+  <tr>
+    <th>Managers:</th>
+    <td><ul>
+       {%for m in sponsor.managers.all%}
+       <li>{{m.first_name}} {{m.last_name}} ({{m.email}})</li>
+       {%endfor%}
+    </ul></td>
+  </tr>
+{%endif%}{# if details #}
+</table>