socialforge/app/views/bids/_app_link.html.erb

24 lines
1.1 KiB
Plaintext

<table style="width: 200px;table-layout: fixed" >
<tr>
<% count = 0 %>
<% for attachment in attachments %>
<% if attachments.count == 1 %>
<td title="<%= attachment.filename%>" style="width: 200px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<%= render :partial => 'attachment', :locals => {:attachment => attachment} %>
</td>
<% elsif attachments.count == 2 %>
<td title="<%= attachment.filename%>" style="width: 100px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<%= render :partial => 'attachment', :locals => {:attachment => attachment} %>
</td>
<% else %>
<td title="<%= attachment.filename%>" style="width: 66px;white-space: nowrap;overflow: hidden;text-overflow: ellipsis;">
<% if count == 3 %>
<% break %>
<% end %>
<%= render :partial => 'attachment', :locals => {:attachment => attachment} %>
<% count = count +1 %>
</td>
<% end %>
<% end %>
</tr>
</table>