Sha256: 6ee0629c1f19dc672bc2996f7aff1e2439a3ba6e66fb8a0450fd34deb5a7f099

Contents?: true

Size: 609 Bytes

Versions: 145

Compression:

Stored size: 609 Bytes

Contents

<%
url = nil
name = nil
if block.media
  url = block.media.file_url
  name = block.media.file_file_name
  name = block.media.image_file_name if name.nil?
elsif block.file
  url = block.file.url
  name = block.file_file_name
end

if editing
  if url.nil? || url.starts_with?('http://placehold.it') || url.include?('missing')  
    %><div id='block_<%= block.id %>'><p>Click to select a file.</p></div><%
  else
    %><div id='block_<%= block.id %>'><p><span><%= name %></span></p></div><%
  end
elsif url
  %><div id='block_<%= block.id %>'><p><a href="<%= raw file.url %>">Download File</a></p></div><%
end
%>

Version data entries

145 entries across 145 versions & 1 rubygems

Version Path
caboose-cms-1.0.2 app/views/caboose/blocks/_file.html.erb
caboose-cms-1.0.1 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.228 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.227 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.226 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.225 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.224 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.223 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.222 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.221 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.220 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.219 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.218 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.217 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.216 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.215 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.214 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.213 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.212 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.211 app/views/caboose/blocks/_file.html.erb