Skip to content

Commit

Permalink
Rough pass at screen view lock down. Subscriptions are intentionally …
Browse files Browse the repository at this point in the history
…ignored.
  • Loading branch information
bamnet committed May 31, 2012
1 parent e4d20f3 commit 86149b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/views/screens/_show_body.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<article>
<div class="screen-model" style="width: 800px; height: 505px;">
<%= link_to "Change Screen Template", edit_screen_path(@screen, :anchor => "template_selection"), :class => "btn clear small", :style => "position: absolute; top: 6px; right: 25px;" %>
<%= link_to "Change Screen Template", edit_screen_path(@screen, :anchor => "template_selection"),
:class => "btn clear small", :style => "position: absolute; top: 6px; right: 25px;" if can? :update, @screen %>
<div class="inner" style="background: url(<%= preview_template_path(@screen.template, :width => 800, :height => 450, :format => :png) %>) center center no-repeat; width: 800px; height: 450px;">
<% @screen.template.positions.each do |pos| %>
<div class="pos" style="top: <%= pos.top * 100 %>%; left: <%= pos.left * 100 %>%; width: <%= (pos.right - pos.left) * 100 %>%; height: <%= (pos.bottom - pos.top) * 100 %>%; <%= pos.style %>">
Expand All @@ -18,7 +19,7 @@
<aside>

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

<p><b>Location:</b> <%= @screen.location %></p>
Expand Down
2 changes: 1 addition & 1 deletion app/views/screens/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="C no">
<header id="screens-header">
<h1>All Screens <%= link_to 'New Screen', new_screen_path, :class => "btn" %></h1>
<h1>All Screens <%= link_to 'New Screen', new_screen_path, :class => "btn" if can? :create, Screen %></h1>
</header>
<div id="screens-body" class="C-cont">
<%= render :partial => "screens/index_body" %>
Expand Down

0 comments on commit 86149b8

Please sign in to comment.