add a link check
This commit is contained in:
parent
65c461a9b4
commit
07e361d4ae
|
|
@ -113,7 +113,13 @@
|
|||
<% end %>
|
||||
</td>
|
||||
<td>
|
||||
<a href="<%= page_for_archive_file(archive) %>" target="_blank"><%= archive.title %></a>
|
||||
<% # 增加檢查,如果 archive.title 或 page_for_archive_file 失敗,則使用 safe_link %>
|
||||
<% safe_link = (page_for_archive_file(archive) rescue nil) %>
|
||||
<% if safe_link.present? %>
|
||||
<a href="<%= safe_link %>" target="_blank"><%= archive.title %></a>
|
||||
<% else %>
|
||||
<%= archive.title %>
|
||||
<% end %>
|
||||
<div class="quick-edit">
|
||||
<ul class="nav nav-pills">
|
||||
<% if is_editable %>
|
||||
|
|
|
|||
Loading…
Reference in New Issue