spree_mobile_views 0.50.0 → 0.50.1

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.
@@ -1,9 +1,9 @@
1
1
  <html>
2
2
  <head>
3
3
  <title><%= title %></title>
4
- <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.css" />
4
+ <link rel="stylesheet" href="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.css" />
5
5
  <script src="http://code.jquery.com/jquery-1.5.2.min.js"></script>
6
- <script src="http://code.jquery.com/mobile/1.0a4/jquery.mobile-1.0a4.min.js"></script>
6
+ <script src="http://code.jquery.com/mobile/1.0a4.1/jquery.mobile-1.0a4.1.min.js"></script>
7
7
  <%= javascript_include_tag 'rails' %>
8
8
  <%= stylesheet_link_tag 'mobile' %>
9
9
  <%= csrf_meta_tag %>
@@ -12,6 +12,7 @@
12
12
  <div data-role="page">
13
13
  <div data-role="header">
14
14
  <h1><%= title %></h1>
15
+ <a href="?mobile=0" data-icon="gear" data-ajax="false" class="ui-btn-right"><%= t(:full_site)%></a>
15
16
  <div data-role="navbar">
16
17
  <ul>
17
18
  <li><%= link_to t(:home), root_path, :class => css_class(root_path) %></li>
@@ -1,4 +1,4 @@
1
- <% if current_page?('/') %>
1
+ <% if current_page?('/') && params[:keywords].nil? %>
2
2
  <%= render :template => "taxons/index" %>
3
3
  <% else %>
4
4
  <%= render :partial => "shared/products" %>
@@ -1,9 +1,28 @@
1
- <ul data-role="listview">
2
- <% @products.each do |product| %>
3
- <li>
4
- <%= product_image(product)%>
5
- <h3><%= link_to product.name, product %></h3>
6
- <p><%= truncate(product.description, :length => 70, :omission => "...") %></p>
7
- </li>
1
+ <%
2
+ paginated_products = @searcher.products if params.key?(:keywords)
3
+ paginated_products ||= @products
4
+ %>
5
+ <% if params.key?(:keywords) %>
6
+ <h3><%= t(:search_results, :keywords => h(params[:keywords])) %></h3>
7
+ <% end %>
8
+ <% if @products.present? %>
9
+ <ul data-role="listview">
10
+ <% @products.each do |product| %>
11
+ <li>
12
+ <%= product_image(product)%>
13
+ <h3><%= link_to product.name, product %></h3>
14
+ <p><%= truncate(product.description, :length => 70, :omission => "...") %></p>
15
+ </li>
16
+ <% end %>
17
+ </ul>
18
+ <% if paginated_products.respond_to?(:total_pages)
19
+ params.delete(:search)
20
+ params.delete(:taxon)
21
+
22
+ %><%= will_paginate(paginated_products,
23
+ :previous_label => "&#171; #{t('previous')}",
24
+ :next_label => "#{t('next')} &#187;") %>
8
25
  <% end %>
9
- </ul>
26
+ <% else %>
27
+ <%= t(:no_products_found) %>
28
+ <% end %>
@@ -0,0 +1,2 @@
1
+ en:
2
+ full_site: "Full site"
@@ -0,0 +1,2 @@
1
+ ru:
2
+ full_site: "Полная версия"
@@ -34,3 +34,5 @@ form { margin: 0; }
34
34
  #line_items p { margin: 0; }
35
35
  #footer { margin: 0em 0.5em; }
36
36
  .ui-listview-inset { margin: 1em 0.5em; }
37
+ .ui-content h3 { margin: 0 0 1.5em 0; }
38
+ .ui-content div.pagination { margin-top: 2em; }
@@ -1,14 +1,14 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.platform = Gem::Platform::RUBY
3
3
  s.name = 'spree_mobile_views'
4
- s.version = '0.50.0'
4
+ s.version = '0.50.1'
5
5
  s.summary = 'Adds support of mobile devices to Spree stores'
6
6
  s.description = 'Works through jQuery Mobile'
7
7
  s.required_ruby_version = '>= 1.8.7'
8
8
 
9
9
  s.author = 'Roman Smirnov'
10
10
  s.email = 'roman@railsdog.com'
11
- # s.homepage = 'http://www.rubyonrails.org'
11
+ s.homepage = 'https://github.com/romul/spree_mobile_views'
12
12
  # s.rubyforge_project = 'actionmailer'
13
13
 
14
14
  s.files = `git ls-files`.split("\n")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 50
8
- - 0
9
- version: 0.50.0
8
+ - 1
9
+ version: 0.50.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Roman Smirnov
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-04-03 00:00:00 +04:00
17
+ date: 2011-04-27 00:00:00 +04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -64,6 +64,8 @@ files:
64
64
  - app/mobile_views/shared/_products.html.erb
65
65
  - app/mobile_views/taxons/index.html.erb
66
66
  - app/mobile_views/taxons/show.html.erb
67
+ - config/locales/en.yml
68
+ - config/locales/ru.yml
67
69
  - config/routes.rb
68
70
  - lib/spree_mobile_views.rb
69
71
  - lib/spree_mobile_views_hooks.rb
@@ -73,7 +75,7 @@ files:
73
75
  - spec/spec_helper.rb
74
76
  - spree_mobile_views.gemspec
75
77
  has_rdoc: true
76
- homepage:
78
+ homepage: https://github.com/romul/spree_mobile_views
77
79
  licenses: []
78
80
 
79
81
  post_install_message: