<li>
  <%= link_to attachment.data.original_filename, attachment.data.url %>
  <% case %>
  <% when attachment.data.content_type[0, 5] == "image" %>
      <div><%= image_tag attachment.data.url %></div>
  <% else %>
      <% case File.extname attachment.data.original_filename %>
      <% when ".yrp" %>
          <span><%= link_to "播放", 'mycard://' + request.env['HTTP_HOST'] + URI.escape(URI.escape(attachment.data.url nil, timestamp: false )) %></span>
      <% when ".ydk" %>
          <span><%= link_to "编辑", 'mycard://' + request.env['HTTP_HOST'] + URI.escape(URI.escape(attachment.data.url nil, timestamp: false )) %></span>
      <% when ".deck" %>
          <span><%= link_to "编辑", 'mycard://' + request.env['HTTP_HOST'] + URI.escape(URI.escape(attachment.data.url nil, timestamp: false )) %></span>
      <% end %>
  <% end %>
</li>