spree_reviews_rating 0.70.5 → 0.70.6
Sign up to get free protection for your applications and to get access to all the features.
- data/config/initializers/constants.rb +1 -0
- data/config/initializers/helpers.rb +2 -0
- data/config/initializers/load_preferences.rb +5 -0
- data/config/locales/en.yml +82 -0
- data/config/locales/it.yml +83 -0
- data/config/routes.rb +26 -0
- data/db/migrate/20081020220724_create_reviews.rb +18 -0
- data/db/migrate/20101222083309_create_feedback_reviews.rb +18 -0
- data/db/migrate/20110406083603_add_rating_to_products.rb +11 -0
- data/db/migrate/20120123141326_recalculate_ratings.rb +9 -0
- metadata +14 -4
@@ -0,0 +1 @@
|
|
1
|
+
NB_STARS = 5
|
@@ -0,0 +1,82 @@
|
|
1
|
+
en:
|
2
|
+
activerecord:
|
3
|
+
attributes:
|
4
|
+
review:
|
5
|
+
name: Your Name
|
6
|
+
title: Title
|
7
|
+
review: Content
|
8
|
+
rating: Rating
|
9
|
+
created_at: Date
|
10
|
+
ip_address: IP
|
11
|
+
user: User
|
12
|
+
models:
|
13
|
+
review:
|
14
|
+
one: one review
|
15
|
+
other: "%{count} reviews"
|
16
|
+
time:
|
17
|
+
formats:
|
18
|
+
default: "%a %d %b %Y, %H:%M:%S %z"
|
19
|
+
short: "%d %b %H:%M"
|
20
|
+
long: "%d %B %Y %H:%M"
|
21
|
+
review: "%a %d.%m.%Y"
|
22
|
+
hours: "%H:%M"
|
23
|
+
dow: "%A"
|
24
|
+
|
25
|
+
approve: Approve
|
26
|
+
Approved_reviews: Approved
|
27
|
+
approved_text: Unlocked comments will be published within 1-2 business days.
|
28
|
+
are_you_sure_review: Are you sure to delete review ?
|
29
|
+
average_customer_rating: Average rating
|
30
|
+
back_reviews: Back to the reviews
|
31
|
+
based_upon: based upon
|
32
|
+
by: by
|
33
|
+
date_: Date
|
34
|
+
edited_version: 'Edited version'
|
35
|
+
editing_review_for: 'Editing review for'
|
36
|
+
error_approve_review: Error approving review
|
37
|
+
feedback: Feedback
|
38
|
+
feedback_review_for: "Review: '%{review}'"
|
39
|
+
for: for
|
40
|
+
from: from
|
41
|
+
guideline_text: We reserve the right not to post opinions unrelated to your product
|
42
|
+
info_approve_review: Review approved
|
43
|
+
leave_us_a_review: Leave us a review and a rating
|
44
|
+
original_version: 'Original version'
|
45
|
+
out_of_5: "out of 5"
|
46
|
+
rating: rating
|
47
|
+
reviews: Reviews
|
48
|
+
review_content: Content
|
49
|
+
review_guidelines: Review Guidelines
|
50
|
+
review_management: Review Management
|
51
|
+
review_management_description: Manage the user-submitted reviews
|
52
|
+
review_name: Your Name
|
53
|
+
review_successfully_submitted: Review was successfully submitted
|
54
|
+
review_not_submitted: Review was not submitted
|
55
|
+
review_title: Title
|
56
|
+
spree_reviews:
|
57
|
+
review_settings: Review Settings
|
58
|
+
manage_review_settings: Control the display of reviews
|
59
|
+
preview_size: Size of the review snippets
|
60
|
+
include_unapproved: Include unapproved reviews in listings
|
61
|
+
show_email: Show email addresses
|
62
|
+
feedback_rating: Rate feedback
|
63
|
+
require_login: Require user to be logged in
|
64
|
+
your_name: Your name
|
65
|
+
your_location: Your location
|
66
|
+
star:
|
67
|
+
one: "1"
|
68
|
+
other: "%{count}"
|
69
|
+
stars: Stars
|
70
|
+
submit_your_review: Submit your review
|
71
|
+
submitted_on: Submitted on
|
72
|
+
terms_text: All opinions must comply with our terms and conditions
|
73
|
+
terms_and_conditions: Terms & Conditions
|
74
|
+
the_fine_print: The fine print
|
75
|
+
Unapproved_reviews: Unapproved
|
76
|
+
voice:
|
77
|
+
one: "1 voice"
|
78
|
+
other: "%{count} voices"
|
79
|
+
write_your_own_review: Write your own review
|
80
|
+
cancel_your_review: Cancel
|
81
|
+
was_this_review_helpful: "Was this review helpful to you?"
|
82
|
+
you_must_enter_value_for_rating: "You must enter a value for rating."
|
@@ -0,0 +1,83 @@
|
|
1
|
+
it:
|
2
|
+
activerecord:
|
3
|
+
attributes:
|
4
|
+
review:
|
5
|
+
name: Nome
|
6
|
+
title: Titolo
|
7
|
+
review: Contenuto
|
8
|
+
rating: Voto
|
9
|
+
created_at: Data
|
10
|
+
ip_address: IP
|
11
|
+
user: Utente
|
12
|
+
models:
|
13
|
+
review:
|
14
|
+
one: Recensione
|
15
|
+
other: "%{count} recensioni"
|
16
|
+
time:
|
17
|
+
formats:
|
18
|
+
default: "%a %d %b %Y, %H:%M:%S %z"
|
19
|
+
short: "%d %b %H:%M"
|
20
|
+
long: "%d %B %Y %H:%M"
|
21
|
+
review: "%a %d.%m.%Y"
|
22
|
+
hours: "%H:%M"
|
23
|
+
dow: "%A"
|
24
|
+
|
25
|
+
approve: Approvare
|
26
|
+
Approved_reviews: Approvata
|
27
|
+
approved_text: Unlocked comments will be published within 1-2 business days.
|
28
|
+
are_you_sure_review: Sei sicuro di eliminare la recensione ?
|
29
|
+
average_customer_rating: Voto medio
|
30
|
+
back_reviews: Torna alle recensioni
|
31
|
+
based_upon: basato su
|
32
|
+
reviews: recensioni
|
33
|
+
by: da
|
34
|
+
date_: Data
|
35
|
+
edited_version: 'Edited version'
|
36
|
+
editing_review_for: 'Editing review for'
|
37
|
+
error_approve_review: Errore durante l'approvazione della recensione
|
38
|
+
feedback: Feedback
|
39
|
+
feedback_review_for: "Recensione: '%{review}'"
|
40
|
+
for: per
|
41
|
+
from: da
|
42
|
+
guideline_text: We reserve the right not to post opinions unrelated to your product
|
43
|
+
info_approve_review: Review approved
|
44
|
+
leave_us_a_review: Lasciaci un commento e un voto
|
45
|
+
original_version: 'Original version'
|
46
|
+
out_of_5: "su 5"
|
47
|
+
rating: voto
|
48
|
+
review: Recensione
|
49
|
+
review_content: Contenuto
|
50
|
+
review_guidelines: Review Guidelines
|
51
|
+
review_management: Recensioni
|
52
|
+
review_management_description: Manage the user-submitted reviews
|
53
|
+
review_name: Your Name
|
54
|
+
review_successfully_submitted: La recensione è stata inviata correttamente
|
55
|
+
review_not_submitted: Non è stato possibile salvare la recensione
|
56
|
+
review_title: Title
|
57
|
+
spree_reviews:
|
58
|
+
review_settings: Impostazione recensioni
|
59
|
+
manage_review_settings: Control the display of reviews
|
60
|
+
preview_size: Size of the review snippets
|
61
|
+
include_unapproved: Include unapproved reviews in listings
|
62
|
+
show_email: Mostra indirizzo email
|
63
|
+
feedback_rating: Rate feedback
|
64
|
+
require_login: Devi essere loggato per procedere
|
65
|
+
your_name: Il tuo nome
|
66
|
+
your_location: La tua posizione
|
67
|
+
star:
|
68
|
+
one: "1"
|
69
|
+
other: "%{count}"
|
70
|
+
stars: Stelle
|
71
|
+
submit_your_review: Conferma
|
72
|
+
submitted_on: Inviata il
|
73
|
+
terms_text: All opinions must comply with our terms and conditions
|
74
|
+
terms_and_conditions: Terms & Conditions
|
75
|
+
the_fine_print: The fine print
|
76
|
+
Unapproved_reviews: Non approvata
|
77
|
+
voice:
|
78
|
+
one: "1 voice"
|
79
|
+
other: "%{count} voices"
|
80
|
+
write_your_own_review: Scrivi la tua recensione
|
81
|
+
cancel_your_review: Annulla
|
82
|
+
was_this_review_helpful: "Was this review helpful to you?"
|
83
|
+
you_must_enter_value_for_rating: "You must enter a value for rating."
|
data/config/routes.rb
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
Rails.application.routes.draw do
|
2
|
+
namespace :admin do
|
3
|
+
resources :feedback_reviews
|
4
|
+
resources :reviews do
|
5
|
+
member do
|
6
|
+
get :approve
|
7
|
+
end
|
8
|
+
resources :feedback_reviews
|
9
|
+
end
|
10
|
+
resource :review_settings
|
11
|
+
end
|
12
|
+
|
13
|
+
resources :products do
|
14
|
+
resources :reviews do
|
15
|
+
collection do
|
16
|
+
get :terms
|
17
|
+
get "submissionguidelines"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
#resources :reviews
|
22
|
+
|
23
|
+
match "/reviews/:review_id/feedback(.:format)" => "feedback_reviews#create", :via => :post, :as => "feedback_review"
|
24
|
+
match "/reviews/all_list", :to => "reviews#all_list", :as => :all_reviews
|
25
|
+
|
26
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateReviews < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :reviews do |t|
|
4
|
+
t.string :name, :location
|
5
|
+
t.integer :rating
|
6
|
+
t.text :review
|
7
|
+
t.boolean :approved, :default => false
|
8
|
+
|
9
|
+
t.references :product, :user
|
10
|
+
|
11
|
+
t.timestamps
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :reviews
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
class CreateFeedbackReviews < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
create_table :feedback_reviews do |t|
|
4
|
+
t.integer :rating, :default => 0
|
5
|
+
t.text :comment
|
6
|
+
|
7
|
+
t.references :user, :review
|
8
|
+
|
9
|
+
t.timestamps
|
10
|
+
end
|
11
|
+
add_index :feedback_reviews, :review_id
|
12
|
+
add_index :feedback_reviews, :user_id
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.down
|
16
|
+
drop_table :feedback_reviews
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
class AddRatingToProducts < ActiveRecord::Migration
|
2
|
+
def self.up
|
3
|
+
add_column :products, :avg_rating, :decimal, :default => 0.0, :null => false, :precision => 7, :scale => 5
|
4
|
+
add_column :products, :reviews_count, :integer, :default => 0, :null => false
|
5
|
+
end
|
6
|
+
|
7
|
+
def self.down
|
8
|
+
remove_column :products, :reviews_count
|
9
|
+
remove_column :products, :avg_rating
|
10
|
+
end
|
11
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_reviews_rating
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 267
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 70
|
9
|
-
-
|
10
|
-
version: 0.70.
|
9
|
+
- 6
|
10
|
+
version: 0.70.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Damiano Giacomello
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-03-
|
18
|
+
date: 2012-03-22 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: spree_core
|
@@ -174,6 +174,16 @@ files:
|
|
174
174
|
- app/views/shared/_review_summary.html.erb
|
175
175
|
- app/views/shared/_reviews.html.erb
|
176
176
|
- app/views/shared/_shortrating.html.erb
|
177
|
+
- db/migrate/20081020220724_create_reviews.rb
|
178
|
+
- db/migrate/20101222083309_create_feedback_reviews.rb
|
179
|
+
- db/migrate/20110406083603_add_rating_to_products.rb
|
180
|
+
- db/migrate/20120123141326_recalculate_ratings.rb
|
181
|
+
- config/initializers/constants.rb
|
182
|
+
- config/initializers/helpers.rb
|
183
|
+
- config/initializers/load_preferences.rb
|
184
|
+
- config/locales/en.yml
|
185
|
+
- config/locales/it.yml
|
186
|
+
- config/routes.rb
|
177
187
|
homepage: https://github.com/romul/spree-reviews/
|
178
188
|
licenses: []
|
179
189
|
|