FIX: Remove an unnecessary Handlebars condition

This commit is contained in:
Rishabh Nambiar 2018-09-12 14:53:29 +05:30
parent 122dd32d67
commit 1ea20132a0
1 changed files with 51 additions and 53 deletions

View File

@ -137,60 +137,58 @@
{{/unless}} {{/unless}}
{{#if showRecentQueries}} {{#if showRecentQueries}}
{{#if sortedQueries.length}} <div class="container">
<div class="container"> <table class="recent-queries">
<table class="recent-queries"> <thead class="heading-container">
<thead class="heading-container"> <th class="col heading name">
<th class="col heading name"> <div class="heading-toggle" {{action "sortByProperty" "name"}}>
<div class="heading-toggle" {{action "sortByProperty" "name"}}> {{directory-toggle field="name" labelKey="explorer.query_name" order=order asc=asc}}
{{directory-toggle field="name" labelKey="explorer.query_name" order=order asc=asc}} </div>
</div> </th>
</th> <th class="col heading created-by">
<th class="col heading created-by"> <div class="heading-toggle" {{action "sortByProperty" "username"}}>
<div class="heading-toggle" {{action "sortByProperty" "username"}}> {{directory-toggle field="username" labelKey="explorer.query_user" order=order asc=asc}}
{{directory-toggle field="username" labelKey="explorer.query_user" order=order asc=asc}} </div>
</div> </th>
</th> <th class="col heading created-at">
<th class="col heading created-at"> <div class="heading-toggle" {{action "sortByProperty" "last_run_at"}}>
<div class="heading-toggle" {{action "sortByProperty" "last_run_at"}}> {{directory-toggle field="last_run_at" labelKey="explorer.query_time" order=order asc=asc}}
{{directory-toggle field="last_run_at" labelKey="explorer.query_time" order=order asc=asc}} </div>
</div> </th>
</th> </thead>
</thead> <tr></tr>
<tr></tr> <tbody>
<tbody> {{#each sortedQueries as |query|}}
{{#each sortedQueries as |query|}} <tr class="query-row">
<tr class="query-row"> <td>
<td> <a {{action "scrollTop"}} href="/admin/plugins/explorer/?id={{query.id}}">
<a {{action "scrollTop"}} href="/admin/plugins/explorer/?id={{query.id}}"> <b class="query-name">{{query.name}}</b>
<b class="query-name">{{query.name}}</b> <medium class="query-desc">{{query.description}}</medium>
<medium class="query-desc">{{query.description}}</medium> </a>
</td>
<td class="query-created-by">
{{#if query.username}}
<a href="/users/{{query.username}}/activity">
<medium>{{query.username}}</medium>
</a> </a>
</td> {{/if}}
<td class="query-created-by"> </td>
{{#if query.username}} <td class="query-created-at">
<a href="/users/{{query.username}}/activity"> {{#if query.last_run_at}}
<medium>{{query.username}}</medium> <medium>
</a> {{bound-date query.last_run_at}}
{{/if}} </medium>
</td> {{else}}
<td class="query-created-at"> <medium>
{{#if query.last_run_at}} {{bound-date query.created_at}}
<medium> </medium>
{{bound-date query.last_run_at}} {{/if}}
</medium> </td>
{{else}} </tr>
<medium> {{/each}}
{{bound-date query.created_at}} </tbody>
</medium> </table>
{{/if}} </div>
</td>
</tr>
{{/each}}
</tbody>
</table>
</div>
{{/if}}
{{/if}} {{/if}}
<div class="explorer-pad-bottom"></div> <div class="explorer-pad-bottom"></div>