Style fixes for sponsorship backend interface
authorMagnus Hagander <magnus@hagander.net>
Mon, 16 Jul 2018 11:32:40 +0000 (13:32 +0200)
committerMagnus Hagander <magnus@hagander.net>
Mon, 16 Jul 2018 11:42:16 +0000 (13:42 +0200)
template/confreg/admin_dashboard_single.html
template/confsponsor/admin_benefit.html
template/confsponsor/admin_dashboard.html
template/confsponsor/admin_sponsor.html
template/confsponsor/sendmail.html
template/confsponsor/sent_mail.html

index ca731434356ca092f06fdca32be5b3ee6535bb3c..fe02e50362bf3db4d7b691aee66def8a26ab4cac 100644 (file)
@@ -50,6 +50,7 @@
   <div class="col-md-3 col-sm-6 col-xs-12 buttonrow"><a class="btn btn-default btn-block" href="/events/sponsor/admin/{{c.urlname}}/sendmail/">Sponsor emails</a></div>
 </div>
 
+
 <h2>Reports</h2>
 <div class="row">
   <div class="col-md-3 col-sm-6 col-xs-12 buttonrow"><a class="btn btn-default btn-block" href="/events/admin/{{c.urlname}}/reports/">Attendee reports</a></div>
   <div class="col-md-3 col-sm-6 col-xs-12 buttonrow"><a class="btn btn-default btn-block" href="/events/admin/{{c.urlname}}/regtypes/">Registration types</a></div>
   <div class="col-md-3 col-sm-6 col-xs-12 buttonrow"><a class="btn btn-default btn-block" href="/events/admin/{{c.urlname}}/addopts/">Additional options</a></div>
 </div>
+<div class="row">
+  <div class="col-md-3 col-sm-6 col-xs-12 buttonrow"><a class="btn btn-default btn-block" href="/events/sponsor/admin/{{c.urlname}}/levels/">Sponsorship levels</a></div>
+  <div class="col-md-3 col-sm-6 col-xs-12 buttonrow"><a class="btn btn-default btn-block" href="/events/sponsor/admin/{{c.urlname}}/contracts/">Sponsorship contracts</a></div>
+</div>
 
 <h2>User links</h2>
 <div class="row">
index d36f7500b143f4792b389b6a5e81529d2219e582..2c08d217e032d08d9ad54b4c602c2c9ce3f80877 100644 (file)
@@ -1,25 +1,6 @@
 {%extends "confreg/confadmin_base.html" %}
 {%load markup%}
 {%block title%}Conference Sponsorship - {{sponsor}}{%endblock%}
-{%block extrahead%}
-<link rel="stylesheet" href="/media/jq/jquery-ui.min.css" />
-<script type="text/javascript" src="/media/jq/jquery-ui.min.js"></script>
-<script type="text/javascript">
-  $(function() {
-    $(".benefit_list").accordion({
-      collapsible: true,
-      active: false,
-      animate: false,
-    });
-    $(".btn").button();
-  });
-</script>
-<style>
-div.benefit_list div {
-   height: auto !important;
-}
-</style>
-{%endblock%}
 {%block layoutblock%}
 <h1>Conference Sponsorship - {{sponsor}}</h1>
 
@@ -41,7 +22,7 @@ please do so!
 </p>
 <form method="post" action=".">{% csrf_token %}
 <input type="hidden" name="confirm" value="1">
-<input type="submit" class="btn" value="Confirm this benefit">
+<input type="submit" class="btn btn-default" value="Confirm this benefit">
 </form>
 <p>
 In case a sponsor has incorrectly claimed a benefit, you can unclaim it here.
@@ -49,7 +30,7 @@ That means it goes back to being claimable. You should normally never do this...
 </p>
 <form method="post" action=".">{% csrf_token %}
 <input type="hidden" name="unclaim" value="1">
-<input type="submit" class="btn" value="Un-claim this benefit">
+<input type="submit" class="btn btn-default" value="Un-claim this benefit">
 </form>
 <form method="post" action=".">
 {%endif%}
@@ -70,11 +51,7 @@ The following data was submitted for this benefit:
 {{benefit.benefit.benefitdescription|markdown}}
 </div>
 
-<p>
-<a href="../../{{sponsor.id}}/"">Return</a> to this sponsor.
-</p>
-<p>
-<a href="../../">Return</a> to sponsor list.<br/>
-</p>
+<a class="btn btn-default btn-block" href="../../{{sponsor.id}}/">Return to this sponsor</a>
+<a class="btn btn-default btn-block" href="../../">Return to sponsor list</a>
 
 {%endblock%}
index 0fcb562b6b106cd443e7ea4eb465b6bd0d19dd3b..4abb6f20360c5efd4c1b2318d2068a8a1b96372c 100644 (file)
@@ -10,11 +10,20 @@ The following benefits have been claimed by sponsors, that have not yet been
 confirmed. You should try to do this ASAP - this may include things like copying
 an image to the website, or making sure there is space for a desk..
 </p>
