synergy_default_theme 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,9 +2,7 @@ class HomeController < Spree::BaseController
2
2
  helper :products, :taxons
3
3
 
4
4
  def index
5
- @taxons = Rails.cache.fetch('homepage-taxons', :expires_in => LONG_INTERVAL) do
6
- home_taxonomy = get_taxonomies.find{|t| t.show_on_homepage? }
7
- home_taxonomy ? home_taxonomy.root.children : []
8
- end
5
+ home_taxonomy = get_taxonomies.find{|t| t.show_on_homepage? }
6
+ @taxons = home_taxonomy ? home_taxonomy.root.children : []
9
7
  end
10
8
  end
@@ -1,3 +1,4 @@
1
+ <% render 'admin/shared/product_sub_menu' %>
1
2
  <h1><%= t('review_management_description') %></h1>
2
3
 
3
4
  <% for reviews in [["Unapproved", @unapproved_reviews], ["Approved", @approved_reviews]] %>
@@ -15,25 +16,23 @@
15
16
  <% for review in reviews[1] %>
16
17
  <tr>
17
18
  <td>
18
- <%= l review.created_at %>
19
+ <%= review.created_at.to_date %>
19
20
  </td>
20
21
  <td>
21
- <%= review.name %><%= t('from') %> <%= review.location %>
22
+ <%= review.name %><%= " (#{review.user.email})" if review.user %>
22
23
  </td>
23
24
  <td>
24
25
  <%= link_to review.product.name, product_path(review.product) %>
25
26
  </td>
26
- <td style="border: 1px dashed green" width="60%">
27
- <br/>
27
+ <td width="50%">
28
28
  <%= h review.review %>
29
29
  </td>
30
30
  <td>
31
31
  <% unless review.approved %>
32
- <%= link_to t('approve'), {:action => 'approve', :id => review.id} %> <br />
32
+ <%= link_to_with_icon 'tick', t('approve'), {:action => 'approve', :id => review.id} %> <br />
33
33
  <% end %>
34
- <%= link_to t('edit'), [:edit, :admin, review] %> <br/>
35
- <%= link_to t('destroy'), [:admin, review], :method => :delete, :confirm => t('are_you_sure_review') %>
36
-
34
+ <%= link_to_edit review %><br />
35
+ <%= link_to_delete review %>
37
36
  </td>
38
37
  </tr>
39
38
  <% end %>
@@ -1,15 +1,19 @@
1
1
  <table class="index">
2
2
  <tr>
3
3
  <th><%= t('name') %></th>
4
+ <% if defined?(SpreeCompareProducts) %>
4
5
  <th><%= t('compare_products.comparable_container') %></th>
5
- <th>Отображать на главной странице</th>
6
+ <% end %>
7
+ <th><%= t('activerecord.attributes.taxonomy.show_on_homepage').capitalize %></th>
6
8
  <th></th>
7
9
  </tr>
8
10
 
9
11
  <% for taxonomy in @taxonomies %>
10
12
  <tr id="<%= dom_id taxonomy %>">
11
13
  <td><%= taxonomy.name %></td>
14
+ <% if defined?(SpreeCompareProducts) %>
12
15
  <td><%= icon('tick') if taxonomy.comparable? %></td>
16
+ <% end %>
13
17
  <td><%= icon('tick') if taxonomy.show_on_homepage? %></td>
14
18
  <td class="actions">
15
19
  <%= link_to_edit taxonomy.id %> &nbsp; <%= link_to_delete taxonomy %>
@@ -1,4 +1,4 @@
1
1
  <% field_container :taxonomy, :show_on_homepage do %>
2
2
  <%= check_box :taxonomy, :show_on_homepage %>
3
- <%= label :taxonomy, :show_on_homepage, 'отображать на главной странице' %>
3
+ <%= label :taxonomy, :show_on_homepage, t('activerecord.attributes.taxonomy.show_on_homepage') %>
4
4
  <% end %>
@@ -19,14 +19,14 @@
19
19
  <div class="main_top" align="center">
20
20
  <div class="header_panel">
21
21
  <ul>
22
- <li style="text-align: center; width: 265px">
22
+ <li class="header_panel_logo">
23
23
  <div><%= link_to image_tag("logo.png", :alt => "Synergy logo"), root_url %></div></li>
24
- <li style="padding-left: 16px; width: 400px"><%= render 'shared/search' %></li>
25
- <li>
24
+ <li class="header_panel_search"><%= render 'shared/search' %></li>
25
+ <li class="header_panel_cart">
26
26
  <div><%= link_to_cart %></div>
27
27
  </li>
28
- <li>
29
- <% if defined?(SpreeCompareProducts) %>
28
+ <% if defined?(SpreeCompareProducts) %>
29
+ <li class="header_panel_compare_product">
30
30
  <div><%= link_to(t(:product_comparison, :scope => :compare_products) + (@comparable_products.size > 0 ? " (#{@comparable_products.count})" : ""),
31
31
  compare_products_path, :id => "compare_products") %></div>
32
32
  <div id="tooltip" class="tooltip" style="display: none">
