Sha256: 3d9e7cbb3cb804657c752812e6cbb8fbc311e17e1df6c8f66ab66e209897134a

Contents?: true

Size: 1.97 KB

Versions: 7

Compression:

Stored size: 1.97 KB

Contents

<% status_hash = {published: "success", unpublished: "default", disabled: "danger"} %>

<div class="media <%= status_hash[@feature.status.to_sym] %>">

  <div class="pull-left pt-10 pr-10 pb-10" style="width:30%;">
  	<% if display_edit_links? %>
  		<%= edit_image(@feature, 
          "feature_image.image.large.url",
          upload_image_link(@feature, :feature_image, nil ),
          remove_image_link(@feature, :feature_image, nil ),
          image_options: {assoc_name: :feature_image }) %>
    <% else %>
    	<%= display_image(@user, "feature_image.image.large.url", class: "img-inline", alt: @feature.display_name) %>
    <% end %>
  </div>

  <div class="pull-left ml-10" style="width:65%;">
  	<h1><%= @feature.name %></h1>
    <span class="ml-5 mt-5 label label-<%= status_hash[@feature.status.to_sym] %>"><%= @feature.status.titleize %></span>
    <%= clear_tag %>
  </div>

</div>

<h4 class="mb-20">Technical Details</h4>

<div class="table-responsive mb-50"> 
	<table class="table table-striped table-condensed table-bordered"> 
		<tbody>

			<tr>
				<th>Created At</th><td><%= @feature.created_at.strftime("%m/%d/%Y - %H:%M:%S") if @feature.created_at %></td>
				<th>Updated At</th><td><%= @feature.updated_at.strftime("%m/%d/%Y - %H:%M:%S") if @feature.updated_at %></td>
			</tr>
			
		</tbody>
	</table>
</div>

<% if display_manage_links? %>
<div>
	<% 
		edit_link = edit_feature_url(id: @feature.id)
		delete_link = feature_url(id: @feature.id) 
	%>
	
	<%= link_to raw("<i class=\"fa fa-close mr-5\"></i> <span>Cancel</span>"), "#", onclick: "closeGenericModal();", class: "btn btn-white pull-left" %>

	<%= link_to raw("<i class=\"fa fa-trash mr-5\"></i> <span>Delete</span>"), delete_link, method: :delete, :remote=>true, class: "btn btn-gray pull-right" if display_delete_links? %>

	<%= link_to raw("<i class=\"fa fa-edit mr-5\"></i> Edit"), edit_link, method: :get, :remote=>true, class: "btn btn-gray pull-right mr-10" if display_edit_links? %>
</div>
<% end %>

<%= clear_tag %>

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
usman-0.3.16 app/views/usman/features/_show.html.erb
usman-0.3.15 app/views/usman/features/_show.html.erb
usman-0.3.14 app/views/usman/features/_show.html.erb
usman-0.3.13 app/views/usman/features/_show.html.erb
usman-0.3.12 app/views/usman/features/_show.html.erb
usman-0.3.11 app/views/usman/features/_show.html.erb
usman-0.3.10 app/views/usman/features/_show.html.erb