synergy 0.60.0.RC1 → 0.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.md CHANGED
@@ -7,9 +7,9 @@ Synergy
7
7
  Установка
8
8
  =========
9
9
 
10
- 1. Установите Rails 3.0.7
10
+ 1. Установите Rails 3.0.9
11
11
 
12
- gem install rails -v 3.0.7
12
+ gem install rails -v 3.0.9
13
13
 
14
14
  1. Создайте новое приложение
15
15
 
@@ -18,19 +18,11 @@ Synergy
18
18
  1. Настройте подключение к базе данных (рекомендуется MySQL с адаптером mysql2)
19
19
  1. Добавьте в Gemfile следующие строки:
20
20
 
21
- gem 'mysql2', '0.2.7'
22
- gem 'russian', :git => 'git://github.com/yaroslav/russian.git'
23
- gem 'spree', '~> 0.60.0'
21
+ gem 'mysql2', '~> 0.2.7'
22
+ gem 'spree', :git => 'git://github.com/spree/spree.git', :branch => '0-60-stable'
24
23
  gem 'spree_i18n', :git => 'git://github.com/spree/spree_i18n.git'
25
- gem 'spree_static_content'
26
- gem 'spree_editor'
27
- gem 'spree_online_support'
28
- gem 'spree_robokassa'
29
- gem 'spree_yandex_market'
30
- gem 'spree_address_book'
31
- gem 'spree_dynamic_sitemaps'
32
- gem 'synergy', '~> 0.50.0'
33
- gem 'synergy_default_theme', '1.0.1'
24
+ gem 'synergy', '~> 0.60.0'
25
+ gem 'synergy_default_theme', '~> 1.0.2'
34
26
 
35
27
  1. Выполните следующие команды:
36
28
 
@@ -41,7 +33,6 @@ Synergy
41
33
  rake synergy_default_theme:install
42
34
  rake db:migrate
43
35
  rake db:seed db:sample
44
- rake db:admin:create
45
36
  rails s
46
37
 
47
38
 
@@ -0,0 +1,3 @@
1
+ AddressesController.class_eval do
2
+ helper :checkout
3
+ end
@@ -3,6 +3,7 @@ CheckoutController.class_eval do
3
3
 
4
4
  def after_payment
5
5
  if @order.shipping_method.calculator.is_a?(Calculator::CashOnDelivery)
6
+ @order.payments.build(:payment_method => PaymentMethod.internal, :amount => @order.total)
6
7
  @order.confirm_without_payment!
7
8
  end
8
9
  end
@@ -0,0 +1,14 @@
1
+ # coding: utf-8
2
+ PaymentMethod.class_eval do
3
+ def self.internal
4
+ pm = PaymentMethod.where(:environment => Rails.env,
5
+ :display_on => "back_end",
6
+ :type => "PaymentMethod::Check",
7
+ :active => true).first
8
+
9
+ pm ||= PaymentMethod::Check.create(:environment => Rails.env,
10
+ :name => "Для внутренних расчётов",
11
+ :display_on => "back_end", :active => true)
12
+ pm
13
+ end
14
+ end
@@ -1,6 +1,11 @@
1
1
  <%= tab :overview, :route => :admin %>
2
- <%= tab :orders, :payments, :creditcard_payments, :shipments, :creditcards, :return_authorizations %>
3
- <%= tab :products , :option_types, :properties, :prototypes, :variants, :product_properties, :taxons, :product_groups, :reviews, :vasia %>
2
+ <%= tab :orders, :payments, :creditcard_payments, :shipments, :creditcards,
3
+ :return_authorizations %>
4
+ <%= tab :products, :option_types, :properties, :prototypes, :variants, :product_properties,
5
+ :taxons, :product_groups, :reviews, :images %>
4
6
  <%= tab :reports %>
