Skip to content

Commit

Permalink
rough pass at contents#show
Browse files Browse the repository at this point in the history
  • Loading branch information
zr2d2 committed Jun 3, 2012
1 parent 369621e commit 3bfc611
Show file tree
Hide file tree
Showing 3 changed files with 90 additions and 70 deletions.
74 changes: 74 additions & 0 deletions app/views/contents/_show_body.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
<article>
<div class="content-holder">
<%= render_content(@content) %>
</div>
</article>
<aside>
<p>
<b>Name:</b>
<%= @content.name %>
</p>

<p>
<b>Duration:</b>
<%= @content.duration %>
</p>

<p>
<b>Start time:</b>
<%= @content.start_time %>
</p>

<p>
<b>End time:</b>
<%= @content.end_time %>
</p>

<p>
<b>User:</b>
<%= @content.user.name unless @content.user.nil? %>
</p>

<p>
<b>Kind:</b>
<%= @content.kind.name unless @content.kind.nil? %>
</p>

<p>
<b>Type:</b>
<%= @content.type unless @content.type.nil? %>
</p>

<p>
<b>Approved Feeds:</b>
<ul>
<% @content.approved_feeds.each do |feed| %>
<li><%= link_to feed.name, feed %></li>
<% end %>
</ul>
</p>

<p>
<b>Pending Feeds:</b>
<ul>
<% @content.pending_feeds.each do |feed| %>
<li><%= link_to feed.name, feed %></li>
<% end %>
</ul>
</p>

<p>
<b>Denied Feeds:</b>
<ul>
<% @content.denied_feeds.each do |feed| %>
<li><%= link_to feed.name, feed %></li>
<% end %>
</ul>
</p>


<%= link_to "Media", @content.media.original.first unless @content.media.empty? || @content.media.original.empty? %>
<%= link_to 'Edit', edit_content_path(@content) %> |
<%= link_to 'Back', feeds_path %>
</aside>
<div class="clear"></div>
4 changes: 4 additions & 0 deletions app/views/contents/_show_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1 id="contentlist">
<%= link_to "All Content", feeds_path, :remote => true %> &gt;
<%= @content.name %>
</h1>
82 changes: 12 additions & 70 deletions app/views/contents/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,70 +1,12 @@
<p>
<b>Name:</b>
<%= @content.name %>
</p>

<p>
<b>Duration:</b>
<%= @content.duration %>
</p>

<p>
<b>Start time:</b>
<%= @content.start_time %>
</p>

<p>
<b>End time:</b>
<%= @content.end_time %>
</p>

<p>
<b>User:</b>
<%= @content.user.name unless @content.user.nil? %>
</p>

<p>
<b>Kind:</b>
<%= @content.kind.name unless @content.kind.nil? %>
</p>

<p>
<b>Type:</b>
<%= @content.type unless @content.type.nil? %>
</p>

<div class="rendered">
<%= render_content(@content) %>
</div>

<p>
<b>Approved Feeds:</b>
<ul>
<% @content.approved_feeds.each do |feed| %>
<li><%= link_to feed.name, feed %></li>
<% end %>
</ul>
</p>

<p>
<b>Pending Feeds:</b>
<ul>
<% @content.pending_feeds.each do |feed| %>
<li><%= link_to feed.name, feed %></li>
<% end %>
</ul>
</p>

<p>
<b>Denied Feeds:</b>
<ul>
<% @content.denied_feeds.each do |feed| %>
<li><%= link_to feed.name, feed %></li>
<% end %>
</ul>
</p>


<%= link_to "Media", @content.media.original.first unless @content.media.empty? || @content.media.original.empty? %>
<%= link_to 'Edit', edit_content_path(@content) %> |
<%= link_to 'Back', feeds_path %>
<section class="C">
<header>
<div id="browse-header">
<%= render :partial => "contents/show_header" %>
</div>
</header>
<div class="C-cont">
<div id="browse-body">
<%= render :partial => "contents/show_body" %>
</div>
</div>
</section>

0 comments on commit 3bfc611

Please sign in to comment.