Hide paper title when no title.

This commit is contained in:
邱博亞 2024-09-11 08:21:27 +08:00
parent 5b5ea57582
commit cfa596a3e7
1 changed files with 17 additions and 13 deletions

View File

@ -177,14 +177,16 @@
<img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" /> <img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" />
<% end %> <% end %>
<div class="ep-info"> <div class="ep-info">
<div class="ep-info-title"> <% if paper.title.present? %>
<span class="field-head"> <div class="ep-info-title">
<%= t('e_paper.title') %> <span class="field-head">
</span> <%= t('e_paper.title') %>
<h3 class="epaper-show-title"> </span>
<a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a> <h3 class="epaper-show-title">
</h3> <a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a>
</div> </h3>
</div>
<% end %>
<div class="ep-info-description"> <div class="ep-info-description">
<span class="field-head"> <span class="field-head">
<%= t('e_paper.description') %> <%= t('e_paper.description') %>
@ -220,11 +222,13 @@
<img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" /> <img src="<%= img_src %>" alt="<%= paper.title %>" title="<%= paper.title %>" />
<% end %> <% end %>
<div class="ep-info"> <div class="ep-info">
<div class="ep-info-title"> <% if paper.title.present? %>
<h3 class="epaper-show-title"> <div class="ep-info-title">
<a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a> <h3 class="epaper-show-title">
</h3> <a class="ep-content-title" href="<%= page + "/" + paper.to_param + "?method=topics" %>" target="_blank"><span><%= paper.title %></span></a>
</div> </h3>
</div>
<% end %>
<div class="ep-info-description"> <div class="ep-info-description">
<%= paper.content.html_safe %> <%= paper.content.html_safe %>
</div> </div>