-<ul>
-{%for b in unconfirmed_benefits%}
- <li>{{b.sponsor}}: <a href="benefit/{{b.id}}/">{{b.benefit}}</a></li>
+{%regroup unconfirmed_benefits by sponsor as unconf%}
+<table class="table table-condensed">
+{%for s in unconf%}
+  <tr>
+    <th colspan="2">{{s.grouper}}</th>
+  </tr>
+{%for b in s.list%}
+  <tr>
+    <td class="col-md-1"></td>
+    <td><a href="benefit/{{b.id}}/">{{b.benefit}}</a></td>
+  </tr>
 {%endfor%}
-</ul>
+{%endfor%}
+</table>
 {%endif%}
 
 {%if confirmed_sponsors%}
@@ -24,14 +33,19 @@ The following sponsors are confirmed:
 </p>
 
 {%regroup confirmed_sponsors by level as regrouped_sponsors%}
+<table class="table table-condensed">
 {%for level in regrouped_sponsors%}
-<h3>{{level.grouper}}</h3>
-<ul>
+  <tr>
+    <th colspan="2" class="text-center active">{{level.grouper}}</th>
+  </tr>
 {%for s in level.list%}
- <li><a href="{{s.id}}/">{{s}}</a>{%if s.invoice%}{%if not s.invoice.paidat%} (not paid){%endif%}{%else%} (not invoiced){%endif%}</li>
+  <tr>
+    <td class="col-md-5"><a href="{{s.id}}/">{{s}}</a></td>
+    <td>{%if s.invoice%}{%if not s.invoice.paidat%}<span class="label label-danger">Not paid</span>{%else%}<span class="label label-success">Paid</span>{%endif%}{%else%}<span class="label label-warning">Not invoiced</span>{%endif%}
+    </td>
 {%endfor%}
-</ul>
 {%endfor%}
+</table>
 {%endif%}
 
 {%if unconfirmed_sponsors%}
@@ -40,23 +54,45 @@ The following sponsors are confirmed:
 The following sponsors have signed up, but are not yet confirmed. If you have handled the
 sponsor manually, you may want to confirm them manually as well...
 </p>
-<ul>
-{%for s in unconfirmed_sponsors%}
- <li><a href="{{s.id}}/">{{s}}</a> ({{s.level}}, signed up {{s.signupat}})</li>
+{%regroup unconfirmed_sponsors by level as regrouped_unconfirmed %}
+<table class="table table-condensed">
+{%for level in regrouped_unconfirmed%}
+  <tr>
+    <th colspan="2" class="text-center active">{{level.grouper}}</th>
+  </tr>
+  <tr>
+    <th class="col-md-5">Sponsor</th>
+    <th>Signed up</th>
+  </tr>
+{%for s in level.list%}
+  <tr>
+    <td><a href="{{s.id}}/">{{s}}</a></td>
+    <td>{{s.signupat}}</td>
+  </tr>
 {%endfor%}
-</ul>
+{%endfor%}
+</table>
 {%endif%}
 
-<h2>Sponsor communications</h2>
+<h2>Sponsor email</h2>
 {%if mails%}
 <p>
 The following emails have been sent to sponsors so far:
 </p>
-<ul>
+<table class="table table-condensed">
+  <tr>
+    <th>Sent at</th>
+    <th>Subject</th>
+    <th>Sent to level(s)</th>
+  </tr>
 {%for m in mails%}
- <li>{{m.sentat|date:"Y-m-d H:i"}} <a href="viewmail/{{m.id}}/">{{m.subject}}</a> ({{m.levels.all|join:", "}})</li>
+  <tr>
+    <td>{{m.sentat|date:"Y-m-d H:i"}}</td>
+    <td><a href="viewmail/{{m.id}}/">{{m.subject}}</a></td>
+    <td>{{m.levels.all|join:", "}}</td>
+  </tr>
 {%endfor%}
-</ul>
+</table>
 {%else%}
 <p>
 No sponsor emails have been sent yet.
@@ -64,7 +100,7 @@ No sponsor emails have been sent yet.
 {%endif%}
 
 <p>
-Send a new <a href="sendmail/">sponsor email</a>.
+  <a href="sendmail/" class="btn btn-default">Send sponsor email</a>
 </p>
 
 <h2>Benefit matrix</h2>
index c5fcbc345131789d7e14fda58d71d3a3a10dd550..aaadde5fb0b406cbb6eb17b89e56a6d8d61a893b 100644 (file)
@@ -15,7 +15,6 @@
       active: false,
       animate: false,
     });
-    $(".btn").button();
   });
 </script>
 <style>