@@ -38,8 +38,8 @@
38
38
  </div>
39
39
  <div class="tooltip_bottom"></div>
40
40
  </div>
41
- <% end %>
42
41
  </li>
42
+ <% end %>
43
43
  </ul>
44
44
  </div>
45
45
  </div>
@@ -1,7 +1,7 @@
1
1
  <%
2
2
  image ||= @product.images.first
3
3
  if image %>
4
- <%= link_to image_tag(image.attachment.url(:product)), image.attachment.url(:large), :rel => '#large_image_overlay' %>
4
+ <%= link_to image_tag(image.attachment.url(:product), :alt => image.alt.present? ? image.alt : @product.name), image.attachment.url(:large), :rel => '#large_image_overlay' %>
5
5
  <% else %>
6
6
  <%= product_image(@product) %>
7
7
  <% end %>
@@ -1,12 +1,15 @@
1
1
  <title><%= title %></title>
2
2
  <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
3
+ <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="/favicon.ico" />
4
+ <link rel="icon" type="image/png" href="/favicon.png" />
5
+
3
6
  <%== meta_data_tags %>
4
7
  <%= csrf_meta_tag %>
5
8
 
6
9
  <%= hook :inside_head do %>
7
10
  <%== stylesheet_tags %>
8
11
  <%= stylesheet_link_tag 'jquery.jgrowl' %>
9
- <%= javascript_include_tag 'jquery-1.4.2.min', 'jquery.validate.min.js', 'rails', 'application', 'jquery.jgrowl.min', :cache => 'jquery-libs' %>
12
+ <%= javascript_include_tag 'jquery-1.4.2.min', 'jquery.validate.min.js', 'rails', 'application', 'jquery.jgrowl.min', 'jquery.tools.min.js', :cache => 'jquery-libs' %>
10
13
  <% end %>
11
14
  <%= stylesheet_link_tag 'style' %>
12
15
  <% unless I18n.locale.to_s[0..1] == 'en' %>
@@ -6,12 +6,11 @@
6
6
  <div class="simple_overlay" id="login_overlay" style="display: none">
7
7
  <% if defined?(SpreeSocial) %>
8
8
  <div class="login_social_bar">
9
- <div style="margin: 6px 0">Войти в магазин с помощью:</div>
9
+ <div style="margin: 6px 0"><%= t(:sign_in_through_one_of_these_services) %>:</div>
10
10
  <div style="margin: 6px 0">
11
- <%= image_tag 'twitter_32.png' %>
12
- <%= image_tag 'vkontakte_32.png' %>
13
- <%= image_tag 'facebook_32.png' %>
14
- <%= image_tag 'google_32.png' %>
11
+ <% AuthenticationMethod.where(:environment => ::Rails.env).each do |user| %>
12
+ <%= link_to(image_tag("social/#{user.preferred_provider}_32.png", :size => "32x32", :alt => "#{user.preferred_provider}"), user_authentication_omniauth_authorize_path(user.preferred_provider.to_sym), :title => t(:sign_in_with_provider, :provider => user.preferred_provider)) if user.active %>
13
+ <% end %>
15
14
  </div>
16
15
  </div>
17
16
  <% end %>
@@ -2,7 +2,7 @@
2
2
  <span class="rating" title="<%= txt_stars(review.rating) %>">
3
3
  <%= render :partial => "reviews/stars", :locals => {:stars => review.rating} %>
4
4
  </span>
5
- <span class="title"><%= review.title %></span>
5
+ <span class="name"><%= review.name %></span>
6
6
  <span class="attribution"><strong><%= l(review.created_at.to_date, :format => :long) %></strong></span>
7
7
  <p>
8
8
  <%= simple_format(review.review) %>
@@ -28,7 +28,7 @@
28
28
  'review[rating]': {
29
29
  required: true
30
30
  },
31
- 'review[title]': {
31
+ 'review[name]': {
32
32
  required: true
33
33
  }
34
34
  },
@@ -1,5 +1,3 @@
1
- <%= javascript_include_tag 'jquery.tools.min.js' %>
2
-
3
1
  <script type="text/javascript">
