Skip to content

Commit

Permalink
Reformat HTML
Browse files Browse the repository at this point in the history
  • Loading branch information
anishathalye committed Sep 14, 2016
1 parent 4163f8b commit a5e549e
Show file tree
Hide file tree
Showing 14 changed files with 421 additions and 418 deletions.
3 changes: 3 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,8 @@ indent_size = 2
[*.{css,scss}]
indent_size = 2

[*.html]
indent_size = 2

[Vagrantfile]
indent_size = 2
6 changes: 3 additions & 3 deletions gavel/templates/_item.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="info">
<h2>{{ item.name | safe }}</h2>
<p>{{ item.description | safe }}</p>
<p><strong>Location: </strong>{{ item.location | safe }}</p>
<h2>{{ item.name | safe }}</h2>
<p>{{ item.description | safe }}</p>
<p><strong>Location: </strong>{{ item.location | safe }}</p>
</div>
332 changes: 166 additions & 166 deletions gavel/templates/admin.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,189 +2,189 @@
{% block title %}Admin{% endblock %}
{% block content %}
<div class="item">
<div class="banner" id="admin-header">
<h1>Admin</h1>
</div>
<div class="banner" id="admin-header">
<h1>Admin</h1>
</div>
</div>

<div class="item">
<div class="banner">
<h2>Stats</h2>
</div>
<div class="info">
<p><strong>Votes: </strong>{{ votes }}</p>
</div>
<div class="banner">
<h2>Stats</h2>
</div>
<div class="info">
<p><strong>Votes: </strong>{{ votes }}</p>
</div>
</div>

<div class="item">
<div class="banner">
<h2>Items</h2>
</div>
<div class="info">
<table class="header-row">
<tr>
<td>Id</td>
<td>Name</td>
<td>Location</td>
<td>Description</td>
<td>Mu</td>
<td>Sigma Squared</td>
<td>Votes</td>
<td>Seen</td>
<td>Prioritize</td>
<td>Active</td>
<td>Delete</td>
</tr>
{% for item in items %}
<tr class="{{ 'disabled' if not item.active else 'prioritized' if item.prioritized else '' }}">
<td><a href="/admin/item/{{ item.id }}/">{{ item.id }}</a></td>
<td>{{ item.name | safe }}</td>
<td>{{ item.location | safe }}</td>
<td>{{ item.description | safe }}</td>
<td>{{ item.mu | round(4) }}</td>
<td>{{ item.sigma_sq | round(4) }}</td>
<td>{{ item_counts.get(item.id, 0) }}</td>
<td>{{ item.viewed | length }}</td>
<td class="compact">
<form action="/admin/item" method="post">
<input type="submit" name="action" value="{{ 'Prioritize' if not item.prioritized else 'Cancel' }}" class="{{ 'positive' if not item.prioritized else 'negative' }}">
<input type="hidden" name="item_id" value="{{ item.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/item" method="post">
<input type="submit" name="action" value="{{ 'Disable' if item.active else 'Enable' }}" class="{{ 'negative' if item.active else 'positive' }}">
<input type="hidden" name="item_id" value="{{ item.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/item" method="post">
<input type="submit" name="action" value="Delete" class="negative">
<input type="hidden" name="item_id" value="{{ item.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
<div class="banner">
<h2>Items</h2>
</div>
<div class="info">
<table class="header-row">
<tr>
<td>Id</td>
<td>Name</td>
<td>Location</td>
<td>Description</td>
<td>Mu</td>
<td>Sigma Squared</td>
<td>Votes</td>
<td>Seen</td>
<td>Prioritize</td>
<td>Active</td>
<td>Delete</td>
</tr>
{% for item in items %}
<tr class="{{ 'disabled' if not item.active else 'prioritized' if item.prioritized else '' }}">
<td><a href="/admin/item/{{ item.id }}/">{{ item.id }}</a></td>
<td>{{ item.name | safe }}</td>
<td>{{ item.location | safe }}</td>
<td>{{ item.description | safe }}</td>
<td>{{ item.mu | round(4) }}</td>
<td>{{ item.sigma_sq | round(4) }}</td>
<td>{{ item_counts.get(item.id, 0) }}</td>
<td>{{ item.viewed | length }}</td>
<td class="compact">
<form action="/admin/item" method="post">
<input type="submit" name="action" value="{{ 'Prioritize' if not item.prioritized else 'Cancel' }}" class="{{ 'positive' if not item.prioritized else 'negative' }}">
<input type="hidden" name="item_id" value="{{ item.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/item" method="post">
<input type="submit" name="action" value="{{ 'Disable' if item.active else 'Enable' }}" class="{{ 'negative' if item.active else 'positive' }}">
<input type="hidden" name="item_id" value="{{ item.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/item" method="post">
<input type="submit" name="action" value="Delete" class="negative">
<input type="hidden" name="item_id" value="{{ item.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>

