archive/app/views/archives/download_file.html.erb

18 lines
891 B
Plaintext

<html lang="<%= I18n.locale.to_s%>" style="margin: 0em; padding: 0em; width: 100%; height: 100%; overflow: hidden; background-color: rgb(230, 230, 230);">
<head>
<meta name="viewport" content="width=device-width, minimum-scale=0.1">
<title><%=@filename%></title>
<link href="/assets/archive/download_file.css" rel="stylesheet" media="all">
</head>
<body>
<h3 style="display: none;"><%=@filename%></h3>
<% if @ext != "png" && @ext != "jpg" && @ext != "bmp" %>
<object data="<%=@url%>" height="100%" type="application/<%=@ext%>" width="100%">
<iframe height="100%" src="<%=@url%>" title="<%=@filename%>" width="100%"></iframe>
</object>
<embed height="100%" src="<%=@url%>" title="<%=@filename%>" width="100%" type="application/pdf"></embed>
<% else %>
<img alt="<%=@filename%>" src="<%=@url%>">
<% end %>
</body>
</html>