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-0.9.169 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.168 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.167 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.166 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.165 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.164 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.163 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.162 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.161 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.160 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.159 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.158 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.157 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.156 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.155 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.154 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.153 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.152 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.151 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.9.150 app/views/caboose/blocks/_file.html.erb