Skip to content

Commit

Permalink
Check for model name (this should never be blank, but…)
Browse files Browse the repository at this point in the history
  • Loading branch information
snipe committed Jul 22, 2016
1 parent 03d7d01 commit 0b57f74
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion resources/views/hardware/checkout.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,12 @@ function show_er(selector) {
for (var i in data) {
var asset = data[i];
table_html += "<tr><td class=\"col-md-8\"><a href=\"{{ config('app.url') }}/hardware/" + asset.id + "/view\">" + asset.name + " (" + asset.model.name + ")</a></td><td class=\"col-md-4\">" + asset.asset_tag + "</td></tr>";
table_html += "<tr><td class=\"col-md-8\"><a href=\"{{ config('app.url') }}/hardware/" + asset.id + "/view\">" + asset.name;
if (asset.model.name!='') {
table_html += " (" + asset.model.name + ")";
}
table_html += "</a></td><td class=\"col-md-4\">" + asset.asset_tag + "</td></tr>";
}
$('#current_assets_content').html(table_html + '</tbody></table></div></div>');
Expand Down

0 comments on commit 0b57f74

Please sign in to comment.