http://www.mediawiki.org/wiki/Special:Code/MediaWiki/91010

Revision: 91010
Author:   rfaulk
Date:     2011-06-28 21:24:07 +0000 (Tue, 28 Jun 2011)
Log Message:
-----------
updated django templates for campaigns application of BAR

Modified Paths:
--------------
    
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/index.html
    
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/show_campaigns.html

Modified: 
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/index.html
===================================================================
--- 
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/index.html
 2011-06-28 21:23:11 UTC (rev 91009)
+++ 
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/index.html
 2011-06-28 21:24:07 UTC (rev 91010)
@@ -3,14 +3,41 @@
 {% block content %}
 
 <h1>Choose a Campaign:</h1><br>
-<u><h3>Report name -- Earliest Access -- Campaign -- Donations -- Report Link 
</h1></u><br>
+
+{% if err_msg != '' %}
+       <br><span style="color:red">{{err_msg}}</span><br><br>
+{% endif %}
+
+<!-- Table listing all campaigns running -->
+
+<table border="1" cellpadding="10">
+<tr>
+<th>Report Name</th>
+<th>Earliest Access</th>
+<th>Campaign</th>
+<th>Donations</th>
+<th>Report Link</th>
+</tr>
+
 {% if campaigns %}
     <ul>
     {% for c in campaigns %}
        {% if c.5 %}
-               <li>{{ c.2 }} -- {{ c.3 }} -- <a href="/campaigns/{{ c.0 }}">{{ 
c.0 }}</a> -- {{ c.4 }} -- <a href="/tests/report/{{ c.0 }}">view 
report</a></li><br>
+               <tr>
+                               <td>{{ c.2 }}</td> <!-- test_name -->
+                               <td>{{ c.3 }}</td> <!-- test_type -->
+                               <td><a href="/campaigns/{{ c.0 }}">{{ c.0 
}}</a></td> <!-- utm_campaign -->
+                               <td>{{ c.4 }}</td> <!-- start_time -->
+                               <td><a href="/tests/report/{{ c.0 }}">view 
report</a></td> <!-- end_time -->
+                       </tr>
         {% else %}
-               <li>{{ c.2 }} -- {{ c.3 }} -- <a href="/campaigns/{{ c.0 }}">{{ 
c.0 }}</a> -- {{ c.4 }}</li><br>
+               <tr>
+                               <td></td> <!-- test_name -->
+                               <td>{{ c.3 }}</td> <!-- test_type -->
+                               <td><a href="/campaigns/{{ c.0 }}">{{ c.0 
}}</a></td> <!-- utm_campaign -->
+                               <td>{{ c.4 }}</td> <!-- start_time -->
+                               <td></td> <!-- end_time -->
+                       </tr>
         {% endif %}
     {% endfor %}
     </ul>
@@ -18,6 +45,23 @@
     <p>No campaigns are available.</p>
 {% endif %}
 
+</table> 
+
+<br>
+<form action="/campaigns/" method="post">
+{% csrf_token %}
+<label for="min_donations"> 
+<pre>Minimum Donations:        </pre>
+</label>
+<input type="text" name="min_donations" value="{{min_donations}}" />
+<label for="min_donations"> 
+<pre>Start UTC Timestamp:      </pre>
+</label>
+<input type="text" name="utc_ts" value="{{earliest_utc}}"/>
+<br><br>
+<input type="submit" value="Filter" />
+</form>
+
 <br><br><br>
 <u>Go to:</u>
 <br><br>

Modified: 
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/show_campaigns.html
===================================================================
--- 
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/show_campaigns.html
        2011-06-28 21:23:11 UTC (rev 91009)
+++ 
trunk/fundraiser-statistics/fundraiser-scripts/web_reporting/templates/campaigns/show_campaigns.html
        2011-06-28 21:24:07 UTC (rev 91010)
@@ -8,27 +8,35 @@
 <br><p>Total views broken out of minutely intervals for the given 
period.</p><br>
 
 
+<!-- Test Form -->
+<form action="/tests/build_test" method="post">
+{% csrf_token %}
+<input type="hidden" name="utm_campaign" value="{{ utm_campaign }}">
+<input type="hidden" name="artifacts" value="{{ artifacts }}">
+<input type="hidden" name="test_type" value="{{ test_type }}">
+<label for="test_name"> 
+
 This is a <u><b>{{ test_type }}</u></b> test with the following artifacts:
 
 {% if artifacts %}
     <ul>
-    {% for name in artifacts %}
-        <li>{{ name }}</li>
-    {% endfor %}
+    {% if artifacts|length > 2 %}
+       <br>Select <u>two</u> of the artifacts using the checkboxes:<br><br>
+               {% for name in artifacts %}
+               <input type="checkbox" name="artifacts_chosen" value="{{ name 
}}" />{{ name }}<br>
+           {% endfor %}
+       {% else %}
+           {% for name in artifacts %}
+               <li>{{ name }}</li>
+           {% endfor %}
+       {% endif %}     
     </ul>
 {% else %}
     <p>No artifacts found for this campaign.</p>
 {% endif %}
 
-
+<br><br>
 <h3>Test this campaign?</h3>
-<!-- Test Form -->
-<form action="/tests/build_test" method="post">
-{% csrf_token %}
-<input type="hidden" name="utm_campaign" value="{{ utm_campaign }}">
-<input type="hidden" name="artifacts" value="{{ artifacts }}">
-<input type="hidden" name="test_type" value="{{ test_type }}">
-<label for="test_name"> 
 <pre>TEST NAME:        </pre>          
 </label>
 {% if test_name != '' %}


_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to