5
- <%= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones, :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods, :trackers, :editor_settings, :online_support_settings, :authentication_methods, :label => 'configuration' %>
6
- <%= tab :users %>
7
+ <%= tab :configurations, :general_settings, :mail_methods, :tax_categories, :zones,
8
+ :states, :payment_methods, :inventory_settings, :taxonomies, :shipping_methods,
9
+ :trackers, :editor_settings, :online_support_settings, :authentication_methods,
10
+ :label => 'configuration' %>
11
+ <%= tab :users %>
@@ -0,0 +1,73 @@
1
+ <% unless @shipment.order.cart? %>
2
+ <table class="index" style="width:100%;" data-hook="admin_shipment_form_inventory_units">
3
+ <tr>
4
+ <th width="130px"><%= t('include_in_shipment') %></th>
5
+ <th><%= t('sku') %></th>
6
+ <th><%= t('item_description') %></th>
7
+ <th><%= t('status') %></th>
8
+ <th><%= t('note') %></th>
9
+ </tr>
10
+
11
+ <% @shipment.order.inventory_units.each do |inventory_unit| %>
12
+ <tr>
13
+ <td style="text-align:center;">
14
+ <%= check_box_tag "inventory_units[#{inventory_unit.id}]",
15
+ :true,
16
+ (inventory_unit.shipment == @shipment),
17
+ { :disabled => %w(shipped backordered returned).include?(inventory_unit.state),
18
+ :class => 'inventory_unit'} %>
19
+ </td>
20
+ <td valign="top" width="120px;"><%= inventory_unit.variant.sku %></td>
21
+ <td width="300">
22
+ <%=inventory_unit.variant.product.name %>
23
+ <%= "(" + variant_options(inventory_unit.variant) + ")" unless inventory_unit.variant.option_values.empty? %>
24
+ </td>
25
+ <td><%= t(inventory_unit.state) %></td>
26
+ <td>
27
+ <% if inventory_unit.shipment == @shipment %>
28
+ <%= t('included_in_this_shipment') %>
29
+ <% elsif !inventory_unit.shipment.nil? %>
30
+ <%= t('included_in_other_shipment') %> - <%= link_to inventory_unit.shipment.number, edit_admin_order_shipment_url(inventory_unit.order, inventory_unit.shipment) %>
31
+ <% end %>
32
+ </td>
33
+ </tr>
34
+ <% end %>
35
+ </table>
36
+ <% end %>
37
+
38
+ <div data-hook="admin_shipment_form_address">
39
+ <% shipment_form.fields_for 'address' do |sa_form| %>
40
+ <%= render :partial => 'admin/shared/address_form', :locals => {:f => sa_form, :name => t("shipping_address"), :use_billing => false} %>
41
+ <% end %>
42
+ </div>
43
+
44
+ <div data-hook="admin_shipment_form_details">
45
+ <table class="index">
46
+ <tr>
47
+ <th colspan="8"><%= t("shipment_details") %></th>
48
+ </tr>
49
+ <tr>
50
+ <td>
51
+ <%= shipment_form.label :shipping_method_id, t('shipping_method') + ":" %>
52
+ </td>
53
+ <td>
54
+ <%= shipment_form.select :shipping_method_id,
55
+ @shipping_methods.map {|sm| ["#{sm.name} - #{sm.zone.name}", sm.id] } %>
56
+ </td>
57
+ <td>
58
+ <%= shipment_form.label :tracking, t('tracking') + ":" %>
59
+ </td>
60
+ <td><%= shipment_form.text_field :tracking %></td>
61
+ </tr>
62
+ <% if Spree::Config[:shipping_instructions] %>
63
+ <tr>
64
+ <td>
65
+ <%= shipment_form.label :special_instructions, t('special_instructions') + ":" %>
66
+ </td>
67
+ <td colspan="3">
68
+ <%= shipment_form.text_area :special_instructions %>
69
+ </td>
70
+ </tr>
71
+ <% end %>
72
+ </table>
73
+ </div>
@@ -28,7 +28,6 @@ ru:
28
28
  one: "Адрес"
29
29
  few: "Адреса"
30
30
  other: "Адресов"
31
-
32
31
  adjustment:
33
32
  one: Надбавка
34
33
  other: Надбавки
@@ -38,6 +37,9 @@ ru:
38
37
  configuration:
39
38
  one: Конфигурация
40
39
  other: Конфигурации
40
+ image:
41
+ one: Изображение
42
+ other: Изображения
41
43
  mail_method:
42
44
  one: Метод отправки почты
43
45
  other: Методы отправки почты
data/lib/synergy.rb CHANGED
@@ -1,5 +1,20 @@
1
1
  # coding: utf-8
2
2
  require 'spree_core'
