Commit 995ce5fdc759059a0f80479af9e4c3850099e937
1 parent
d43d7471
Exists in
master
and in
4 other branches
Fix 500 error on page with submodules
Showing
1 changed file
with
7 additions
and
8 deletions
Show diff stats
app/views/projects/tree/_submodule_item.html.haml
| 1 | -- url = submodule_item.url(@ref) rescue '' | ||
| 2 | -- name = submodule_item.basename | ||
| 3 | -- return '' unless url | ||
| 4 | -%tr{ class: "tree-item", url: url } | 1 | +%tr{ class: "tree-item" } |
| 5 | %td.tree-item-file-name | 2 | %td.tree-item-file-name |
| 6 | = image_tag "submodule.png" | 3 | = image_tag "submodule.png" |
| 7 | - %span= truncate(name, length: 40) | 4 | + %span |
| 5 | + = link_to truncate(submodule_item.name, length: 40), '#' | ||
| 6 | + @ | ||
| 7 | + %span.monospace #{submodule_item.id[0..10]} | ||
| 8 | + %td | ||
| 9 | + %td | ||
| 8 | %td | 10 | %td |
| 9 | - %code= submodule_item.id[0..10] | ||
| 10 | - %td{ colspan: 2 } | ||
| 11 | - = link_to truncate(url, length: 40), url |