Edit for Accessibility.
This commit is contained in:
parent
8fafa6ec13
commit
fc0710da10
|
@ -506,9 +506,13 @@ class AnnouncementsController < ApplicationController
|
||||||
@ext = @path.split("/").last.to_s.split(".").last
|
@ext = @path.split("/").last.to_s.split(".").last
|
||||||
if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf"
|
if @ext == "png" || @ext == "jpg" || @ext == "bmp" || @ext == "pdf"
|
||||||
render "archives/download_file.html",:layout=>false
|
render "archives/download_file.html",:layout=>false
|
||||||
|
else
|
||||||
|
if (current_site.accessibility_mode rescue false)
|
||||||
|
render "redirect_to_file",:layout=>false
|
||||||
else
|
else
|
||||||
send_file(@path)
|
send_file(@path)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
else
|
else
|
||||||
render :file => "#{Rails.root}/app/views/errors/403.html", :layout => false, :status => :not_found, :content_type => 'text/html'
|
render :file => "#{Rails.root}/app/views/errors/403.html", :layout => false, :status => :not_found, :content_type => 'text/html'
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue