spree_custom_notifications 0.2 → 0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 772a5d5eafb9fba1f7680ddbffec1ec0f8fcc0cc
4
- data.tar.gz: ef78e952c0b14be8926ca3b3bc35fc4d5657bc41
3
+ metadata.gz: 97ef7c1f4e094858785c3e86b37e14e7fa7bf5d7
4
+ data.tar.gz: 87571e78b7ae38687c941d08947a1977657ca4c0
5
5
  SHA512:
6
- metadata.gz: f99c89eb1aa7a8a02db9581ba88d8cc728013137a27ee19f93932cef5d258c053293a5600b90396af96cc7d3e111b85389a3608ea3e8cf0241ce458725cdce6f
7
- data.tar.gz: 0d72bc61406a51dc9fc9e7c5883f935d912da81658db5e8efe10e94899fa2917e15b87cc08a44420c2a8c6367efc477b5d2c85a2709e4dd08c172bed694923bb
6
+ metadata.gz: 357f5adbf97f58e9cded84dfac51ab002d37ac13153af8c44eb124ddc4f9d80169c0de9f5a6ce80511a44697d754b8e6ad6d5870fcbd42039bcedd53a560fbc6
7
+ data.tar.gz: b9a3e44fada980b6827a2fd138fa1ce5dfe59f069e33fbe39f8f09cc35d569fd5256b75a5dce33280d3d75d72414eacb5deee63c0f866ad1c20e03ccfca95f98
data/README.md CHANGED
@@ -32,5 +32,25 @@ bundle
32
32
  bundle exec rails g spree_custom_notifications:install
33
33
  ```
34
34
 
35
+ Example
36
+ -------
37
+ Please refer following screenshot to create custom notifications.
38
+
39
+ Admin can add sample notification.
40
+
41
+ ![admin-custom-notification](screen-shots/custom_notification_screen_admin.png)
42
+
43
+ On store, the Notifications are displayed as following:
44
+
45
+ ![store-custom-notification](screen-shots/custom_notification_screen_store.png)
46
+
47
+ Customization
48
+ -------------
49
+
50
+ You can customize the styling of notification by using spree
51
+ assets customization logic.
52
+
53
+ Refer -
54
+ [http://guides.spreecommerce.com/developer/asset.html](http://guides.spreecommerce.com/developer/asset.html)
35
55
 
36
56
  Copyright (c) 2014 [Cuberoot Software](http://www.cuberoot.in), released under the New BSD License
@@ -46,10 +46,8 @@ module Spree
46
46
  def _set_notification(params)
47
47
  @notification = {}
48
48
  @start_date = params[:notification][:start_date]
49
- @start_date = Time.zone.parse(params[:notification][:start_date]).getutc unless @start_date.blank?
50
49
 
51
50
  @end_date = params[:notification][:end_date]
52
- @end_date = Time.zone.parse(params[:notification][:end_date]).getutc unless @end_date.blank?
53
51
  @message = params[:notification][:notification]
54
52
  @notification = { notification: @message,
55
53
  start_date: @start_date,
@@ -5,7 +5,7 @@ Spree::BaseHelper.class_eval do
5
5
  session['show_notification'] = true if session['show_notification'].nil?
6
6
  if session['show_notification']
7
7
  session['show_notification'] = true
8
- current_time = Time.zone.now.getutc
8
+ current_time = Time.now.getutc
9
9
  notifications =
10
10
  Spree::Notification.where('start_date <= :start_date_cond AND
11
11
  end_date >= :end_date_cond',
@@ -9,7 +9,7 @@
9
9
  </div>
10
10
  <div class="field">
11
11
  <%= f.fields_for :start_date do %>
12
- <div class='label-div'><%= f.label :start_date %></div>
12
+ <div class='label-div'><%= f.label :start_date , 'Start Date ( should be in UTC )'%></div>
13
13
  <div class='input-div'>
14
14
  <%= f.text_field :start_date, :id => "start_date", :class => 'input-width'%>
15
15
  </div>
@@ -17,7 +17,7 @@
17
17
  </div>
18
18
  <div class="field">
19
19
  <%= f.fields_for :end_date do %>
20
- <div class='label-div'><%= f.label :end_date %></div>
20
+ <div class='label-div'><%= f.label :end_date, 'End Date ( should be in UTC )' %></div>
21
21
  <div class='input-div'>
22
22
  <%= f.text_field :end_date, :id => "end_date", :class => 'input-width'%>
23
23
  </div>
@@ -2,7 +2,7 @@
2
2
  Gem::Specification.new do |s|
3
3
  s.platform = Gem::Platform::RUBY
4
4
  s.name = 'spree_custom_notifications'
5
- s.version = '0.2'
5
+ s.version = '0.3'
6
6
  s.summary = 'Spree Store Custom Notifications'
7
7
  s.description = 'Display Custom notifications on Spree Store'
8
8
  s.required_ruby_version = '>= 1.9.3'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spree_custom_notifications
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.2'
4
+ version: '0.3'
5
5
  platform: ruby
6
6
  authors:
7
7
  - prachidhabu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-18 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -201,6 +201,8 @@ files:
201
201
  - lib/spree_custom_notifications.rb
202
202
  - lib/spree_custom_notifications/engine.rb
203
203
  - lib/spree_custom_notifications/factories.rb
204
+ - screen-shots/custom_notification_screen_admin.png
205
+ - screen-shots/custom_notification_screen_store.png
204
206
  - spec/spec_helper.rb
205
207
  - spree_custom_notifications.gemspec
206
208
  homepage: