Support Spree 1.3.x, add default unauthorized page, and organize locales.
This commit is contained in:
committed by
Michael Bianco
parent
52e7009c17
commit
7dabf1a520
2
Gemfile
2
Gemfile
@@ -9,4 +9,4 @@ group :test do
|
||||
end
|
||||
end
|
||||
|
||||
gem 'spree', '~> 1.2.3'
|
||||
gem 'spree', '~> 1.3.2'
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
"0.7.x" => { :ref => "eddaea63959586d123007cbca3be5bf9c5edb1a7" }
|
||||
"1.0.x" => { :ref => "a8c27750ef1cf9d0ad1a2a6ebe33307da900a5c1" }
|
||||
"1.1.x" => { :branch => "1-1-stable" }
|
||||
"1.2.x" => { :branch => "master" }
|
||||
"1.2.x" => { :ref => "9360c635039aaeeee18026b830aa96cc7587cd0d" }
|
||||
"1.3.x" => { :branch => "master" }
|
||||
|
||||
9
app/views/spree/digitals/unauthorized.html.erb
Normal file
9
app/views/spree/digitals/unauthorized.html.erb
Normal file
@@ -0,0 +1,9 @@
|
||||
<% if defined?(SpreeFancy) %>
|
||||
<% content_for :subheader do %>
|
||||
<h1><%= t('.unauthorized') %></h1>
|
||||
<% end %>
|
||||
<% else %>
|
||||
<h1><%= t('.unauthorized') %></h1>
|
||||
<% end %>
|
||||
|
||||
<%= t('.explained') %>
|
||||
@@ -1,11 +1,7 @@
|
||||
en:
|
||||
digital_versions: Digital Versions
|
||||
reset_downloads: Reset Digital Downloads
|
||||
downloads_reset: Digital Downloads Reset
|
||||
current_file: Current File
|
||||
new_file: New File
|
||||
delete_file: Delete this file
|
||||
broken_file: Warning! this file is broken
|
||||
current_file: Current File
|
||||
delete_file: Delete this file
|
||||
delete_file_cofirmation: Are you sure you want to delete the file %{filename}?
|
||||
digital_delivery: Digital Delivery
|
||||
digital_download: Download %{type} ↓
|
||||
@@ -15,5 +11,14 @@ en:
|
||||
mobi: Kindle eBook
|
||||
epub: ePub eBook
|
||||
pdf: pdf eBook
|
||||
digital_versions: Digital Versions
|
||||
downloads_reset: Digital Downloads Reset
|
||||
new_file: New File
|
||||
reset_downloads: Reset Digital Downloads
|
||||
spree:
|
||||
digitals:
|
||||
unauthorized:
|
||||
explained: This download link has expired.
|
||||
unauthorized: Unauthorized
|
||||
spree_digital:
|
||||
upload: Upload
|
||||
@@ -1,9 +1,7 @@
|
||||
it:
|
||||
digital_versions: Versioni Digitali
|
||||
current_file: File Corrente
|
||||
new_file: Nuovo File
|
||||
delete_file: Elimina questo file
|
||||
broken_file: Attenzione! questo file sembra essere rotto
|
||||
current_file: File Corrente
|
||||
delete_file: Elimina questo file
|
||||
delete_file_cofirmation: Sei sicuro di voler eliminare il file %{filename}?
|
||||
digital_delivery: Consegna Digitale
|
||||
digital_download: Download %{type} ↓
|
||||
@@ -13,6 +11,12 @@ it:
|
||||
mobi: Kindle eBook
|
||||
epub: ePub eBook
|
||||
pdf: pdf eBook
|
||||
digital_versions: Versioni Digitali
|
||||
new_file: Nuovo File
|
||||
spree:
|
||||
digitals:
|
||||
unauthorized:
|
||||
explained: This download link has expired.
|
||||
unauthorized: Unauthorized
|
||||
spree_digital:
|
||||
upload: Upload
|
||||
|
||||
|
||||
@@ -1,12 +1,14 @@
|
||||
ja:
|
||||
digital_versions: デジタル版
|
||||
|
||||
current_file: 現在のバージョン
|
||||
new_file: 新しいファイル
|
||||
upload: アップロード
|
||||
delete_file: このファイルを削除
|
||||
broken_file: 注意! このファイルが壊れている!
|
||||
current_file: 現在のバージョン
|
||||
delete_file: このファイルを削除
|
||||
delete_file_cofirmation: 本当に「%{filename}」を削除しても宜しいですか?
|
||||
|
||||
digital_shipping: ダウンロードリンクを<strong>%{email}</strong>に送ります
|
||||
|
||||
digital_versions: デジタル版
|
||||
new_file: 新しいファイル
|
||||
spree:
|
||||
digitals:
|
||||
unauthorized:
|
||||
explained: This download link has expired.
|
||||
unauthorized: Unauthorized
|
||||
upload: アップロード
|
||||
|
||||
@@ -17,7 +17,7 @@ The idea is simple. You attach a file to a Product (or a Variant of this Product
|
||||
* The file `views/order_mailer/confirm_email.text.erb` is the only thing that should need customization. If you are looking for HTML emails, [this branch of spree-html-email](http://github.com/iloveitaly/spree-html-email) supports spree_digital
|
||||
* A purchased product can be downloaded even if you disable the product immediately. You would have to remove the attached file in your admin section to prevent people from downloading purchased products.
|
||||
* File are uploaded to `rails_root/private`. Make sure it's symlinked in case you're using Capistrano. If you want to change the upload path, [check out this gist](https://gist.github.com/3187793#file_spree_digital_path_change_decorator.rb)
|
||||
* You must add a `views/spree/digitals/unauthorized.html.erb` file to present an error message to the user if they exceed the download / days limit
|
||||
* You must add a `views/spree/digitals/unauthorized.html.erb` file to customize an error message to the user if they exceed the download / days limit
|
||||
* We use send_file to send the files on download. See below for instructions on how to push file downloading off to nginx.
|
||||
|
||||
## Installation
|
||||
|
||||
@@ -12,7 +12,8 @@ Gem::Specification.new do |s|
|
||||
s.require_path = 'lib'
|
||||
s.requirements << 'none'
|
||||
s.required_ruby_version = '>= 1.8.7'
|
||||
s.add_dependency 'spree_core', '~> 1.1'
|
||||
|
||||
s.add_dependency 'spree_core', '~> 1.3.0'
|
||||
|
||||
# test suite
|
||||
s.add_development_dependency 'shoulda-matchers'
|
||||
|
||||
Reference in New Issue
Block a user