the error message was not displayed correctly during a wrong import + remove the last tracks of the deprecated asset collections
This commit is contained in:
parent
1e465e231e
commit
00fd00240f
@ -15,7 +15,8 @@
|
|||||||
= label_tag 'zipfile', t('formtastic.labels.import.new.source')
|
= label_tag 'zipfile', t('formtastic.labels.import.new.source')
|
||||||
= file_field_tag 'zipfile'
|
= file_field_tag 'zipfile'
|
||||||
- if @error
|
- if @error
|
||||||
%p.inline-errors= @error
|
.inline-errors
|
||||||
|
%p= @error
|
||||||
%p.inline-hints= t('formtastic.hints.import.source')
|
%p.inline-hints= t('formtastic.hints.import.source')
|
||||||
|
|
||||||
%li.input.toggle
|
%li.input.toggle
|
||||||
|
@ -122,9 +122,7 @@ module Locomotive
|
|||||||
template.gsub!(/\/samples\/(.*\.[a-zA-Z0-9]{3})/) do |match|
|
template.gsub!(/\/samples\/(.*\.[a-zA-Z0-9]{3})/) do |match|
|
||||||
name = $1
|
name = $1
|
||||||
|
|
||||||
collection = AssetCollection.find_or_create_internal(site)
|
if asset = site.assets.where(:source_filename => name).first
|
||||||
|
|
||||||
if asset = collection.assets.detect { |a| a.source_filename == name }
|
|
||||||
asset.source.url
|
asset.source.url
|
||||||
else
|
else
|
||||||
match
|
match
|
||||||
|
Loading…
Reference in New Issue
Block a user