Start using the presenters in the views

This commit is contained in:
Rowan Manning
2013-09-25 12:03:23 +01:00
parent 8d4002860e
commit d3cedfc889
2 changed files with 3 additions and 2 deletions

View File

@@ -8,7 +8,7 @@
</li> </li>
{{#tasks}} {{#tasks}}
<li class="col-md-4 col-sm-6 task-card"> <li class="col-md-4 col-sm-6 task-card">
<a class="well task-card-link crunch-bottom" title="Details for URL {{simplify-url url}}" href="/{{id}}"> <a class="well task-card-link crunch-bottom" title="Details for URL {{simplify-url url}}" href="{{href}}">
<p class="h3">{{simplify-url url}}</p> <p class="h3">{{simplify-url url}}</p>
<p class="h5">({{standard}})</p> <p class="h5">({{standard}})</p>
{{#if last_result}} {{#if last_result}}
@@ -24,7 +24,7 @@
<p class="no-results">No results</p> <p class="no-results">No results</p>
{{/if}} {{/if}}
</a> </a>
<a title="Delete this URL" class="delete-button" href="/{{id}}/delete"><span class="sr-only">Delete </span><span class="glyphicon glyphicon-remove"></span></a> <a title="Delete this URL" class="delete-button" href="{{hrefDelete}}"><span class="sr-only">Delete </span><span class="glyphicon glyphicon-remove"></span></a>
</li> </li>
{{/tasks}} {{/tasks}}
</ul> </ul>

View File

@@ -8,6 +8,7 @@ function presentTask (task) {
// Add additional info // Add additional info
task.href = '/' + task.id; task.href = '/' + task.id;
task.hrefDelete = '/' + task.id + '/delete';
task.hrefJson = '/' + task.id + '.json'; task.hrefJson = '/' + task.id + '.json';
// Present the last result if present // Present the last result if present