Sha256: a15847e7815a4325be01f487acae54232acebe3904222be2a3117bed39506bf5

Contents?: true

Size: 718 Bytes

Versions: 198

Compression:

Stored size: 718 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>Please upload a file.</p></div><%
  else
    %><div id='block_<%= block.id %>'><p><a href="/admin/<%= block.page_id ? "pages/#{block.page_id}" : "posts/#{block.post_id}" %>/blocks/<%= block.id %>/edit"><%= name %></a></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

198 entries across 198 versions & 1 rubygems

Version Path
caboose-cms-0.8.25 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.24 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.23 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.22 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.21 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.20 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.19 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.18 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.17 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.16 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.15 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.14 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.13 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.12 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.11 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.10 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.9 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.8 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.7 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.6 app/views/caboose/blocks/_file.html.erb