Commit 4146e885 authored by Marin Jankovski's avatar Marin Jankovski

Fix styling issues.

parent cb69baed
...@@ -12,19 +12,21 @@ class Projects::WikisController < Projects::ApplicationController ...@@ -12,19 +12,21 @@ class Projects::WikisController < Projects::ApplicationController
def show def show
@page = @project_wiki.find_page(params[:id], params[:version_id]) @page = @project_wiki.find_page(params[:id], params[:version_id])
gollum_wiki = @project_wiki.wiki
file = gollum_wiki.file(params[:id], gollum_wiki.ref, true)
if @page if @page
render 'show' render 'show'
elsif file = @project_wiki.wiki.file(params[:id], @project_wiki.wiki.ref, true) elsif file
if file.on_disk? if file.on_disk?
send_file file.on_disk_path, :disposition => 'inline' send_file file.on_disk_path, disposition: 'inline'
else else
send_data( send_data(
file.raw_data, file.raw_data,
type: file.mime_type, type: file.mime_type,
disposition: 'inline', disposition: 'inline',
filename: file.name filename: file.name
) )
end end
else else
return render('empty') unless can?(current_user, :write_wiki, @project) return render('empty') unless can?(current_user, :write_wiki, @project)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment