refinerycms-stores 0.0.16 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/VERSION +1 -1
- data/app/assets/images/Excel.png +0 -0
- data/app/assets/images/PowerPoint.png +0 -0
- data/app/assets/images/Word.png +0 -0
- data/app/assets/images/audio-icon.png +0 -0
- data/app/assets/images/camera-icon.png +0 -0
- data/app/assets/images/html-icon.png +0 -0
- data/app/assets/images/muku-doc-font-128.png +0 -0
- data/app/assets/images/pdf-icon.png +0 -0
- data/app/assets/images/print-icon.png +0 -0
- data/app/assets/images/video-icon.png +0 -0
- data/app/assets/images/warning-icon.png +0 -0
- data/app/assets/images/zip_thumb.png +0 -0
- data/app/assets/stylesheets/refinery/refinerycms-stores.sass +66 -0
- data/app/controllers/refinery/customers/customers_controller.rb +35 -17
- data/app/controllers/refinery/orders/admin/orders_controller.rb +2 -1
- data/app/controllers/refinery/orders/orders_controller.rb +14 -9
- data/app/controllers/refinery/products/admin/digidownloads_controller.rb +39 -0
- data/app/controllers/refinery/products/admin/products_controller.rb +54 -4
- data/app/controllers/refinery/products/digidownloads_controller.rb +32 -0
- data/app/controllers/refinery/products/products_controller.rb +3 -0
- data/app/controllers/refinery/stores/stores_controller.rb +3 -2
- data/app/controllers/refinery/stores_application_controller.rb +6 -1
- data/app/helpers/refinery/stores/stores_helper.rb +4 -3
- data/app/models/refinery/addresses/address.rb +42 -0
- data/app/models/refinery/customers/customer.rb +7 -1
- data/app/models/refinery/orders/line_item.rb +10 -0
- data/app/models/refinery/orders/order.rb +59 -47
- data/app/models/refinery/products/digidownload.rb +181 -0
- data/app/models/refinery/products/product.rb +21 -1
- data/app/views/refinery/customers/customers/edit.html.haml +54 -0
- data/app/views/refinery/customers/{new.html.haml → customers/new.html.haml} +10 -3
- data/app/views/refinery/orders/admin/orders/_actions.html.haml +4 -0
- data/app/views/refinery/orders/admin/orders/_order.html.haml +13 -0
- data/app/views/refinery/orders/admin/orders/_orders.html.haml +2 -0
- data/app/views/refinery/orders/admin/orders/_records.html.haml +12 -0
- data/app/views/refinery/orders/admin/orders/_sortable_list.html.haml +4 -0
- data/app/views/refinery/orders/admin/orders/index.html.haml +5 -0
- data/app/views/refinery/orders/admin/orders/show.html.haml +80 -0
- data/app/views/refinery/orders/orders/edit.html.haml +2 -2
- data/app/views/refinery/orders/orders/index.html.haml +19 -4
- data/app/views/refinery/orders/orders/show.html.haml +68 -25
- data/app/views/refinery/products/admin/digidownloads/_actions.html.haml +19 -0
- data/app/views/refinery/products/admin/digidownloads/_digidownload.html.haml +13 -0
- data/app/views/refinery/products/admin/digidownloads/_digidownloads.html.haml +2 -0
- data/app/views/refinery/products/admin/digidownloads/_form.html.haml +41 -0
- data/app/views/refinery/products/admin/digidownloads/_records.html.haml +12 -0
- data/app/views/refinery/products/admin/digidownloads/_sortable_list.html.haml +4 -0
- data/app/views/refinery/products/admin/digidownloads/edit.html.haml +2 -0
- data/app/views/refinery/products/admin/digidownloads/index.html.haml +6 -0
- data/app/views/refinery/products/admin/digidownloads/new.html.haml +2 -0
- data/app/views/refinery/products/admin/products/_form.html.haml +98 -0
- data/app/views/refinery/products/digidownloads/index.html.haml +28 -0
- data/app/views/refinery/products/digidownloads/show.html.haml +39 -0
- data/app/views/refinery/products/products/show.html.haml +10 -9
- data/app/views/refinery/shared/_address.html.haml +18 -0
- data/app/views/refinery/{orders/orders → shared}/_address_form.html.haml +0 -0
- data/app/views/refinery/{stores/stores → shared}/_cart.html.haml +2 -2
- data/app/views/refinery/{stores/stores → shared}/_cart_item.html.haml +0 -0
- data/app/views/refinery/shared/_customer_head.html.haml +20 -0
- data/app/views/refinery/stores/admin/stores/_actions.html.haml +46 -0
- data/app/views/refinery/stores/stores/show.html.haml +1 -1
- data/config/locales/en.yml +17 -0
- data/config/routes.rb +24 -9
- data/db/migrate/3_create_orders_orders.rb +2 -0
- data/db/migrate/7_create_products_digidownloads.rb +33 -0
- data/lib/refinery/addresses.rb +11 -11
- data/lib/refinery/addresses/engine.rb +3 -3
- data/lib/refinery/auth_key.rb +44 -0
- data/lib/refinery/customers.rb +11 -11
- data/lib/refinery/customers/engine.rb +3 -3
- data/lib/refinery/orders.rb +1 -1
- data/lib/refinery/products.rb +2 -2
- data/lib/refinery/products/engine.rb +2 -2
- data/lib/refinery/stores.rb +1 -0
- data/lib/refinery/stores/authenticated_system.rb +25 -0
- data/lib/refinery/stores/engine.rb +19 -0
- data/lib/refinerycms-stores.rb +5 -2
- data/readme.md +32 -1
- data/refinerycms-stores.gemspec +54 -20
- metadata +87 -37
- data/app/views/refinery/customers/edit.html.haml +0 -17
- data/app/views/refinery/orders/admin/orders/_actions.html.erb +0 -25
- data/app/views/refinery/orders/admin/orders/_form.html.erb +0 -122
- data/app/views/refinery/orders/admin/orders/_order.html.erb +0 -20
- data/app/views/refinery/orders/admin/orders/_orders.html.erb +0 -2
- data/app/views/refinery/orders/admin/orders/_records.html.erb +0 -18
- data/app/views/refinery/orders/admin/orders/_sortable_list.html.erb +0 -5
- data/app/views/refinery/orders/admin/orders/edit.html.erb +0 -1
- data/app/views/refinery/orders/admin/orders/index.html.erb +0 -7
- data/app/views/refinery/orders/admin/orders/new.html.erb +0 -1
- data/app/views/refinery/products/admin/products/_form.html.erb +0 -127
- data/app/views/refinery/stores/admin/stores/_actions.html.erb +0 -57
- data/app/views/refinery/stores/stores/_customer_head.html.haml +0 -12
@@ -9,9 +9,29 @@ module Refinery
|
|
9
9
|
belongs_to :main_pic, :class_name => '::Refinery::Image'
|
10
10
|
belongs_to :store, :class_name => '::Refinery::Stores::Store'
|
11
11
|
has_many :line_items, :class_name => '::Refinery::Orders::LineItem'
|
12
|
+
has_one :digidownload, :class_name => '::Refinery::Products::Digidownload'
|
12
13
|
|
13
14
|
scope :active, lambda { |i| where(["date_available <= ? ", Time.now ]) }
|
14
|
-
|
15
|
+
|
16
|
+
# -----------------------------------------------------------------------
|
17
|
+
# select_list -- returns an html select list suitable for selecting a product
|
18
|
+
# -----------------------------------------------------------------------
|
19
|
+
def self.select_list()
|
20
|
+
all.map{ |x| [x.name, x.id] }
|
21
|
+
end
|
22
|
+
|
23
|
+
|
24
|
+
# -----------------------------------------------------------------------
|
25
|
+
# digi_select_list -- returns an html select list of prods w/o downloads
|
26
|
+
# -----------------------------------------------------------------------
|
27
|
+
def self.digi_select_list()
|
28
|
+
[ ["none selected yet", nil] ] +
|
29
|
+
includes(:digidownload).where( :refinery_digidownloads => { :product_id => nil } ).all.map{ |x| [x.name, x.id] }
|
30
|
+
end
|
31
|
+
|
32
|
+
|
33
|
+
# #########################################################################
|
34
|
+
|
15
35
|
end
|
16
36
|
end
|
17
37
|
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
- content_for :header, t('pick_new_password_for', :scope => 'refinery.users.reset', :email => @customer.email)
|
2
|
+
|
3
|
+
- content_for :stylesheets do
|
4
|
+
= stylesheet_link_tag('refinery/refinerycms-stores')
|
5
|
+
|
6
|
+
- content_for :body_content_title do
|
7
|
+
%h1 Update Customer Profile
|
8
|
+
|
9
|
+
- content_for :body_content_left do
|
10
|
+
|
11
|
+
%section
|
12
|
+
.modal-form.basic-form
|
13
|
+
= form_for @customer, |
|
14
|
+
:url => refinery.customers_customer_path, |
|
15
|
+
:html => { :method => :put } do |f| |
|
16
|
+
= render '/refinery/admin/error_messages', :object => @customer, :include_object_name => true
|
17
|
+
|
18
|
+
%h3 Sign-in Information
|
19
|
+
%i your sign-in email must be unique
|
20
|
+
|
21
|
+
.form-lines.no-width
|
22
|
+
= f.label :email
|
23
|
+
= f.text_field :email
|
24
|
+
|
25
|
+
%h3 Change Password
|
26
|
+
%i leave blank if unchanged
|
27
|
+
|
28
|
+
.form-lines.no-width
|
29
|
+
= f.label :password
|
30
|
+
= f.password_field :password, :class => 'larger widest'
|
31
|
+
= f.label :password_confirmation
|
32
|
+
= f.password_field :password_confirmation, :class => 'larger widest'
|
33
|
+
|
34
|
+
%h3 Your Billing Information
|
35
|
+
= render( :partial => "refinery/shared/address_form", :object => @billing_address, :locals => { :as_name => :billing_address } )
|
36
|
+
|
37
|
+
%h3 Your Shipping Information
|
38
|
+
.form-lines.no-width
|
39
|
+
= check_box_tag( :use_billing, '1', false, { :onclick => "$('#shipping_address').toggle();" } )
|
40
|
+
= label_tag( :use_billing, 'use billing address for shipping', {:title => "use billing address for shipping"} )
|
41
|
+
%br
|
42
|
+
= render( :partial => "refinery/shared/address_form", :object => @shipping_address, :locals => { :as_name => :shipping_address } )
|
43
|
+
|
44
|
+
= render '/refinery/admin/form_actions', :f => f, |
|
45
|
+
:continue_editing => false, |
|
46
|
+
:submit_button_text => "update profile", |
|
47
|
+
:cancel_url => refinery.stores_root_path, |
|
48
|
+
:cancel_title => nil, |
|
49
|
+
:hide_delete => true |
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
= render "/refinery/content_page"
|
54
|
+
|
@@ -1,17 +1,24 @@
|
|
1
|
-
- content_for :header,
|
2
|
-
|
3
|
-
|
1
|
+
- content_for :header, "sign up for a customer profile"
|
2
|
+
|
3
|
+
= form_for @customer, :url => refinery.customers_customers_path do |f|
|
4
|
+
|
5
|
+
= render '/refinery/admin/error_messages', :object => @customer, :include_object_name => true
|
6
|
+
|
4
7
|
.field
|
5
8
|
= f.label :email
|
6
9
|
= f.text_field :email, :class => 'larger widest'
|
10
|
+
|
7
11
|
.field
|
8
12
|
= f.label :password
|
9
13
|
= f.password_field :password, :class => 'larger widest'
|
14
|
+
|
10
15
|
.field
|
11
16
|
= f.label :password_confirmation
|
12
17
|
= f.password_field :password_confirmation, :class => 'larger widest'
|
18
|
+
|
13
19
|
= render '/refinery/admin/form_actions', :f => f, |
|
14
20
|
:submit_continue => false, |
|
15
21
|
:submit_button_text => t('sign_up', :scope => 'refinery.users.new'), |
|
16
22
|
:hide_delete => true, |
|
17
23
|
:hide_cancel => true |
|
24
|
+
|
@@ -0,0 +1,13 @@
|
|
1
|
+
%li{:class => "clearfix record #{cycle("on", "on-hover")}", :id => dom_id(order)}
|
2
|
+
%span.title
|
3
|
+
= order.display_date.to_s(:db)
|
4
|
+
 
|
5
|
+
= order.order_number.to_s
|
6
|
+
 
|
7
|
+
= number_to_currency(order.product_total)
|
8
|
+
 
|
9
|
+
= order.order_status
|
10
|
+
%span.actions
|
11
|
+
= link_to refinery_icon_tag("application_edit.png"), refinery.orders_admin_order_path(order), |
|
12
|
+
:title => t('.show') |
|
13
|
+
-#
|
@@ -0,0 +1,12 @@
|
|
1
|
+
- if searching?
|
2
|
+
%h2= t('results_for', :scope => 'refinery.admin.search', :query => params[:search])
|
3
|
+
.pagination_container
|
4
|
+
- if @orders.any?
|
5
|
+
= render 'orders'
|
6
|
+
- else
|
7
|
+
%p
|
8
|
+
- unless searching?
|
9
|
+
%strong
|
10
|
+
= t('.no_items_yet')
|
11
|
+
- else
|
12
|
+
= t('no_results', :scope => 'refinery.admin.search')
|
@@ -0,0 +1,80 @@
|
|
1
|
+
- content_for :stylesheets do
|
2
|
+
= stylesheet_link_tag('refinery/refinerycms-stores')
|
3
|
+
|
4
|
+
%section#records
|
5
|
+
= render( :partial => "refinery/shared/address", :object => @order.billing_address, :locals => { :as_name => :billing_address } )
|
6
|
+
= render( :partial => "refinery/shared/address", :object => @order.shipping_address, :locals => { :as_name => :shipping_address } )
|
7
|
+
|
8
|
+
.order-content
|
9
|
+
%table{ :width => "90%" }
|
10
|
+
%thead.heading-row
|
11
|
+
%th.item-col{:width => "70%"} item
|
12
|
+
%th.amount-col{:width => "10%"} quantity
|
13
|
+
%th.amount-col{:width => "10%"} price
|
14
|
+
%th.amount-col{:width => "10%"} amount
|
15
|
+
|
16
|
+
- @order.line_items.each do |item|
|
17
|
+
%tr
|
18
|
+
%td.item-name= item.product.name
|
19
|
+
%td.item-quantity= item.quantity
|
20
|
+
%td.item-unit-price= item.unit_price
|
21
|
+
%td.sub-total-type= number_to_currency( ( item.quantity.to_f * item.unit_price ) )
|
22
|
+
|
23
|
+
.order-totals
|
24
|
+
- sub_product = @order.total_price
|
25
|
+
- sub_discount = 0.0
|
26
|
+
- sub_shipping = 0.0
|
27
|
+
- sub_tax = 0.0
|
28
|
+
- grand_total = sub_product - sub_discount + sub_shipping + sub_tax
|
29
|
+
|
30
|
+
%tr
|
31
|
+
%td{ :colspan => 4 }
|
32
|
+
|
33
|
+
%tr
|
34
|
+
%td.right-just product
|
35
|
+
%td
|
36
|
+
%td
|
37
|
+
%td.sub-total-type= number_to_currency sub_product
|
38
|
+
|
39
|
+
%tr
|
40
|
+
%td.right-just discount
|
41
|
+
%td
|
42
|
+
%td
|
43
|
+
%td.sub-total-type= number_to_currency sub_discount
|
44
|
+
|
45
|
+
%tr
|
46
|
+
%td.right-just shipping
|
47
|
+
%td
|
48
|
+
%td
|
49
|
+
%td.sub-total-type= number_to_currency sub_shipping
|
50
|
+
|
51
|
+
%tr
|
52
|
+
%td.right-just tax
|
53
|
+
%td
|
54
|
+
%td
|
55
|
+
%td.sub-total-type= number_to_currency sub_tax
|
56
|
+
|
57
|
+
%tr
|
58
|
+
%td.right-just purchase total
|
59
|
+
%td
|
60
|
+
%td
|
61
|
+
%td.sub-total-type= number_to_currency grand_total
|
62
|
+
|
63
|
+
%aside#actions
|
64
|
+
%p
|
65
|
+
Order #
|
66
|
+
= @order.order_number
|
67
|
+
%p= @order.order_status.gsub(/_/,' ')
|
68
|
+
%p= @order.display_date.to_s(:long)
|
69
|
+
|
70
|
+
%ul.collapsible_menu
|
71
|
+
%li.not_a_link
|
72
|
+
= link_to "other actions", '#', :class => 'folder_icon'
|
73
|
+
%li
|
74
|
+
= link_to t('refinery.orders.admin.orders.actions.manage'), refinery.orders_admin_orders_path, :class => 'folder_icon'
|
75
|
+
%li
|
76
|
+
= link_to t('refinery.products.admin.products.actions.manage'), refinery.products_admin_products_path, :class => 'folder_icon'
|
77
|
+
%li
|
78
|
+
= link_to t('refinery.products.admin.digidownloads.actions.manage'), refinery.products_admin_digidownloads_path, :class => 'folder_icon'
|
79
|
+
|
80
|
+
|
@@ -11,14 +11,14 @@
|
|
11
11
|
= render '/refinery/admin/error_messages', :object => @order, :include_object_name => true
|
12
12
|
= form_tag( refinery.orders_order_path(@order), :method => :put, :id => 'payment-form' ) do
|
13
13
|
%h3 Your Billing Information
|
14
|
-
= render( :partial => "address_form", :object => @billing_address, :locals => { :as_name => :billing_address } )
|
14
|
+
= render( :partial => "refinery/shared/address_form", :object => @billing_address, :locals => { :as_name => :billing_address } )
|
15
15
|
|
16
16
|
%h3 Your Shipping Information
|
17
17
|
.form-lines.no-width
|
18
18
|
= check_box_tag( :use_billing, '1', false, { :onclick => "$('#shipping_address').toggle();" } )
|
19
19
|
= label_tag( :use_billing, 'use billing address for shipping', {:title => "use billing address for shipping"} )
|
20
20
|
%br
|
21
|
-
= render( :partial => "address_form", :object => @shipping_address, :locals => { :as_name => :shipping_address } )
|
21
|
+
= render( :partial => "refinery/shared/address_form", :object => @shipping_address, :locals => { :as_name => :shipping_address } )
|
22
22
|
|
23
23
|
%h3 Your Payment Method
|
24
24
|
|
@@ -1,6 +1,21 @@
|
|
1
|
+
- content_for :stylesheets do
|
2
|
+
= stylesheet_link_tag('refinery/refinerycms-stores')
|
3
|
+
|
1
4
|
- content_for :body_content_left do
|
2
|
-
|
3
|
-
|
4
|
-
%
|
5
|
-
|
5
|
+
#orders
|
6
|
+
%table{ :width => "100%" }
|
7
|
+
%thead.heading-row
|
8
|
+
%th.date-col{:width => "15%"} date
|
9
|
+
%th.order-no-col{:width => "12%"} order #
|
10
|
+
%th.item-col{:width => "50%"} first item
|
11
|
+
%th.amount-col{:width => "5%"} amount
|
12
|
+
%th.status-col{:width => "17%"} status
|
13
|
+
|
14
|
+
- @orders.each do |order|
|
15
|
+
%tr
|
16
|
+
%td.date-col= order.display_date.to_s(:short)
|
17
|
+
%td.order-no-col= order.order_number.to_s
|
18
|
+
%td.item-col= truncate( order.line_items.first.product.name, :length => 40)
|
19
|
+
%td.amount-col= number_to_currency(order.product_total)
|
20
|
+
%td.status-col= link_to order.order_status, refinery.orders_order_path(order)
|
6
21
|
= render "/refinery/content_page"
|
@@ -1,36 +1,79 @@
|
|
1
|
+
- content_for :stylesheets do
|
2
|
+
= stylesheet_link_tag('refinery/refinerycms-stores')
|
3
|
+
|
1
4
|
- content_for :body_content_title do
|
2
5
|
%h1
|
3
|
-
Order
|
6
|
+
Order #
|
4
7
|
= @order.order_number
|
8
|
+
|
5
9
|
|
6
10
|
- content_for :body_content_left do
|
11
|
+
|
7
12
|
%section
|
8
|
-
%
|
9
|
-
%p
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
13
|
+
%h4= @order.order_status.gsub(/_/,' ')
|
14
|
+
%p= @order.display_date.to_s(:long)
|
15
|
+
|
16
|
+
= render( :partial => "refinery/shared/address", :object => @order.billing_address, :locals => { :as_name => :billing_address } )
|
17
|
+
= render( :partial => "refinery/shared/address", :object => @order.shipping_address, :locals => { :as_name => :shipping_address } )
|
18
|
+
|
19
|
+
.order-content
|
20
|
+
%table{ :width => "90%" }
|
21
|
+
%thead.heading-row
|
22
|
+
%th.item-col{:width => "70%"} item
|
23
|
+
%th.amount-col{:width => "10%"} quantity
|
24
|
+
%th.amount-col{:width => "10%"} price
|
25
|
+
%th.amount-col{:width => "10%"} amount
|
26
|
+
|
27
|
+
- @order.line_items.each do |item|
|
28
|
+
%tr
|
29
|
+
%td.item-name= item.product.name
|
30
|
+
%td.item-quantity= item.quantity
|
31
|
+
%td.item-unit-price= item.unit_price
|
32
|
+
%td.sub-total-type= pretty_total_price( item )
|
33
|
+
|
34
|
+
.order-totals
|
35
|
+
- sub_product = @order.total_price
|
36
|
+
- sub_discount = 0.0
|
37
|
+
- sub_shipping = 0.0
|
38
|
+
- sub_tax = 0.0
|
39
|
+
- grand_total = sub_product - sub_discount + sub_shipping + sub_tax
|
40
|
+
|
41
|
+
%tr
|
42
|
+
%td{ :colspan => 4 }
|
43
|
+
|
44
|
+
%tr
|
45
|
+
%td.right-just product
|
46
|
+
%td
|
47
|
+
%td
|
48
|
+
%td.sub-total-type= number_to_currency sub_product
|
49
|
+
|
50
|
+
%tr
|
51
|
+
%td.right-just discount
|
52
|
+
%td
|
53
|
+
%td
|
54
|
+
%td.sub-total-type= number_to_currency sub_discount
|
55
|
+
|
56
|
+
%tr
|
57
|
+
%td.right-just shipping
|
58
|
+
%td
|
59
|
+
%td
|
60
|
+
%td.sub-total-type= number_to_currency sub_shipping
|
61
|
+
|
62
|
+
%tr
|
63
|
+
%td.right-just tax
|
64
|
+
%td
|
65
|
+
%td
|
66
|
+
%td.sub-total-type= number_to_currency sub_tax
|
67
|
+
|
68
|
+
%tr
|
69
|
+
%td.right-just purchase total
|
70
|
+
%td
|
71
|
+
%td
|
72
|
+
%td.sub-total-type= number_to_currency grand_total
|
31
73
|
|
32
74
|
- content_for :body_content_right do
|
33
75
|
%aside
|
34
|
-
|
76
|
+
|
35
77
|
|
36
78
|
= render "/refinery/content_page"
|
79
|
+
|
@@ -0,0 +1,19 @@
|
|
1
|
+
%ul
|
2
|
+
- if ::Refinery::Products::Admin::DigidownloadsController.searchable?
|
3
|
+
%li
|
4
|
+
= render '/refinery/admin/search', :url => refinery.products_admin_digidownloads_path
|
5
|
+
%li
|
6
|
+
= link_to t('.create_new'), refinery.new_products_admin_digidownload_path, |
|
7
|
+
:class => "add_icon" |
|
8
|
+
- if !searching? && ::Refinery::Products::Admin::DigidownloadsController.sortable? && ::Refinery::Products::Digidownload.any?
|
9
|
+
%li
|
10
|
+
= link_to t('.reorder', :what => "Digidownloads"), |
|
11
|
+
refinery.products_admin_digidownloads_path, |
|
12
|
+
:id => "reorder_action", |
|
13
|
+
:class => "reorder_icon" |
|
14
|
+
-#
|
15
|
+
= link_to t('.reorder_done', :what => "Digidownloads"), |
|
16
|
+
refinery.products_admin_digidownloads_path, |
|
17
|
+
:id => "reorder_action_done", |
|
18
|
+
:style => "display: none;", |
|
19
|
+
:class => "reorder_icon" |
|
@@ -0,0 +1,13 @@
|
|
1
|
+
%li{:class => "clearfix record #{cycle("on", "on-hover")}", :id => dom_id(digidownload)}
|
2
|
+
%span.title
|
3
|
+
= digidownload.doc_file_name
|
4
|
+
%span.actions
|
5
|
+
-#
|
6
|
+
= link_to refinery_icon_tag("application_edit.png"), refinery.edit_products_admin_digidownload_path(digidownload), |
|
7
|
+
:title => t('.edit') |
|
8
|
+
-#
|
9
|
+
= link_to refinery_icon_tag("delete.png"), refinery.products_admin_digidownload_path(digidownload), |
|
10
|
+
:class => "cancel confirm-delete", |
|
11
|
+
:title => t('.delete'), |
|
12
|
+
:confirm => t('message', :scope => 'refinery.admin.delete', :title => digidownload.doc_file_name), |
|
13
|
+
:method => :delete |
|
@@ -0,0 +1,41 @@
|
|
1
|
+
- content_for :javascripts do
|
2
|
+
= javascript_include_tag "http://api.html5media.info/1.1.5/html5media.min.js"
|
3
|
+
|
4
|
+
%h2= form_title # local parameter
|
5
|
+
= form_for [refinery, :products_admin, @digidownload], :html => { :multipart => true } do |f|
|
6
|
+
= render '/refinery/admin/error_messages', :object => @digidownload, :include_object_name => true
|
7
|
+
|
8
|
+
- unless @digidownload.doc_file_name.blank?
|
9
|
+
.download-documents.clearfix
|
10
|
+
%dl
|
11
|
+
%dt
|
12
|
+
= link_to( raw( image_tag( ::Refinery::Products::Digidownload.category_to_icon( @digidownload.to_category ), { :alt => @digidownload.doc_file_name, :class => 'icon_image' } ) ), @digidownload.doc.url, {:title => @digidownload.doc_file_name, :target => 'popup', :onclick => "return popup(this.href,this.title)"} )
|
13
|
+
|
14
|
+
%dd
|
15
|
+
%i= @digidownload.doc_file_name
|
16
|
+
= @digidownload.to_player.html_safe
|
17
|
+
|
18
|
+
= f.label( "This download belongs to product:" )
|
19
|
+
= f.select( :product_id, @digidownload.digi_select_list, :selected => ( @digidownload.product_id || params[:product_id] ) )
|
20
|
+
|
21
|
+
= f.label( :doc, 'Upload new digital download', {:title => "digital download to be added or changed"} )
|
22
|
+
= f.file_field( :doc )
|
23
|
+
|
24
|
+
.field
|
25
|
+
= f.label "Restrict number of downloads per customer", {:title => "should there be a restriction on number of downloads for a given customer?should there be a restricted period in days after purchase for allowing downloads? leave blank if no restriction." }
|
26
|
+
= f.text_field :restrict_count
|
27
|
+
.field
|
28
|
+
= f.label "Restrict number of days for downloading after purchase", {:title => "should there be a restricted period in days after purchase for allowing downloads? leave blank if no restriction" }
|
29
|
+
= f.text_field :restrict_days
|
30
|
+
|
31
|
+
= render '/refinery/admin/form_actions', :f => f, |
|
32
|
+
:continue_editing => false, |
|
33
|
+
:delete_title => t('delete', :scope => 'refinery.products.admin.digidownloads.digidownload'), |
|
34
|
+
:delete_confirmation => t('message', :scope => 'refinery.admin.delete', :title => @digidownload.doc_file_name) |
|
35
|
+
|
36
|
+
- content_for :javascripts do
|
37
|
+
:javascript
|
38
|
+
$(document).ready(function(){
|
39
|
+
page_options.init(false, '', '');
|
40
|
+
});
|
41
|
+
|