Skip to content

Commit

Permalink
Added template edit button and displayed template background on scree…
Browse files Browse the repository at this point in the history
…n preview (screens#show)
  • Loading branch information
brzaik committed Mar 12, 2012
1 parent 864636f commit 2754882
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 10 deletions.
5 changes: 5 additions & 0 deletions app/assets/stylesheets/application/controls/buttons.scss.erb
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@
&.info {
@include vertical-gradient(#5bc0de, #2f96b4);
}

&.clear {
background: none;
border-color: $gray;
}
}

// Base styles
Expand Down
2 changes: 1 addition & 1 deletion app/views/screens/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@
</div>
</div>

<div class="clearfix">
<div id="template_selection" class="clearfix">
<label><%= t(:best_fit_templates) %></label>
<div class="input">

Expand Down
3 changes: 2 additions & 1 deletion 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;">
<div class="inner" style="width: 800px; height: 450px;">
<%= link_to "Change Screen Template", edit_screen_path(@screen, :anchor => "template_selection"), :class => "btn clear small", :style => "position: absolute; top: 6px; right: 25px;" %>
<div class="inner" style="background: url(<%= preview_template_path(@screen.template, :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 %>">
<%= pos.id %>
Expand Down
12 changes: 8 additions & 4 deletions app/views/submissions/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<section class="C no">
<header id="browse-header">
<%= render :partial => "submissions/index_header" %>
<header>
<div id="browse-header">
<%= render :partial => "submissions/index_header" %>
</div>
</header>
<div id="browse-body" class="C-cont">
<%= render :partial => "submissions/index_body" %>
<div class="C-cont">
<div id="browse-body">
<%= render :partial => "submissions/index_body" %>
</div>
</div>
</section>
12 changes: 8 additions & 4 deletions app/views/submissions/show.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
<section class="C">
<header id="browse-header">
<%= render :partial => "submissions/show_header" %>
<header>
<div id="browse-header">
<%= render :partial => "submissions/show_header" %>
</div>
</header>
<div id="browse-body" class="C-cont">
<%= render :partial => "submissions/show_body" %>
<div class="C-cont">
<div id="browse-body">
<%= render :partial => "submissions/show_body" %>
</div>
</div>
</section>

0 comments on commit 2754882

Please sign in to comment.