Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

- Further stylizing the video edit admin page

  • Loading branch information...
commit 59decfc58e65ba0b69293bbd2ba712383248890f 1 parent 8c92461
@nshbrown nshbrown authored
View
24 app/views/admin/videos/_form.html.erb
@@ -3,11 +3,11 @@
<%= form_for([:admin, @video], :html => { :multipart => true }) do |f| %>
<%= render "shared/error_messages", :target => @video %>
- <div class="field field_text">
+ <div class="field field_text title">
<%= f.label :title %>
<%= f.text_field :title %>
</div>
- <div class="field field_textarea">
+ <div class="field field_textarea description">
<%= f.label :description, 'Description (Textile)' %>
<%= f.text_area :description %>
</div>
@@ -19,23 +19,23 @@
</div>
<div class="field field_checkbox">
- <%= f.check_box :downloadable %>
- <%= f.label :downloadable, 'Sell via Download' %>
+ <%= f.check_box :streamable %>
+ <%= f.label :streamable, 'Sell via Streaming' %>
</div>
- <div class="field field_text" id="field_price_download" <%= raw f.object.downloadable? ? '' : 'style="display:none"'%>>
- <%= f.label :price_download, 'Price for Download' %>
- <%= f.text_field :price_download %>
+ <div class="field field_text price" id="field_price_streaming" <%= raw f.object.streamable? ? '' : 'style="display:none"'%>>
+ <%= f.label :price_streaming, 'Price for Streaming' %>
+ <%= f.text_field :price_streaming %>
</div>
<div class="field field_checkbox">
- <%= f.check_box :streamable %>
- <%= f.label :streamable, 'Sell via Streaming' %>
+ <%= f.check_box :downloadable %>
+ <%= f.label :downloadable, 'Sell via Download' %>
</div>
- <div class="field field_text" id="field_price_streaming" <%= raw f.object.streamable? ? '' : 'style="display:none"'%>>
- <%= f.label :price_streaming, 'Price for Streaming' %>
- <%= f.text_field :price_streaming %>
+ <div class="field field_text price" id="field_price_download" <%= raw f.object.downloadable? ? '' : 'style="display:none"'%>>
+ <%= f.label :price_download, 'Price for Download' %>
+ <%= f.text_field :price_download %>
</div>
<div class="actions buttons clearfix">
View
4 app/views/admin/videos/edit.html.erb
@@ -43,9 +43,9 @@
</button>
</div>
<% else %>
- <%= @video.s3_url %>
+ <%= link_to download_admin_video_url(@video), download_admin_video_path(@video) %>
<div class="buttons clearfix">
- <%= link_to image_tag('themes/vidli/icons/cancel.png') + ' Clear Upload', delete_s3_asset_admin_video_path(@video), :class => 'negative' %>
+ <%= link_to image_tag('themes/vidli/icons/cancel.png') + ' Remove Upload', delete_s3_asset_admin_video_path(@video), :class => 'negative' %>
</div>
<% end %>
</div>
View
4 app/views/videos/show.html.erb
@@ -3,10 +3,10 @@
<div class="video_details">
<%= image_tag @video.screenshot.url(:medium), :class => 'video_screenshot' if @video.screenshot.exists? %>
<div class="video_add_to_cart_buttons buttons">
- <% if !@download_sold && @video.downloadable? %><%= link_to image_tag('themes/vidli/icons/cart.png') + " Add Download to Cart #{number_to_currency @video.price_download}", add_download_cart_path(@video) %><br /><% end -%>
<% if !@streaming_sold && @video.streamable? %><%= link_to image_tag('themes/vidli/icons/cart.png') + " Add Streaming to Cart #{number_to_currency @video.price_streaming}", add_streaming_cart_path(@video) %><br /><% end -%>
- <% if @download_sold %><%= link_to image_tag('themes/vidli/icons/download.png') + ' Download Video', download_order_item_path(@download_sold_order_uuid, @download_sold_order_item_id) %><% end -%>
+ <% if !@download_sold && @video.downloadable? %><%= link_to image_tag('themes/vidli/icons/cart.png') + " Add Download to Cart #{number_to_currency @video.price_download}", add_download_cart_path(@video) %><br /><% end -%>
<% if @streaming_sold %><%= link_to image_tag('themes/vidli/icons/streaming.png') + ' Watch Your Video', watch_order_item_path(@streaming_sold_order_uuid, @streaming_sold_order_item_id) %><% end -%>
+ <% if @download_sold %><%= link_to image_tag('themes/vidli/icons/download.png') + ' Download Video', download_order_item_path(@download_sold_order_uuid, @download_sold_order_item_id) %><% end -%>
</div>
</div>
<div class="video_description"><%= redcloth @video.description %></div>
View
13 public/stylesheets/themes/vidli_admin.css
@@ -406,6 +406,19 @@ button.positive, .buttons a.positive{
margin: 20px 0 20px;
}
+.video_details .title input {
+ width: 700px;
+}
+
+.video_details .description textarea {
+ width: 700px;
+ height: 300px;
+}
+
+.video_details .price input {
+ width: 120px;
+}
+
.video_upload {
margin: 20px 0 20px;
}
Please sign in to comment.
Something went wrong with that request. Please try again.