Skip to content

Commit

Permalink
some formatting adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
Maria Mafalda Fernando committed May 9, 2019
1 parent 150ec9f commit 735c1c3
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 44 deletions.
10 changes: 8 additions & 2 deletions portal/static/portal/sass/partials/_tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ td {
}

.cell-left {
text-align: left;
text-align: start;
}

.table-footer {
Expand Down Expand Up @@ -193,7 +193,6 @@ td {
.games-table {
table-layout: fixed;
text-align: start;
width: 600px;
word-break: break-all;
}

Expand All @@ -210,6 +209,13 @@ td {
}



.games-table__buttons {
display: flex;
justify-content: center;
}


.table--move {

td {
Expand Down
86 changes: 44 additions & 42 deletions portal/templates/portal/partials/aimmo_games_table.html
Original file line number Diff line number Diff line change
@@ -1,45 +1,47 @@
{% if open_play_games %}
<table class="games-table header-primary data-primary">
<tr class="games-table__header">
<th class="cell-left">
<p>Game name</p>
</th>
<th class="cell-left">
<p>Status</p>
</th>
<th class="cell-left">
<p>Action</p>
</th>
</tr>
{% for game in open_play_games %}
<tr>
<td>
<div class="games-table__cell">
<p><small>{{ game.name }}</small></p>
</div>
</td>
<td>
<div class="games-table__cell">
{% if game.status == 'r' %}
<div class="status-indicator status-indicator--game status-indicator--on"></div>
<small>Running</small>
{% elif game.status == 's' %}
<div class="status-indicator status-indicator--game status-indicator--off"></div>
<small>Stopped</small>
{% elif game.status == 'p' %}
<div class="status-indicator status-indicator--game status-indicator--standby"></div>
<small>Paused</small>
{% endif %}
</div>
</td>
<td>
<div class="games-table__cell">
<a class="button button--medium button--primary--navigation" href="{% url base_url id=game.id %}">Play</a>
</div>
</td>
</tr>
{% endfor %}
</table>
<div class="col-sm-8 col-center">
<table class="games-table header-primary data-primary">
<tr class="games-table__header">
<th class="cell-left">
<p>Game name</p>
</th>
<th class="cell-left">
<p>Status</p>
</th>
<th class="cell-left">
<p>Action</p>
</th>
</tr>
{% for game in open_play_games %}
<tr>
<td>
<div class="games-table__cell">
<p><small>{{ game.name }}</small></p>
</div>
</td>
<td>
<div class="games-table__cell">
{% if game.status == 'r' %}
<div class="status-indicator status-indicator--game status-indicator--on"></div>
<small>Running</small>
{% elif game.status == 's' %}
<div class="status-indicator status-indicator--game status-indicator--off"></div>
<small>Stopped</small>
{% elif game.status == 'p' %}
<div class="status-indicator status-indicator--game status-indicator--standby"></div>
<small>Paused</small>
{% endif %}
</div>
</td>
<td>
<div class="games-table__buttons">
<a class="button button--medium button--primary--navigation" href="{% url base_url id=game.id %}">Play</a>
</div>
</td>
</tr>
{% endfor %}
</table>
</div>
{% else %}
<p>It doesn&rsquo;t look like you have any games created. To create a game, use the &lsquo;Create a new game&rsquo; button above.</p>
{% endif %}
{% endif %}

0 comments on commit 735c1c3

Please sign in to comment.