Skip to content

Commit

Permalink
Move 'Last available' column to left.
Browse files Browse the repository at this point in the history
When it was on the right, it made it seem like the table should be read
right-to-left, i.e. the column on the right is the newest. When in
reality the column on the left is the newest and most important.
  • Loading branch information
MingweiSamuel committed Sep 16, 2021
1 parent dc6890b commit 9a6c9f0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
16 changes: 8 additions & 8 deletions template.html
Original file line number Diff line number Diff line change
Expand Up @@ -33,28 +33,28 @@ <h1 class="text-center">{{ current_target }}</h1>
<table class="table table-hover table-bordered table-responsive-lg table-sm">
<thead>
<tr>
{{#each title as |t|}}
<th scope="col" class="text-center"></th>
{{#each title as |t|}}
<th scope="col" class="text-center">{{t}}</th>
{{/each}}
<th scope="col" class="text-center">Last available</th>
{{/each}}
</tr>
</thead>
<tbody>
{{#each packages_availability as |row|}}
<tr>
<th scope="row">{{row.package_name}}</th>
{{#if row.last_available}}
<td class="text-center">{{row.last_available}}</td>
{{else}}
<td class="text-center">N/A</td>
{{/if}}
{{#each row.availability_list as |status|}}
{{#if status}}
<td class="table-primary text-center">present</td>
{{else}}
<td class="table-warning text-center">missing</td>
{{/if}}
{{/each}}
{{#if row.last_available}}
<td class="text-center">{{row.last_available}}</td>
{{else}}
<td class="text-center">N/A</td>
{{/if}}
</tr>
{{/each}}
</tbody>
Expand Down
1 change: 1 addition & 0 deletions web/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ fn generate_html(
.with_context(|| format!("Can't create file [{}]", output_path))?;

let table = Table::builder(&data, target)
.first_cell(&"Last available")
.dates(dates)
.additional(&additional)
.build();
Expand Down

0 comments on commit 9a6c9f0

Please sign in to comment.