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.65 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.64 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.63 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.62 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.61 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.60 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.59 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.58 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.57 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.56 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.55 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.54 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.53 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.52 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.51 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.50 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.49 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.48 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.47 app/views/caboose/blocks/_file.html.erb
caboose-cms-0.8.46 app/views/caboose/blocks/_file.html.erb