Sha256: 2d9d8918326a9d2f53f50fb77cd6e0231c4a4724d00c917019d8f95a63fc0168

Contents?: true

Size: 1.45 KB

Versions: 6

Compression:

Stored size: 1.45 KB

Contents

<%= content_for :data_controls do %>
	<%= link_to "Upload File", new_admin_medium_path, :class => "btn btn-primary", :title => "Upload File" %>
<% end %>

<%= content_for :detail do %>
	<div class="table-responsive">
		<table class="table table-striped table-hover">
			<tbody>
				<% @media.each do |media| %>
					<tr>
						<td>
							<% if media.is_protected && media.is_image? %>
								<img src="<%= media.image_from_type %>" class="size-50-thumb" />
							<% else %>
								<%= image_tag(media.image_from_type, :class => "size-50-thumb") %>
							<% end %>
							<%= link_to media.attachment_file_name, media.attachment_url %>
						</td>
						<td class="table-actions">
							<% if media.is_image? %>
								<%= link_to 'Crop', edit_admin_medium_path(media.id), :class => 'btn btn-sm btn-default' %>
							<% end %>
							<% if media.is_protected %>
								<%= link_to raw('<i class="icon-lock"></i> Protected'), set_access_admin_medium_path(media.id, :protected => false), :method => :put, :class => 'btn btn-sm btn-default' %>
							<% else %>
								<%= link_to 'Public', set_access_admin_medium_path(media.id, :protected => true), :method => :put, :class => 'btn btn-sm btn-default' %>
							<% end %>
							<%= link_to "Remove", admin_medium_path(media), :method => :delete, :class => 'btn btn-sm btn-danger', :data => {:confirm => "Are you sure you want to remove this file?"} %>
						</td>
					</tr>
				<% end %>
			</tbody>
		</table>
	</div>	
<% end %>

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
tb_media-1.3.0 app/views/admin/media/index.html.erb
tb_media-1.3.beta1 app/views/admin/media/index.html.erb
tb_media-1.2.2 app/views/admin/media/index.html.erb
tb_media-1.2.1 app/views/admin/media/index.html.erb
tb_media-1.2.0 app/views/admin/media/index.html.erb
tb_media-1.2.0.beta1 app/views/admin/media/index.html.erb