@@ -27,9 +26,9 @@ div.benefit_list div {
 {%block layoutblock%}
 <h1>Conference Sponsorship - {{sponsor}}</h1>
 
-<table border="0" cellspacing="4" cellpadding="0">
+<table class="table table-condensed">
   <tr>
-    <th>Conference:</th>
+    <th class="col-md-2">Conference:</th>
     <td>{{conference}}</td>
   </tr>
   <tr>
@@ -70,11 +69,11 @@ div.benefit_list div {
   </tr>
   <tr>
     <th>Edit:</th>
-    <td>in <a href="/admin/confsponsor/sponsor/{{sponsor.id}}/">admin</a> interface</td>
+    <td><a class="btn btn-default btn-sm" href="/admin/confsponsor/sponsor/{{sponsor.id}}/">Edit in admin interface</a></td>
   </tr>
   <tr>
     <th>View:</th>
-    <td>in <a href="/events/sponsor/{{sponsor.id}}/">user</a> interface, to for example claim benefits on the users behalf</td>
+    <td><a class="btn btn-default btn-sm" href="/events/sponsor/{{sponsor.id}}/">View as end user</a></td>
   </tr>
   <tr>
     <th>Managers:</th>
@@ -103,7 +102,7 @@ div.benefit_list div {
 <form method="post" action=".">{% csrf_token %}
 <input type="hidden" name="confirm" value="1">
 <input type="hidden" name="claimid" value="{{b.id}}">
-<input type="submit" class="btn" value="Confirm this benefit">
+<input type="submit" class="btn btn-default" value="Confirm this benefit">
 </form>
 {%else%}
 <span class="label label-success">Confirmed</span>
@@ -152,7 +151,7 @@ This sponsorship is awaiting an <a href="/invoiceadmin/{{sponsor.invoice.pk}}/">
 for this sponsor, it can be confirmed before the invoice is paid.
 </p>
 <p>
-<a class="btn" href="confirm/" onClick="return confirmConfirm()">Confirm sponsor</a>
+<a class="btn btn-default" href="confirm/" onClick="return confirmConfirm()">Confirm sponsor</a>
 </p>
 {%else%}
 <p>
@@ -161,10 +160,10 @@ has been received, go ahead and generate the invoice. It will automatically
 be emailed to the sponsor, as well as show up on their dashboard. Once
 the invoice is paid, the sponsorship will automatically become confirmed.
 </p>
-<a class="btn" href="generateinvoice/">Generate invoice</a>
+<a class="btn btn-default" href="generateinvoice/">Generate invoice</a>
 {%endif%}
 {%endif%}
 
-<p>
-<a href="../">Return</a> to sponsor list.
-</p>{%endblock%}
+<br/>
+<a class="btn btn-default btn-block" href="../">Return to sponsor list</a>
+{%endblock%}
index 6c56611b7294b22042bd465033d69223d0c63380..0894fbbe8beae7049540febde80d65ed820d9c29 100644 (file)
@@ -24,11 +24,20 @@ up as a sponsor at that level later.
 
 {%if mails%}
 <h2>Previous emails</h2>
-<ul>
+<table class="table table-condensed">
+  <tr>
+    <th>Sent at</th>
+    <th>Subject</th>
+    <th>Sent to level(s)</th>
+  </tr>
 {%for m in mails%}
- <li>{{m.sentat|date:"Y-m-d H:i"}} <a href="../viewmail/{{m.id}}/">{{m.subject}}</a> ({{m.levels.all|join:", "}})</li>
+  <tr>
+    <td>{{m.sentat|date:"Y-m-d H:i"}}</td>
+    <td><a href="../viewmail/{{m.id}}/">{{m.subject}}</a></td>
+    <td>{{m.levels.all|join:", "}}</td>
+  </tr>
 {%endfor%}
-</ul>
+</table>
 {%endif%}
 
 <h2>New email</h2>
@@ -44,10 +53,10 @@ up as a sponsor at that level later.
 {%endfor%}
 </table>
 
-<input type="submit" value="Send email!">
+<br/>
+<input type="submit" value="Send email!" class="btn btn-default">
 </form>
+<br/>
 
-<p>
-  <a href="/events/sponsor/admin/{{conference.urlname}}/">Back</a> to sponsors.
-</p>
+<a href="/events/sponsor/admin/{{conference.urlname}}/" class="btn btn-default btn-block">Back to sponsors</a>
 {%endblock%}
index ce39a114c8dc8c10ed4c5f5116aa04f758434c46..be6681b241339c41cdf5b1fefc845ae6ba3bdca3 100644 (file)
@@ -9,9 +9,9 @@ tr.error {
 {%endblock%}
 {%block layoutblock%}
 <h1>Conference Sponsor Email - {{conference}}</h1>
-<table>
+<table class="table">
  <tr>
-  <th>From:</th>
+  <th class="col-md-1">From:</th>
   <td>{{conference.sponsoraddr}}</td>
  </tr>
  <tr>
@@ -34,8 +34,6 @@ tr.error {
 {{mail.message}}
 </pre>
 
-<p>
-<a href="../../">Return</a> to sponsorship overview.
-</p>
+<a href="/events/sponsor/admin/{{conference.urlname}}/" class="btn btn-default btn-block">Back to sponsors</a>
 
 {%endblock%}