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

22 lines
913 B
Plaintext

<% if @ext == 'pdf' %>
<%= render partial: 'viewer' %>
<% else %>
<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>
<img alt="<%=@filename%>" src="<%=@url%>">
</object>
<% else %>
<img alt="<%=@filename%>" src="<%=@url%>">
<% end %>
</body>
</html>
<% end %>