<div class="item">
<div class="banner">
<h2>Annotators</h2>
</div>
<div class="info">
<table class="header-row">
<tr>
<td>Id</td>
<td>Name</td>
<td>Email</td>
<td>Description</td>
<td>Secret</td>
<td>Votes</td>
<td>Next (Id)</td>
<td>Previous (Id)</td>
<td>Updated</td>
<td>Alpha</td>
<td>Beta</td>
<td>Email</td>
<td>Active</td>
<td>Delete</td>
</tr>
{% for annotator in annotators %}
<tr class="{{ 'disabled' if not annotator.active else '' }}">
<td><a href="/admin/annotator/{{ annotator.id }}/">{{ annotator.id }}</a></td>
<td>{{ annotator.name | safe }}</td>
<td>{{ annotator.email | safe }}</td>
<td>{{ annotator.description | safe }}</td>
<td>{{ annotator.secret }}</td>
<td>{{ counts.get(annotator.id, 0) }}</td>
<td>{{ annotator.next_id }}</td>
<td>{{ annotator.prev_id }}</td>
<td>{{ annotator.updated | utcdatetime_local }}</td>
<td>{{ annotator.alpha | round(4) }}</td>
<td>{{ annotator.beta | round(4) }}</td>
<td class="compact">
<form action="/admin/annotator" method="post">
<input type="submit" name="action" value="Email" class="neutral">
<input type="hidden" name="annotator_id" value="{{ annotator.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/annotator" method="post">
<input type="submit" name="action" value="{{ 'Disable' if annotator.active else 'Enable' }}" class="{{ 'negative' if annotator.active else 'positive' }}">
<input type="hidden" name="annotator_id" value="{{ annotator.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/annotator" method="post">
<input type="submit" name="action" value="Delete" class="negative">
<input type="hidden" name="annotator_id" value="{{ annotator.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
<div class="banner">
<h2>Annotators</h2>
</div>
<div class="info">
<table class="header-row">
<tr>
<td>Id</td>
<td>Name</td>
<td>Email</td>
<td>Description</td>
<td>Secret</td>
<td>Votes</td>
<td>Next (Id)</td>
<td>Previous (Id)</td>
<td>Updated</td>
<td>Alpha</td>
<td>Beta</td>
<td>Email</td>
<td>Active</td>
<td>Delete</td>
</tr>
{% for annotator in annotators %}
<tr class="{{ 'disabled' if not annotator.active else '' }}">
<td><a href="/admin/annotator/{{ annotator.id }}/">{{ annotator.id }}</a></td>
<td>{{ annotator.name | safe }}</td>
<td>{{ annotator.email | safe }}</td>
<td>{{ annotator.description | safe }}</td>
<td>{{ annotator.secret }}</td>
<td>{{ counts.get(annotator.id, 0) }}</td>
<td>{{ annotator.next_id }}</td>
<td>{{ annotator.prev_id }}</td>
<td>{{ annotator.updated | utcdatetime_local }}</td>
<td>{{ annotator.alpha | round(4) }}</td>
<td>{{ annotator.beta | round(4) }}</td>
<td class="compact">
<form action="/admin/annotator" method="post">
<input type="submit" name="action" value="Email" class="neutral">
<input type="hidden" name="annotator_id" value="{{ annotator.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/annotator" method="post">
<input type="submit" name="action" value="{{ 'Disable' if annotator.active else 'Enable' }}" class="{{ 'negative' if annotator.active else 'positive' }}">
<input type="hidden" name="annotator_id" value="{{ annotator.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
<td class="compact">
<form action="/admin/annotator" method="post">
<input type="submit" name="action" value="Delete" class="negative">
<input type="hidden" name="annotator_id" value="{{ annotator.id }}">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
</tr>
{% endfor %}
</table>
</div>
</div>

<div class="item">
<div class="banner">
<h2>Add Items</h2>
</div>
<div class="info">
<p>name, location, description (CSV format)</p>
<textarea name="data" form="item_form"></textarea>
<form action="/admin/item" method="post" id="item_form">
<input type="submit" name="action" value="Submit" class="button-full positive">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</div>
<div class="banner">
<h2>Add Items</h2>
</div>
<div class="info">
<p>name, location, description (CSV format)</p>
<textarea name="data" form="item_form"></textarea>
<form action="/admin/item" method="post" id="item_form">
<input type="submit" name="action" value="Submit" class="button-full positive">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</div>
</div>

<div class="item">
<div class="banner">
<h2>Add Annotators</h2>
</div>
<div class="info">
<p>name, email, description (CSV format)</p>
<textarea name="data" form="annotator_form"></textarea>
<form action="/admin/annotator" method="post" id="annotator_form">
<input type="submit" name="action" value="Submit" class="button-full positive">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</div>
<div class="banner">
<h2>Add Annotators</h2>
</div>
<div class="info">
<p>name, email, description (CSV format)</p>
<textarea name="data" form="annotator_form"></textarea>
<form action="/admin/annotator" method="post" id="annotator_form">
<input type="submit" name="action" value="Submit" class="button-full positive">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</div>
</div>

<div class="item">
<div class="banner">
<h2>Global Settings</h2>
</div>
<div class="info">
<table class="header-row">
<tr>
<td>Setting</td>
<td>Value</td>
<td>Edit</td>
</tr>
<tr class="{{ 'disabled' if setting_closed else '' }}">
<td>Closed</td>
<td>{{ 'Closed' if setting_closed else 'Open' }}</td>
<td class="compact">
<form action="/admin/setting" method="post">
<input type="submit" name="action" value="{{ 'Open' if setting_closed else 'Close' }}" class="{{ 'positive' if setting_closed else 'negative' }}">
<input type="hidden" name="key" value="closed">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
</tr>
</table>
</div>
<div class="banner">
<h2>Global Settings</h2>
</div>
<div class="info">
<table class="header-row">
<tr>
<td>Setting</td>
<td>Value</td>
<td>Edit</td>
</tr>
<tr class="{{ 'disabled' if setting_closed else '' }}">
<td>Closed</td>
<td>{{ 'Closed' if setting_closed else 'Open' }}</td>
<td class="compact">
<form action="/admin/setting" method="post">
<input type="submit" name="action" value="{{ 'Open' if setting_closed else 'Close' }}" class="{{ 'positive' if setting_closed else 'negative' }}">
<input type="hidden" name="key" value="closed">
<input type="hidden" name="_csrf_token" value="{{ csrf_token() }}">
</form>
</td>
</tr>
</table>
</div>
</div>
{% endblock %}
Loading

0 comments on commit a5e549e

Please sign in to comment.