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.45 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.44 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.43 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.42 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.41 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.40 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.39 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.38 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.37 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.36 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.35 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.34 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.33 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.32 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.31 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.30 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.29 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.28 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.27 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.26 app/views/caboose/blocks/_file.html.erb