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.7.70 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.69 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.68 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.67 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.66 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.65 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.64 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.63 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.62 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.61 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.60 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.59 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.58 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.57 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.55 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.54 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.53 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.52 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.51 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.7.50 app/views/caboose/blocks/_file.html.erb