uploader
This commit is contained in:
@@ -44,7 +44,7 @@ class BeispieleController < ApplicationController
|
|||||||
params.delete(:lva_id)
|
params.delete(:lva_id)
|
||||||
@beispiel = Beispiel.new(params[:beispiel])
|
@beispiel = Beispiel.new(params[:beispiel])
|
||||||
@beispiel.lva=@lva
|
@beispiel.lva=@lva
|
||||||
logger.info "New Beispiel: #{params.inspect}"
|
logger.info "New Beispiel: #{params.inspect}"
|
||||||
|
|
||||||
# @backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva)
|
# @backlink = @beispiel.lva.nil? ? root_url : lva_path(@beispiel.lva)
|
||||||
@beispiel.name=@beispiel.beispieldatei.filename
|
@beispiel.name=@beispiel.beispieldatei.filename
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ include Rails.application.routes.url_helpers
|
|||||||
unless translation.try(:updated_at).nil?
|
unless translation.try(:updated_at).nil?
|
||||||
translation.updated_at < 2.month.ago
|
translation.updated_at < 2.month.ago
|
||||||
else
|
else
|
||||||
true
|
false
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
def is_wiki?
|
def is_wiki?
|
||||||
|
|||||||
@@ -19,15 +19,39 @@ end
|
|||||||
def store_dir
|
def store_dir
|
||||||
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
|
||||||
end
|
end
|
||||||
|
def cover
|
||||||
|
manipulate! do |frame, index|
|
||||||
|
index== 0 ? frame.convert(:jpg) : nil
|
||||||
|
|
||||||
version :thumb do
|
end
|
||||||
process :resize_to_fill => [64, 64]
|
end
|
||||||
end
|
version :thumb do
|
||||||
version :thumb_small do
|
process :cover
|
||||||
process :resize_to_fill => [32, 32]
|
process :resize_to_fill => [64, 64]
|
||||||
end
|
|
||||||
|
def full_filename(for_file)
|
||||||
|
super.chomp(File.extname(super)) + '.jpg'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
version :cover do
|
||||||
|
process :cover
|
||||||
|
process :resize_to_fit => [64,64]
|
||||||
|
process :convert => :jpg
|
||||||
|
def full_filename(for_file)
|
||||||
|
super.chomp(File.extname(super)) + '.jpg'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
version :thumb_small do
|
||||||
|
process :resize_to_fill => [32, 32]
|
||||||
|
end
|
||||||
version :thumb_big do
|
version :thumb_big do
|
||||||
process :resize_to_fill => [200,200]
|
process :cover
|
||||||
|
process :resize_to_fill => [200, 200]
|
||||||
|
process :convert => :jpg
|
||||||
|
def full_filename(for_file)
|
||||||
|
super.chomp(File.extname(super)) + '.jpg'
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
version :resized do
|
version :resized do
|
||||||
process :resize_to_fit => [1024,1024]
|
process :resize_to_fit => [1024,1024]
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link rel="shortcut icon" href="./public/favicon.ico">
|
<link rel="shortcut icon" href="http://glonass.htu.tuwien.ac.at/favicon.ico">
|
||||||
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
|
<!--<link rel="shortcut icon" href="http://www.fet.at/favicon.ico">-->
|
||||||
<title>Fetsite</title>
|
<title>Fetsite</title>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user