3
+ require 'spree_auth'
4
+ require 'spree_api'
5
+ require 'spree_dash'
6
+ require 'spree_promo'
7
+ require 'spree_i18n'
8
+ require 'spree_static_content'
9
+ require 'spree_editor'
10
+ require 'spree_online_support'
11
+ require 'spree_robokassa'
12
+ require 'spree_yandex_market'
13
+ require 'spree_address_book'
14
+ require 'spree_dynamic_sitemaps'
15
+ require 'formtastic'
16
+ require 'russian'
17
+
3
18
  require 'synergy_hooks'
4
19
  require 'ext/number_helper'
5
20
 
@@ -35,8 +50,8 @@ module Synergy
35
50
  #Spree::Config.set(:store_address => 'Somewhere st. Nowhere')
36
51
  end
37
52
 
38
- ADDRESS_FIELDS.clear << ["lastname", "firstname", "secondname", "country", "state", "city", "zipcode", "address1", "phone"]
39
- ADDRESS_FIELDS.flatten!
53
+ ::ADDRESS_FIELDS.clear << ["lastname", "firstname", "secondname", "country", "state", "city", "zipcode", "address1", "phone"]
54
+ ::ADDRESS_FIELDS.flatten!
40
55
 
41
56
  String.class_eval do
42
57
  def to_url
@@ -105,3 +105,5 @@ a.button span, .actions a {
105
105
  .toolbar {
106
106
  margin-bottom: 0;
107
107
  }
108
+
109
+ #content form textarea { border: 1px solid #BBB; height: 150px; }
data/synergy.gemspec CHANGED
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'synergy'
4
- s.version = '0.60.0.RC1'
4
+ s.version = '0.60.0'
5
5
  s.summary = 'Russian e-commerce solution based on Spree'
6
6
  s.description = ''
7
7
  s.required_ruby_version = '>= 1.8.7'
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: synergy
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: true
4
+ prerelease: false
5
5
  segments:
6
6
  - 0
7
7
  - 60
8
8
  - 0
9
- - RC1
10
- version: 0.60.0.RC1
9
+ version: 0.60.0
11
10
  platform: ruby
12
11
  authors:
13
12
  - Roman Smirnov
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-06-25 00:00:00 +04:00
17
+ date: 2011-07-05 00:00:00 +04:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
@@ -185,6 +184,7 @@ files:
185
184
  - LICENSE.txt
186
185
  - README.md
187
186
  - Rakefile
187
+ - app/controllers/addresses_controller_decorator.rb
188
188
  - app/controllers/admin/base_controller_decorator.rb
189
189
  - app/controllers/admin/orders_controller_decorator.rb
190
190
  - app/controllers/admin/products_controller_decorator.rb
@@ -196,13 +196,14 @@ files:
196
196
  - app/models/calculator/cash_on_delivery.rb
197
197
  - app/models/order_decorator.rb
198
198
  - app/models/payment_method/sber_bank_invoice.rb
199
- - app/models/taxon_decorator.rb
199
+ - app/models/payment_method_decorator.rb
200
200
  - app/views/admin/orders/courier_instruction.html.erb
201
201
  - app/views/admin/overview/index.html.erb
202
202
  - app/views/admin/payments/source_forms/_sberbankinvoice.html.erb
203
203
  - app/views/admin/payments/source_views/_sberbankinvoice.html.erb
204
204
  - app/views/admin/products/index.html.erb
205
205
  - app/views/admin/shared/_tabs.html.erb
206
+ - app/views/admin/shipments/_form.html.erb
206
207
  - app/views/checkout/payment/_sberbankinvoice.html.erb
207
208
  - app/views/errors/404.html.erb
208
209
  - app/views/order_mailer/cancel_email.text.erb
@@ -271,13 +272,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
271
272
  version: 1.8.7
272
273
  required_rubygems_version: !ruby/object:Gem::Requirement
273
274
  requirements:
274
- - - ">"
275
+ - - ">="
275
276
  - !ruby/object:Gem::Version
276
277
  segments:
277
- - 1
278
- - 3
279
- - 1
280
- version: 1.3.1
278
+ - 0
279
+ version: "0"
281
280
  requirements:
282
281
  - none
283
282
  rubyforge_project: synergy
@@ -1,3 +0,0 @@
1
- Taxon.class_eval do
2
- before_update :set_permalink
3
- end