Skip to content

Commit

Permalink
Set up screen views
Browse files Browse the repository at this point in the history
  • Loading branch information
brzaik committed Feb 19, 2012
1 parent 79fa035 commit 9aa5fb0
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 52 deletions.
10 changes: 7 additions & 3 deletions app/assets/stylesheets/application/controls/buttons.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@
.btn, .button, form .submit_bar input {
// Button Base
display: inline-block;
padding: 4px 10px 4px;
padding: 2px 10px;
@include no-box-shadow;
@include border-radius(4px);
font-size: $basefont - 1;
font-size: $basefont - 2;
cursor: pointer;
font-weight: bold;
color: $white;
Expand Down Expand Up @@ -126,7 +126,7 @@
}
&.small {
padding: 0px 5px;
font-size: $basefont - 2px;
font-size: $basefont - 3px;
//font-size: $baseFontSize - 2px;
//line-height: $baseLineHeight - 2px;
}
Expand Down Expand Up @@ -204,6 +204,10 @@

}

form .submit_bar input {
padding: 4px 10px;
}

// Help Firefox not be a jerk about adding extra padding to buttons
button.btn,
input[type="submit"].btn {
Expand Down
35 changes: 35 additions & 0 deletions app/views/screens/_screen_body.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<article>
<h1>See screen preview and modify subscriptions</h1>
</article>

<aside>

<div>
<%= link_to 'Edit Screen Details', edit_screen_path(@screen), :class => "btn" %>
<br /><br />

<p><b>Location:</b> <%= @screen.location %></p>

<p><b>Owned by:</b> <%= @screen.owner ? @screen.owner.name : 'No Group' %></p>

<p>
<b>Current Subscriptions:</b>

<ul>
<% @screen.fields.each do |field| %>
<li><%= field.name %></li>
<% if !field.subscriptions.empty? %>
<ul>
<% field.subscriptions.each do |subscription| %>
<li><%= link_to subscription.feed.name, subscription.feed %><%= " - #{subscription.weight}" unless subscription.weight.blank?%></li>
<% end %>
</ul>
<% end %>
<% end %>
</ul>
</p>
</div>

</aside>

<div class="clear"></div>
4 changes: 4 additions & 0 deletions app/views/screens/_screen_header.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<h1>
<%= link_to "All Screens", screens_path %> &gt;
<%= @screen.name %>
</h1>
4 changes: 2 additions & 2 deletions app/views/screens/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="C no">
<header>
<%= back_button screens_path %>
<%= back_button :back %>
<h1>Edit Screen</h1>
</header>
<div class="C-cont">
Expand All @@ -9,4 +9,4 @@
</article>
<div class="clear"></div>
</div>
</section>
</section>
53 changes: 8 additions & 45 deletions app/views/screens/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,45 +1,8 @@
<p>
<b>Name:</b>
<%= @screen.name %>
</p>

<p>
<b>Location:</b>
<%= @screen.location %>
</p>

<p>
<b>Is public:</b>
<%= @screen.is_public %>
</p>

<p>
<b>Owner:</b>
<%= @screen.owner.name %>
</p>

<p>
<b>Template:</b>
<%= link_to @screen.template.name, @screen.template %>
</p>
<p>
<b>resolution</b>
<%= @screen.width %> X <%= @screen.height %> (<%= @screen.aspect_ratio["width"] %>:<%= @screen.aspect_ratio["height"] %>)
</p>
<p>
<b>Current Subscriptions:</a>
<ul>
<% @screen.fields.each do |field| %>
<li><%= field.name %></li>
<% if !field.subscriptions.empty? %>
<ul>
<% field.subscriptions.each do |subscription| %>
<li><%= link_to subscription.feed.name, subscription.feed %><%= " - #{subscription.weight}" unless subscription.weight.blank?%></li>
<% end %>
</ul>
<% end %>
<% end %>
</ul>
</p>
<%= link_to 'Edit', edit_screen_path(@screen) %> |
<%= link_to 'Back', screens_path %>
<section class="C">
<header id="screens-header">
<%= render :partial => "screens/screen_header" %>
</header>
<div id="screens-body" class="C-cont">
<%= render :partial => "screens/screen_body" %>
</div>
</section>
4 changes: 2 additions & 2 deletions app/views/submissions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<section class="C">
<header id="browse-header">
<h1 id="contentlist"><%= @submission.content.name %></h1>
<%= render :partial => "submissions/content_header" %>
</header>
<div id="browse-body" class="C-cont">
<%= render :partial => "submissions/content_body" %>
</div>
</section>
</section>

0 comments on commit 9aa5fb0

Please sign in to comment.