admin-history.html 1.31 KB
Newer Older
1 2 3 4 5 6 7
    <table class="table table-condensed">
      <thead>
	<tr>
	  <th>Date</th>
	  <th>Action</th>
	  <th>Wanted</th>
	  <th>Granted</th>
8
	  <th>AutoApproved</th>
9 10 11 12 13 14 15 16 17 18 19 20 21
	</tr>
      </thead>
      <tbody>
	<%  _.each(extensions, function(extension, idx) { %>
	  <tr>
	    <td rowspan="2" class="history-tstamp"><%- extension.tstamp %></td>
	    <td>
	      <% if (extension.action == "request" && extension.admin == "1") { %>
		admin<% } else { %><%- extension.action %><% } %>
	    </td>
	    <% if (extension.action == "request") { %>
	      <td><%- extension.wanted %></td>
	      <td><%- extension.granted %></td>
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
	      <td>
		<% if (extension.autoapproved == "1") { %>
		  Yes
		<% } else if (extension.autoapproved_reason) { %>
		  <span style="text-decoration: underline;"
			data-toggle='popover'
			data-delay='{"hide":100, "show":250}'
			data-content='<%- extension.autoapproved_reason %>'
			data-html='true'>Denied</span>
		<% } %>
		<% if (extension.autoapproved_metrics) { %>
		  (<a href='#'
		      data-idx="<%- extension.idx %>"
		      class="autoapprove-metrics">metrics</a>)
		<% } %>
	      </td>
38 39 40 41 42 43
	    <% } else { %>
	      <td>n/a</td>
	      <td>n/a</td>
	    <% } %>
	  </tr>
	  <tr>
44
	    <td colspan="4"><pre class="history-reason"><%- extension.reason %></pre>
45 46 47 48 49
	    </td>
	  </tr>
	<% }); %>
      </tbody>
    </table>