Fix some translations. Improve style for menu, fix layout in digitals page. Working version.

This commit is contained in:
dlage committed 2013-05-26 12:57:21 +01:00
1 parent 868fddd7bc
commit efb07409e9
10 files changed
+18 -12

No files matched your search

+1
View File
@@ -0,0 +1 @@
1.9.3@digital2
@@ -2,11 +2,11 @@ Deface::Override.new(:virtual_path => "spree/shared/_order_details",
:name => "add_digital_downloads_to_invoice", :name => "add_digital_downloads_to_invoice",
:insert_bottom => "td[data-hook='order_item_description']", :insert_bottom => "td[data-hook='order_item_description']",
:text => %q{ :text => %q{
<% if order.state == 'complete' and item.variant.digital? %> <% if order.payment_state == 'paid' and item.variant.digital? %>
<%= content_tag(:p, :class => 'download_links') do %> <%= content_tag(:p, :class => 'download_links') do %>
<% item.digital_links.each do |digital_link| %> <% item.digital_links.each do |digital_link| %>
<% format = File.extname(digital_link.digital.attachment.path).downcase %> <% format = File.extname(digital_link.digital.attachment.path).downcase %>
<%= link_to t(:digital_download, :type => t("digital_format#{format}")), digital_url(:host => Spree::Config.get(:site_url), :secret => digital_link.secret), :class => "btn #{format}" %> <%= link_to Spree.t(:digital_download, :type => Spree.t("digital_format#{format}")), digital_url(:host => Spree::Config.get(:site_url), :secret => digital_link.secret), :class => "btn #{format}" %>
<% end %> <% end %>
<% end %> <% end %>
<% end %> <% end %>
@@ -2,7 +2,7 @@ Deface::Override.new(:virtual_path => "spree/admin/shared/_product_tabs",
:name => "add_digital_versions_to_admin_product_tabs", :name => "add_digital_versions_to_admin_product_tabs",
:insert_bottom => "[data-hook='admin_product_tabs'], #admin_product_tabs[data-hook]", :insert_bottom => "[data-hook='admin_product_tabs'], #admin_product_tabs[data-hook]",
:text => " <li<%== ' class=\"active\"' if current == \"Digital Versions\" %>> :text => " <li<%== ' class=\"active\"' if current == \"Digital Versions\" %>>
<%= link_to t(\"digital_versions\"), admin_product_digitals_path(@product) %> <%= link_to_with_icon 'icon-tasks', Spree.t(:digital_versions), admin_product_digitals_path(@product) %>
</li> </li>
", ",
:disabled => false) :disabled => false)
@@ -2,6 +2,6 @@ Deface::Override.new(:virtual_path => "spree/admin/shared/_order_tabs",
:name => "add_reset_digitals_to_admin_orders", :name => "add_reset_digitals_to_admin_orders",
:insert_after => ".sidebar", :insert_after => ".sidebar",
:text => %q{ :text => %q{
<%= content_tag(:p, button_link_to(t(:reset_downloads), reset_digitals_admin_order_url(@order)), class: 'clear') if @order.digital? or true %> <%= content_tag(:p, button_link_to(Spree.t(:reset_downloads), reset_digitals_admin_order_url(@order)), class: 'clear') if @order.digital? or true %>
}, },
:disabled => false) :disabled => false)
@@ -1,4 +1,3 @@
<div>
<div> <div>
<%= form_for(:digital, :url => admin_product_digitals_path(@product), :method => :create, :multipart => true ) do |f| %> <%= form_for(:digital, :url => admin_product_digitals_path(@product), :method => :create, :multipart => true ) do |f| %>
<fieldset> <fieldset>
@@ -11,7 +10,7 @@
<% variant.digitals.each do |digital| %> <% variant.digitals.each do |digital| %>
<li> <li>
<%= render digital %>&nbsp;&nbsp; <%= render digital %>&nbsp;&nbsp;
<%= link_to Spree.t("delete_file"), admin_product_digital_url(@product, digital), :confirm => Spree.t('delete_file_cofirmation', :filename => digital.attachment_file_name), :method => :delete %> <%= link_to Spree.t(:delete_file), admin_product_digital_url(@product, digital), :confirm => Spree.t(:delete_file_cofirmation, :filename => digital.attachment_file_name), :method => :delete %>
</li> </li>
<% end %> <% end %>
</ul> </ul>
@@ -8,10 +8,10 @@
<% end %> <% end %>
<% else %> <% else %>
This product has no variants. <%= Spree.t :product_without_variants %>
<% if @product.master.digital? %> <% if @product.master.digital? %>
A digital version of this product currently exists: <%= Spree.t :digital_exists %>
<%= render @product.master.digitals %> <%= render @product.master.digitals %>
<% end %> <% end %>
+4
View File
@@ -1,4 +1,5 @@
en: en:
spree:
broken_file: Warning! this file is broken broken_file: Warning! this file is broken
current_file: Current File current_file: Current File
delete_file: Delete this file delete_file: Delete this file
@@ -11,6 +12,7 @@ en:
mobi: Kindle eBook mobi: Kindle eBook
epub: ePub eBook epub: ePub eBook
pdf: pdf eBook pdf: pdf eBook
gz: Archive
digital_versions: Digital Versions digital_versions: Digital Versions
downloads_reset: Digital Downloads Reset downloads_reset: Digital Downloads Reset
new_file: New File new_file: New File
@@ -22,3 +24,5 @@ en:
unauthorized: Unauthorized unauthorized: Unauthorized
spree_digital: spree_digital:
upload: Upload upload: Upload
product_without_variants: This product has no variants.
digital_exists: 'A digital version of this product currently exists:'
+1
View File
@@ -1,4 +1,5 @@
it: it:
spree:
broken_file: Attenzione! questo file sembra essere rotto broken_file: Attenzione! questo file sembra essere rotto
current_file: File Corrente current_file: File Corrente
delete_file: Elimina questo file delete_file: Elimina questo file
+1
View File
@@ -1,4 +1,5 @@
ja: ja:
spree:
broken_file: 注意! このファイルが壊れている! broken_file: 注意! このファイルが壊れている!
current_file: 現在のバージョン current_file: 現在のバージョン
delete_file: このファイルを削除 delete_file: このファイルを削除
+4 -4
View File
@@ -64,10 +64,10 @@ describe Spree::Order do
it "should only offer digital shipping if all items are digital" do it "should only offer digital shipping if all items are digital" do
order.digital?.should be_true order.digital?.should be_true
order.create_proposed_shipments shipments = order.create_proposed_shipments
order.shipping_rates.count.should == 1 shipments.count.should == 1
order.shipping_rates.first.shipping_method.calculator.class.should == Spree::Calculator::DigitalDelivery shipments.first.shipping_method.calculator.class.should == Spree::Calculator::DigitalDelivery
order.shipping_rates.first.cost.should == 0.0 shipments.first.cost.should == 0.0
end end
it "should not offer digital shipping if only some items are digital" do it "should not offer digital shipping if only some items are digital" do