4
2
  $(function() {
5
3
  var cp_wrapper = $('#comparable_products_wrapper').detach();
@@ -8,7 +8,14 @@
8
8
  <% taxonomy.root.children.each do |taxon| %>
9
9
  <li<%== ' class="current"' if @taxon and ([@taxon] + @taxon.ancestors).include?(taxon) %>>
10
10
  <%= link_to taxon.name, seo_url(taxon) %>
11
- </li>
11
+ <% if taxon.children.any? %>
12
+ <ul class="nav-list">
13
+ <% taxon.children.each do |t| %>
14
+ <li<%== ' class="current"' if @taxon == t %>><%= link_to t.name, seo_url(t) %></li>
15
+ <% end %>
16
+ </ul>
17
+ <% end %>
18
+ </li>
12
19
  <% end %>
13
20
  </ul>
14
21
  <% end %>
@@ -3,6 +3,8 @@ ru:
3
3
  attributes:
4
4
  user:
5
5
  email: "Электронная почта"
6
+ taxonomy:
7
+ show_on_homepage: "отображать на главной странице"
6
8
 
7
9
  number:
8
10
  # Used in number_to_currency()
@@ -21,7 +23,7 @@ ru:
21
23
  email: "Электронная почта"
22
24
  email_address: "Адрес электронной почты"
23
25
  back_to_store: "Назад в магазин"
24
- review_title: "Ваше имя"
26
+ review_name: "Ваше имя"
25
27
  product_properties: "Характеристики"
26
28
  recently_viewed_products: "Вы недавно смотрели"
27
29
  submit_your_review: "Добавить отзыв"
Binary file
Binary file
@@ -47,6 +47,16 @@ h1, h2, h3, h4, h5, h6 {
47
47
  margin-top: 4px;
48
48
  }
49
49
 
50
+ .header_panel .header_panel_logo {
51
+ text-align: center;
52
+ width: 265px;
53
+ }
54
+
55
+ .header_panel .header_panel_search {
56
+ padding-left: 16px;
57
+ width: 400px;
58
+ }
59
+
50
60
  .header_panel #taxon {
51
61
  display: none;
52
62
  }
@@ -296,6 +306,18 @@ ul.nav-list li.current a {
296
306
  font-weight: bold;
297
307
  }
298
308
 
309
+ ul.nav-list ul.nav-list {
310
+ margin: 0 0 0 1em;
311
+ }
312
+
313
+ ul.nav-list ul.nav-list li a {
314
+ font-weight: normal;
315
+ }
316
+
317
+ ul.nav-list ul.nav-list li.current a {
318
+ font-weight: bold;
319
+ }
320
+
299
321
  #taxonomies {
300
322
  margin-bottom: 3em;
301
323
  }
@@ -722,10 +744,14 @@ hr.space {
722
744
  border-bottom: 1px solid #ddd;
723
745
  }
724
746
 
725
- #new_review #review_title {
747
+ #new_review #review_name {
726
748
  width: 200px;
727
749
  }
728
750
 
751
+ #new_review .review_title_field {
752
+ display: none;
753
+ }
754
+
729
755
  #new_review .review_rating_field {
730
756
  float: right;
731
757
  width: 480px;
@@ -783,7 +809,7 @@ hr.space {
783
809
  vertical-align: middle;
784
810
  }
785
811
 
786
- .review .title {
812
+ .review .name {
787
813
  margin: 0 2em;
788
814
  color: #3d5a75;
789
815
  }
@@ -993,12 +1019,12 @@ h4#variant-images {
993
1019
  border-bottom: 1px solid #eee;
994
1020
  }
995
1021
 
996
- #order_details {
1022
+ table#order_details {
997
1023
  border-top: 2px solid black;
998
1024
  border-bottom: 2px solid black;
999
1025
  }
1000
1026
 
1001
- #order_details th {
1027
+ table#order_details th {
1002
1028
  background: url("../images/cart_th_bg.png") repeat-x;
1003
1029
  height: 34px;
1004
1030
  border-bottom: 1px solid silver;
@@ -1012,6 +1038,16 @@ div.rating-cancel {
1012
1038
  padding-left: 5px;
1013
1039
  }
1014
1040
 
1041
+ #registration #guest_checkout {
1042
+ width: 51%;
1043
+ float: right;
1044
+ }
1045
+
1046
+ div#checkout #checkout_form_address #shipping label {
1047
+ width: auto;
1048
+ padding-right: 0;
1049
+ }
1050
+
1015
1051
  /* jGrowl */
1016
1052
 
1017
1053
  div#jGrowl.top-right {
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'synergy_default_theme'
4
- s.version = '1.0.1'
4
+ s.version = '1.0.2'
5
5
  s.summary = 'Default theme for Synergy'
6
6
  s.description = 'Тема по умолчанию для платформы электронной коммерции Synergy, основанной на Spree'
7
7
  s.required_ruby_version = '>= 1.8.7'
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 1
9
- version: 1.0.1
8
+ - 2
9
+ version: 1.0.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Service & Consulting
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-05-12 00:00:00 +04:00
17
+ date: 2011-07-03 00:00:00 +04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -112,6 +112,8 @@ files:
112
112
  - lib/synergy_default_theme_hooks.rb
113
113
  - lib/tasks/install.rake
114
114
  - lib/tasks/synergy_default_theme.rake
115
+ - public/favicon.ico
116
+ - public/favicon.png
115
117
  - public/images/bubblepopup_bg.png
116
118
  - public/images/bubblepopup_bottom.png
117
119
  - public/images/bubblepopup_top.png
@@ -135,6 +137,10 @@ files:
135
137
  - public/images/search_button.png
136
138
  - public/images/search_textinput.png
137
139
  - public/images/search_textinput_active.png
140
+ - public/images/social/facebook_32.png
141
+ - public/images/social/google_32.png
142
+ - public/images/social/twitter_32.png
143
+ - public/images/social/vkontakte_32.png
138
144
  - public/images/star.png
139
145
  - public/images/star_orange.png
140
146
  - public/images/star_white.png