My favorites | Sign in
Project Home Downloads Wiki Issues Source
READ-ONLY: This project has been archived. For more information see this post.
Search
for
  Advanced search   Search tips   Subscriptions

Issue 177 attachment: substruct-product-reviews-and-friend-mailer-1-0-a6.diff (45.3 KB)

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/admin/reviews_controller.rb substruct_new_features/vendor/plugins/substruct/app/controllers/admin/reviews_controller.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/admin/reviews_controller.rb 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/controllers/admin/reviews_controller.rb 2009-07-10 11:35:36.000000000 -0500
@@ -0,0 +1,30 @@
+class Admin::ReviewsController < Admin::BaseController
+
+ def index
+ redirect_to :action => "list"
+ end
+
+ def list
+ @title = "Pending Reviews"
+ @reviews = ProductReview.find(:all, :conditions => ["approved = ?", false])
+ end
+
+ def approve
+ if request.post?
+ @review = ProductReview.find(params[:id])
+ @review.approved = true
+ @review.save
+ flash[:notice] = "Review Approved."
+ end
+ redirect_to :action => "list"
+ end
+
+ def delete
+ if request.post?
+ ProductReview.delete(params[:id])
+ flash[:notice] = "Review Deleted."
+ end
+ redirect_to :action => "list"
+ end
+
+end
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/customers_controller.rb substruct_new_features/vendor/plugins/substruct/app/controllers/customers_controller.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/customers_controller.rb 2008-08-29 02:14:41.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/controllers/customers_controller.rb 2009-07-10 14:04:21.000000000 -0500
@@ -18,21 +18,18 @@
if customer = OrderUser.authenticate(params[:login], params[:password])
log_customer_in(customer)
flash[:notice] = "Login successful"
- # If we're modal return a page that just refreshes things.
- if @is_modal
- render :template => '/shared/modal_refresh', :layout => 'modal' and return
- else
- redirect_back_or_default :action => 'orders'
- end
+ redirect_back_or_default :action => 'orders' and return false
else
flash.now[:notice] = "Login unsuccessful"
+ if @is_modal
+ render :layout => 'modal'
+ end
end
- end
- # Can be called from the store page.
- # Prompts existing users to login.
- if @is_modal
- render :layout => 'modal'
- end
+ else
+ if @is_modal
+ render :layout => 'modal'
+ end
+ end
end

def logout
@@ -44,6 +41,7 @@
# Creates a new customer
#
def new
+ @is_modal = (params[:modal] == 'true')
@title = "New Account"
# Update account details
@customer = OrderUser.new
@@ -56,11 +54,17 @@
if session[:return_to]
redirect_to session[:return_to]
else
- redirect_to :action => 'wishlist' and return
+ redirect_to :action => 'wishlist'
end
else
flash.now[:notice] = "There was a problem creating your account."
- render and return
+ if @is_modal
+ render :layout => 'modal'
+ end
+ end
+ else
+ if @is_modal
+ render :layout => 'modal'
end
end
end
@@ -233,8 +237,8 @@

# PRIVATE METHODS ===========================================================
private
- # Makes sure customer is logged in before accessing stuff here.
- #
+ #Makes sure customer is logged in before accessing stuff here.
+
def login_required
if session[:customer]
return true
@@ -246,14 +250,14 @@

redirect_to :action =>"login" and return false
end
-
+
# store current uri in the session.
# we can return to this location by calling return_location
def store_location
session[:return_to] = request.request_uri
end
-
- # Move to the last store_location call or to the passed default one
+
+ # Move to the last store_location call or to the passed default one
def redirect_back_or_default(default)
if session[:return_to].nil?
redirect_to default
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/store_controller.rb substruct_new_features/vendor/plugins/substruct/app/controllers/store_controller.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/store_controller.rb 2008-08-29 02:14:41.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/controllers/store_controller.rb 2009-07-10 12:09:33.000000000 -0500
@@ -17,6 +17,8 @@
:checkout, :select_shipping_method, :view_shipping_method,
:set_shipping_method, :confirm_order, :finish_order
]
+
+ before_filter :login_required, :only => :add_review


if Preference.find_by_name('store_test_transactions').is_true?
@@ -136,6 +138,12 @@
:order => 'name ASC',
:conditions => 'quantity > 0'
)
+ @reviews = ProductReview.find(:all, :conditions => ["product_id = ? AND approved = ? AND review != ''", @product.id, true])
+ @num_reviews = @reviews.length
+ @num_ratings = ProductReview.count(:conditions => ["product_id = ? AND approved = ?", @product.id, true])
+ if @num_ratings > 0
+ @num_stars = ProductReview.average(:rating, :conditions => ['product_id = ? AND approved = ?', @product.id, true])
+ end
end

# Shows shopping cart in pop-up window.
@@ -343,6 +351,56 @@
end
render :layout => 'receipt' and return
end
+
+ def add_review
+ if params[:id] and @product = Product.find(params[:id])
+ @customer = OrderUser.find(session[:customer])
+ if ProductReview.find(:all, :conditions => ["order_user_id = :ouid and product_id = :pid", {:ouid => @customer.id, :pid => @product.id}]).length > 0
+ flash.now[:error] = "Sorry, it appears you have already rated or reviewed this product. Only one review per product per customer is allowed. "
+ render(:partial => 'error', :layout => 'modal') and return
+ elsif request.post?
+ @review = ProductReview.new(params[:product_review])
+ @review.product_id = @product.id
+ @review.order_user_id = @customer.id
+ if @review.review.empty? and @review.summary.empty?
+ # If the review and summary are empty, then we go ahead and approve it since there's no text to get in the way.
+ @review.approved = true
+ end
+ if @review.save
+ render(:partial => 'review_thank_you', :layout => 'modal') and return
+ else
+ flash.now[:error] = "Sorry, something went wrong while trying to save your review. Please make sure you chose a star-rating, or try again later. If this problem persists, please feel free to contact us."
+ render(:partial => 'error', :layout => 'modal') and return
+ end
+ else
+ @review = ProductReview.new
+ render(:partial => 'add_review', :layout => 'modal') and return
+ end
+ else
+ flash.now[:error] = "Sorry, we couldn't find the product you're looking to review."
+ render(:partial => 'error', :layout => 'modal') and return
+ end
+ end
+
+ def tell_a_friend
+ if request.post?
+ @product = Product.find(params[:id])
+ if params[:from_name].empty? or params[:from_email].empty? or params[:to_name].empty? or params[:to_email].empty?
+ flash[:error] = "Not all required fields were completed. Please fill them in and try again."
+ render :layout => 'modal' and return
+ else
+ TellSomeoneMailer.deliver_tell_someone(@product, params[:to_email], params[:to_name], params[:from_email], params[:from_name], params[:message])
+ redirect_to :action => 'thanks_tell_a_friend'
+ end
+ else
+ @product = Product.find(params[:id])
+ render :layout => 'modal' and return
+ end
+ end
+
+ def thanks_tell_a_friend
+ render :layout => 'modal' and return
+ end

#############################################################################
# PRIVATE METHODS
@@ -490,5 +548,31 @@
end
end
end
+
+ # PRIVATE METHODS ===========================================================
+ private
+ #Makes sure customer is logged in before accessing stuff here.
+
+ def login_required
+ if session[:customer]
+ return true
+ end
+
+ # store current location so that we can
+ # come back after the user logged in
+ store_location
+
+ if params[:modal] == "true"
+ redirect_to :controller=>"/customers", :action =>"login", :modal => true and return false
+ else
+ redirect_to :controller=>"/customers", :action =>"login" and return false
+ end
+ end
+
+ # store current uri in the session.
+ # we can return to this location by calling return_location
+ def store_location
+ session[:return_to] = request.request_uri
+ end

end
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/substruct_application_controller.rb substruct_new_features/vendor/plugins/substruct/app/controllers/substruct_application_controller.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/controllers/substruct_application_controller.rb 2008-08-29 02:14:41.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/controllers/substruct_application_controller.rb 2009-07-08 08:36:08.000000000 -0500
@@ -6,7 +6,9 @@
def self.included(base)
base.class_eval do
def cache
- $cache ||= SimpleCache.new 1.hour
+ if ENV['RAILS_ENV'] == "production"
+ $cache ||= SimpleCache.new 1.hour
+ end
end
end
end
@@ -69,5 +71,37 @@
def log_customer_in(customer)
session[:customer] = customer.id
end
+
+
+ # Moved in from the customer controller. I need the following to be available to the
+ # store controller as well, so might as well make it universal.
+ #
+ # def login_required
+ # if session[:customer]
+ # return true
+ # end
+ #
+ # # store current location so that we can
+ # # come back after the user logged in
+ # store_location
+ #
+ # redirect_to(:controller => "customers", :action =>"login") and return false
+ # end
+ #
+ # # store current uri in the session.
+ # # we can return to this location by calling return_location
+ # def store_location
+ # session[:return_to] = request.request_uri
+ # end
+ #
+ # # Move to the last store_location call or to the passed default one
+ # def redirect_back_or_default(default)
+ # if session[:return_to].nil?
+ # redirect_to default
+ # else
+ # redirect_to session[:return_to]
+ # session[:return_to] = nil
+ # end
+ # end

end
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/helpers/application_helper.rb substruct_new_features/vendor/plugins/substruct/app/helpers/application_helper.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/helpers/application_helper.rb 2008-08-15 23:10:24.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/helpers/application_helper.rb 2009-07-10 09:09:21.000000000 -0500
@@ -18,6 +18,25 @@
return output_str
end

+ def half_round(rating)
+ comparator = rating - rating.to_i
+ if comparator >= 0.66
+ return rating.to_i + 1
+ elsif comparator < 0.66 and comparator > 0.33
+ return rating.to_i + 0.5
+ else
+ return rating.to_i
+ end
+ end
+
+ def pluralizer(singular_word, count)
+ if count > 1
+ return singular_word.pluralize
+ else
+ return singular_word
+ end
+ end
+
# Overridden number_to_currency which can handle
# an array for price "ranges", as passed back by
# Product::display_price
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/order_user.rb substruct_new_features/vendor/plugins/substruct/app/models/order_user.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/order_user.rb 2008-06-15 02:28:08.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/models/order_user.rb 2009-07-09 10:27:46.000000000 -0500
@@ -20,6 +20,8 @@
:order => "created_on DESC"
has_many :items, :through => :wishlist_items,
:order => "wishlist_items.created_on DESC"
+
+ has_many :product_reviews, :dependent => :destroy

validates_presence_of :email_address, :message => ERROR_EMPTY
validates_length_of :email_address, :maximum => 255
@@ -31,7 +33,14 @@
validates_format_of :email_address,
:with => /^([^@\s]+)@((?:[-a-zA-Z0-9]+\.)+[a-zA-Z]{2,})$/,
:message => "Please enter a valid email address."
-
+
+ validates_presence_of :username, :message => ERROR_EMPTY
+ validates_uniqueness_of :username, :message => %q/
+ This username has already been taken in our system.<br\/>
+ If you have already ordered with us, please login.
+ /
+
+ validates_presence_of :first_name, :last_name, :message => ERROR_EMPTY

# We don't save passwords all the time when creating an account.
# Generate one before save if a new record
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/product.rb substruct_new_features/vendor/plugins/substruct/app/models/product.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/product.rb 2008-08-29 02:14:41.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/models/product.rb 2009-07-09 10:28:03.000000000 -0500
@@ -27,6 +27,8 @@
:after_add => :add_return_relation,
:after_remove => :remove_return_relation

+ has_many :product_reviews, :dependent => :destroy
+
def add_return_relation(relative)
relative.related_products << self unless relative.related_products.include?(self)
end
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/product_review.rb substruct_new_features/vendor/plugins/substruct/app/models/product_review.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/product_review.rb 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/models/product_review.rb 2009-07-09 10:27:15.000000000 -0500
@@ -0,0 +1,6 @@
+class ProductReview < ActiveRecord::Base
+ belongs_to :order_user
+ belongs_to :product
+
+ validates_presence_of :rating
+end
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/tell_someone_mailer.rb substruct_new_features/vendor/plugins/substruct/app/models/tell_someone_mailer.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/tell_someone_mailer.rb 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/models/tell_someone_mailer.rb 2009-07-07 09:21:43.000000000 -0500
@@ -0,0 +1,12 @@
+class TellSomeoneMailer < ActionMailer::Base
+
+ def tell_someone(product, to, to_name, from, from_name, message)
+ @subject = "#{from_name} wants to show you this product!"
+ @body = {:product => product, :message => message, :from => from_name}
+ @recipients = to
+ @from = from
+ @sent_on = Time.now
+ @headers = {}
+ end
+
+end
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/user.rb substruct_new_features/vendor/plugins/substruct/app/models/user.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/models/user.rb 2008-04-09 22:47:56.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/models/user.rb 2009-07-09 10:27:29.000000000 -0500
@@ -24,7 +24,7 @@
end
end

- @@salt = '20ac4d290c2293702c64b3b287ae5ea79b26a5c1'
+ @@salt = '57815a968b59f298487d05295727485b'
cattr_accessor :salt
attr_accessor :password_confirmation

diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/admin/reviews/_right_side.rhtml substruct_new_features/vendor/plugins/substruct/app/views/admin/reviews/_right_side.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/admin/reviews/_right_side.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/admin/reviews/_right_side.rhtml 2009-07-09 12:45:27.000000000 -0500
@@ -0,0 +1,16 @@
+<div id="right">
+ <h1>Help</h1>
+
+ <p>
+ When a customer rates a product, they have the option of also leaving a review. Ratings without reviews are
+ automatically approved, and you wont see them here. When a customer opts to leave a review in addition to a rating,
+ the review will queue up here for you to approve. This is only to provide a check for abuse of the system against
+ spam and other nastiness.
+ </p>
+
+ <p>
+ A customer must be signed into the system in order to leave a review.
+ </p>
+
+</div>
+<div class="clear">&nbsp;</div>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/admin/reviews/list.rhtml substruct_new_features/vendor/plugins/substruct/app/views/admin/reviews/list.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/admin/reviews/list.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/admin/reviews/list.rhtml 2009-07-10 11:33:33.000000000 -0500
@@ -0,0 +1,34 @@
+<div id="left">
+ <h1><%= @title %></h1>
+
+ <table class="list" cellpadding="0" cellspacing="0">
+ <tr>
+ <th>Info</th>
+ <th>Rating</th>
+ <th>Review</th>
+ <th> &nbsp; </th>
+ </tr>
+ <% for r in @reviews %>
+ <tr class="<%= alternate %>">
+ <td>
+ Product: <%= r.product.code %><br />
+ Customer: <%= r.order_user.last_name %>, <%= r.order_user.first_name %><br />
+ Username: <%= r.order_user.username %>
+ </td>
+ <td>
+ <%= r.rating %> Stars
+ </td>
+ <td>
+ <strong><%= r.summary %></strong> <br />
+ <%= r.review %>
+ </td>
+ <td>
+ <%= link_to "Approve", {:controller => "/admin/reviews", :action => "approve", :id => r.id}, :method => "post" %><br />
+ <%= link_to "Delete", {:controller => "/admin/reviews", :action => "delete", :id => r.id}, :method => "post", :confirm => "Are you CERTAIN you wish to delete this review? This CANNOT be undone." %>
+ </td>
+ </tr>
+ <% end %>
+ </table>
+</div>
+
+<%= render(:partial => 'right_side') %>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/admin/users/customers.rhtml substruct_new_features/vendor/plugins/substruct/app/views/admin/users/customers.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/admin/users/customers.rhtml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/admin/users/customers.rhtml 2009-07-09 09:19:19.000000000 -0500
@@ -9,6 +9,7 @@
<table class="list" cellpadding="0" cellspacing="0">
<tr>
<th>Customer Name</th>
+ <th>Username</th>
<th>E-mail Address</th>
<th class="numeric">Orders</th>
</tr>
@@ -18,6 +19,9 @@
<%= "#{c.last_name}," if !c.last_name.blank? %> <%= c.first_name %>
</td>
<td>
+ <%= "#{c.username}" if !c.username.blank? %>
+ </td>
+ <td>
<a href="mailto:<%= c.email_address %>"><%= c.email_address %></a>
</td>
<td class="numeric">
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/customers/_details_form.rhtml substruct_new_features/vendor/plugins/substruct/app/views/customers/_details_form.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/customers/_details_form.rhtml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/customers/_details_form.rhtml 2009-07-10 13:52:04.000000000 -0500
@@ -5,6 +5,24 @@
</p>

<p>
+ <%= make_label('First Name', true) %>
+ <%= text_field :customer, :first_name, :class => 'textInput' %>
+ <%= error_message_on(:customer, :first_name) %>
+</p>
+
+<p>
+ <%= make_label('Last Name', true) %>
+ <%= text_field :customer, :last_name, :class => 'textInput' %>
+ <%= error_message_on(:customer, :last_name) %>
+</p>
+
+<p>
+ <%= make_label('Username (Only used for display when leaving a product review)', true) %>
+ <%= text_field :customer, :username, :class => 'textInput' %>
+ <%= error_message_on(:customer, :username) %>
+</p>
+
+<p>
<%= make_label('Password', true) %>
<%= password_field :customer, :password, :class => 'textInput' %>
<%= error_message_on(:customer, :password) %>
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/customers/login.rhtml substruct_new_features/vendor/plugins/substruct/app/views/customers/login.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/customers/login.rhtml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/customers/login.rhtml 2009-07-10 13:49:40.000000000 -0500
@@ -1,6 +1,16 @@
+<%- if @is_modal -%>
+<div id="">
+<%- else -%>
<div id="left">
+<%- end -%>

<h1><%= @title %></h1>
+ <%- if @is_modal -%>
+ <div id="login-explanation">
+ Some areas of our website - such as the wishlist, order tracking, and leaving product reviews - require that
+ you have a customer account with us. Please log in.
+ </div>
+ <%- end -%>
<%= form_tag :action => 'login' %>
<div class="form_block">
<input type="hidden" name="modal" value="<%= params[:modal] %>" />
@@ -32,20 +42,13 @@
)
%>
</p>
- <% if !@is_modal %>
- <p>
- <%=
- link_to(
- "Not a customer yet?",
- {
- :controller => 'customers',
- :action => 'new'
- },
- :class => 'action'
- )
- %>
- </p>
- <% end %>
+ <p>
+ <%- if @is_modal -%>
+ <%= link_to("Not a customer yet?", {:controller => 'customers', :action => 'new', :modal => true}, :class => 'action') %>
+ <%- else -%>
+ <%= link_to("Not a customer yet?", {:controller => 'customers', :action => 'new'}, :class => 'action') %>
+ <%- end -%>
+ </p>

<div class="line">&nbsp;</div>

@@ -58,24 +61,16 @@
</form>
</div>

+<%- if !@is_modal -%>
<div id="right">
- <% if @is_modal %>
- <h3>Welcome Back</h3>
- <p class="hlt" style="padding:5px;">
- Please login so that we can load your checkout information.
- </p>
- <p>
- Use any order number from a past purchase.
- </p>
- <% else %>
- <h2>Directions</h2>
- <p>
- We need you to login before you can continue.
- </p>
- <p>
- Use any order number from a past purchase.
- </p>
- <% end %>
+ <h2>Directions</h2>
+ <p>
+ We need you to login before you can continue.
+ </p>
+ <p>
+ Use any order number from a past purchase.
+ </p>
</div>

-<div class="clear"></div>
\ No newline at end of file
+<div class="clear"></div>
+<%- end -%>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/customers/new.rhtml substruct_new_features/vendor/plugins/substruct/app/views/customers/new.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/customers/new.rhtml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/customers/new.rhtml 2009-07-10 13:58:01.000000000 -0500
@@ -1,6 +1,14 @@
+<%- if @is_modal -%>
+<div>
+<%- else -%>
<div id="left">
+<%- end -%>
<h1><%= @title %></h1>
- <%= form_tag :action => 'new' %>
+ <%- if @is_modal -%>
+ <%= form_tag :action => 'new', :modal => true %>
+ <%- else -%>
+ <%= form_tag :action => 'new' %>
+ <%- end -%>
<div class="form_block">
<%= render :partial => 'details_form' %>
<div class="line"></div>
@@ -12,9 +20,10 @@

</form>
</div>
-
+<%- if !@is_modal -%>
<div id="right">

</div>

-<div class="clear"></div>
\ No newline at end of file
+<div class="clear"></div>
+<%- end -%>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/layouts/admin.rhtml substruct_new_features/vendor/plugins/substruct/app/views/layouts/admin.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/layouts/admin.rhtml 2008-08-17 22:52:38.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/views/layouts/admin.rhtml 2009-07-09 10:44:21.000000000 -0500
@@ -60,6 +60,9 @@
<li class="<%= @cname == 'users' ? 'active' : '' %>">
<%= link_to_section "Users &amp; Customers", :controller=>"/admin/users" rescue nil %>
</li>
+ <li class="<%= @cname == 'reviews' ? 'active' : '' %>">
+ <%= link_to_section "Pending Reviews", :controller=>"/admin/reviews" rescue nil %>
+ </li>
</ul>
</div>

diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/layouts/modal.rhtml substruct_new_features/vendor/plugins/substruct/app/views/layouts/modal.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/layouts/modal.rhtml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/layouts/modal.rhtml 2009-07-06 12:35:43.000000000 -0500
@@ -8,7 +8,7 @@
end
-%></title>
<%= javascript_include_tag "prototype", "effects" %>
- <%= javascript_include_tag "substruct", :plugin => 'substruct' %>
+ <%= javascript_include_tag "substruct", :plugin => 'substruct' %>
<%= stylesheet_link_tag "main", :plugin => 'substruct' %>
<style type="text/css">
body {
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/_add_review.rhtml substruct_new_features/vendor/plugins/substruct/app/views/store/_add_review.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/_add_review.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/store/_add_review.rhtml 2009-07-10 11:19:41.000000000 -0500
@@ -0,0 +1,37 @@
+<h1>Rate and Review</h1>
+<h2>Tell us what you think about this product.</h2>
+
+<p>
+ We'd love to know what you think about the products we carry. You can either simply give us a rating from one to five stars, or
+ you can write a full review for the benefit of all our shoppers. One star is the worst rating you can give, five stars is the Best.
+</p>
+
+<%- form_for :product_review, :url => {:action => 'add_review'} do |form| -%>
+<fieldset class="review-and-rating">
+ <div class="field-row">
+ <div class="description">*Rating:</div>
+ <div class="value">
+ <% options = [['1 Star', 1], ['2 Stars', 2], ['3 Stars', 3], ['4 Stars', 4], ['5 Stars', 5]] %>
+ <%= form.select :rating, options, { :include_blank => true } %>
+ </div>
+ </div>
+ <div class="field-row">
+ <div class="description">Summary or Title:</div>
+ <div class="value">
+ <%= form.text_field :summary %>
+ </div>
+ </div>
+ <div class="field-row">
+ <div class="description">Full Review:</div>
+ <div class="value">
+ <%= form.text_area :review %>
+ </div>
+ </div>
+ <div class="field-row">
+ <div class="description"> &nbsp; </div>
+ <div class="value">
+ <%= submit_tag "Submit Rating/Review", :class => ".form-submit" %>
+ </div>
+ </div>
+</fieldset>
+<%- end -%>
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/_error.rhtml substruct_new_features/vendor/plugins/substruct/app/views/store/_error.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/_error.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/store/_error.rhtml 2009-07-08 11:13:33.000000000 -0500
@@ -0,0 +1 @@
+<div class="error"><%= flash[:error] %></div>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/_review_thank_you.rhtml substruct_new_features/vendor/plugins/substruct/app/views/store/_review_thank_you.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/_review_thank_you.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/store/_review_thank_you.rhtml 2009-07-08 15:19:45.000000000 -0500
@@ -0,0 +1,7 @@
+<h1>Thank You!</h1>
+<h2>Your rating/review has been submitted!</h2>
+<p>
+ We appreciate you taking the time to rate and/or review our product and provide feedback about the products we carry.
+ If you provided a full review, it will be presented to our site admins for approval. We don't censor anything, we just
+ make sure our review system is not abused by spammers. Thanks again!
+</p>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/show.rhtml substruct_new_features/vendor/plugins/substruct/app/views/store/show.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/show.rhtml 2008-08-11 05:35:38.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/app/views/store/show.rhtml 2009-07-10 14:54:13.000000000 -0500
@@ -33,8 +33,28 @@
<div>
<%= get_markdown(@product.description) %>
</div>
+ <%- if @num_ratings > 0 -%>
+ <div>
+ <%= image_tag "#{half_round(@num_stars)}.stars.gif", :plugin => "substruct" %><span class="rating-basis">Based on <%= @num_ratings %> <%= pluralizer "rating", @num_ratings %></span>
+ </div>
+ <%- end -%>

<div class="clear"></div>
+ <%- if @num_reviews > 0 -%>
+ <h2 class="top-dashed-border">Product Reviews</h2>
+ <%- @reviews.each do |review| -%>
+ <div class="product-review">
+ <h3 class="review-summary"><%= h review.summary %></h3>
+ <p class="byline">
+ <%= image_tag "#{review.rating}.stars.gif", :plugin => "substruct" %><span class="rating-basis">Review By <%= review.order_user.username %> on <%= review.created_at.strftime("%B %d, %Y") %></span>
+ </p>
+ <p class="review-body">
+ <%= h review.review %>
+ </p>
+ </div>
+ <%- end -%>
+ <%- end -%>
+ <div class="clear"></div>
<% if @product.related_products.size > 0 %>
<br/>
<h2>Related Products</h2>
@@ -42,6 +62,7 @@
<%= render :partial => 'product', :collection => @product.related_products %>
<div class="clear"></div>
<% end %>
+

</div>

@@ -122,6 +143,12 @@
)
%>
</p>
+ <p>
+ <%= link_to('Tell a Friend about this product!', { :controller => 'store', :action => 'tell_a_friend', :id => @product.id }, :class => 'submodal-600-475 action') %>
+ </p>
+ <p>
+ <%= link_to('Rate or Review this product!', { :controller => 'store', :action => 'add_review', :id => @product.id, :modal => true }, :class => 'submodal-600-475 action') %>
+ </p>
</div>

</div>
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/tell_a_friend.rhtml substruct_new_features/vendor/plugins/substruct/app/views/store/tell_a_friend.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/tell_a_friend.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/store/tell_a_friend.rhtml 2009-07-07 09:50:47.000000000 -0500
@@ -0,0 +1,39 @@
+<% form_tag "/store/tell_a_friend/#{params[:id]}" do -%>
+ <h1>Tell A Friend</h1>
+ <h2><%= @product.name %></h2>
+ <fieldset class="tell-a-friend">
+ <%- if flash[:error] -%>
+ <div class="error">
+ <%= flash[:error] %>
+ </div>
+ <%- end -%>
+ <p>
+ We'll send an email on your behalf to tell someone about this product. Just fill in the information below and we'll do the rest.
+ We wont use any information you provide us here to spam anyone, nor will we even store it. Fields marked with an asterisk (*) are required.
+ </p>
+ <div class="field-row">
+ <div class="description">*Your Name:</div>
+ <div class="value"><%= text_field_tag 'from_name', params["from_name"] %></div>
+ </div>
+ <div class="field-row">
+ <div class="description">*Your Email:</div>
+ <div class="value"><%= text_field_tag 'from_email', params["from_email"] %></div>
+ </div>
+ <div class="field-row">
+ <div class="description">*Your Friend's Name:</div>
+ <div class="value"><%= text_field_tag 'to_name', params["to_name"] %></div>
+ </div>
+ <div class="field-row">
+ <div class="description">*Your Friend's Email:</div>
+ <div class="value"><%= text_field_tag 'to_email', params["to_email"] %></div>
+ </div>
+ <div class="field-row">
+ <div class="description">An Optional Message:</div>
+ <div class="value"><%= text_area_tag 'message', params["message"] %></div>
+ </div>
+ <div class="field-row">
+ <div class="description"> &nbsp; </div>
+ <div class="value"><%= submit_tag 'Send Email', :class => 'form-submit' %></div>
+ </div>
+ </fieldset>
+<% end -%>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/thanks_tell_a_friend.rhtml substruct_new_features/vendor/plugins/substruct/app/views/store/thanks_tell_a_friend.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/store/thanks_tell_a_friend.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/store/thanks_tell_a_friend.rhtml 2009-07-07 09:53:35.000000000 -0500
@@ -0,0 +1,5 @@
+<h1>Thank You</h1>
+
+<p>
+ We've sent the email you requested and appreciate your enthusiasm for our products!
+</p>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/tell_someone_mailer/tell_someone.rhtml substruct_new_features/vendor/plugins/substruct/app/views/tell_someone_mailer/tell_someone.rhtml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/app/views/tell_someone_mailer/tell_someone.rhtml 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/app/views/tell_someone_mailer/tell_someone.rhtml 2009-07-07 10:22:00.000000000 -0500
@@ -0,0 +1,15 @@
+<%= @from %> asked us to email and let you know about a product we have at All Things BBQ.
+<% debugger %>
+<% if !@message.empty? %>
+<%= @from %> said: <%= @message %>
+<% end -%>
+
+----------------------------------------
+
+http://mydomain.mytld/store/show/<%= @product.code %>
+
+<%= @product.name %>
+
+<%= @product.description %>
+
+Check it out at: http://mydomain.mytld/store/show/<%= @product.code %>
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/1.5.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/1.5.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/1.5.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/1.5.stars.gif 2009-07-10 13:01:29.000000000 -0500
@@ -0,0 +1,4 @@
+GIF89aP¢èÌ`à¸%ïېÞÙÿÿÿõê½ùòÖýúð!ù,PÿHºûp+9ÂF“5”GA!*Fàœ„P²äÁ¦V8Œ›â¯ž”JYHƒ@ÍrûH.žZцCÁ…KªR”€Ü`كã ã…C2áÀr‚a›s¡
2d]„8†M†„-†X\w2
&‚h‘•&B?!JM„ ¡8jd¡ u
+>/Y~‘8€P©mjk¯Ÿ¡…H ©¨ >g¶µ
+ÆÁÂ$!Zƒ £Ò
+QX Ú 7KÃ1.yeºJÉÊæ×¼á@%é#ð)aÝUÈ҅ð .@ˆ6o„›q(©€! UØ3ÐE–FØEèô#A?A*Ð])kcHCâ’”£Ú8dîÅSQÑ !âpù§€ÌA2r¼ {³¯WÎ5Go&è¦1a–0MVài;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/1.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/1.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/1.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/1.stars.gif 2009-07-10 13:01:04.000000000 -0500
@@ -0,0 +1,4 @@
+GIF89aP¢ðܕéÌcà¸&÷ìÅÿÿÿÞÙúôßýûò!ù,PÿHºûp+9ÀF“5†§B'‚#*€@­d¸©8øŠá¯G×¢ŸJDÈ,¤B)˜"ÁJ®ƒ‡ÔêYn­áÓÂ)SˆaÐ=Üé–ÓÊà&Ç ‡Dyâ„q—MŠ^‚8„?8/]ˆ,„%R€.ŽR
Ž!7„2‹%›‚¢£8jYj?/ª¨
+;—8x#K°²¡£ƒ­m‘“ )xg©)­º@ tÁ1¢¥ÐÑV
+4ZÉXÈÛ´G;ؼJáyÍHZ(&Z4Ø
+7qòÊ҃é÷f|UÈ7  7x ‘1€¢_ÿvsä¨@…,ެAhÂé;ÑDIT”=)pÁ&P€.¾S¤Þ¡;]ÂmJāQµ•ŠÄÁ‚ªÁ­ ät™èÃO“E·@È’Ф ;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/2.5.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/2.5.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/2.5.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/2.5.stars.gif 2009-07-10 13:01:55.000000000 -0500
@@ -0,0 +1,6 @@
+GIF89aP¢ïގ߸"ÞØèÍ^ÿÿÿõë¼ùòÕýúð!ù,PÿHº6ûp+1ÀF¬#02Tx)’êx¨Fušš£lƁò¾P¤ t4Û­3•вQô"‡‚uìž
+LNp ¯Ev+Œ¾SÂAÌB}Ó -*ë5¼r\d]65J‚ƒ{€\Œ€g/
J <(/[v†ˆˆ6icŸdv
+ž‚3V™r(~o
+›2x ¯¨Ÿ(F¤¦ ºh¹W·­5Ã,#Sº¥¶r¾ ªÁ©
+ÅUÍÝ.VqÚ»ØÙ¿ÔÜè$ífÞÌ5qfԁ‚á V»¦U@'`$j(àDzi®Z2KÉ¡
+œ,‚©hñ=
µxflÈòÐCɸ[v(ñ‚à ÓBBaÀ³GZþV(ò›³câ&ôŒ eÁ âÙ¤NÁQ[ZJ$;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/2.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/2.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/2.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/2.stars.gif 2009-07-10 13:01:40.000000000 -0500
@@ -0,0 +1,7 @@
+GIF89aP¢ß¸$èÍaïÜ‘ÞØÿÿÿõê¼ùòÖýúï!ù,PÿHºûp…+9ÂF“5†§%œŠP²äÁ¦V¨ëIµv¨Q
+íBҀ'ºát¼—‡äBjhÄÈ¡àR-‰C°|ÙâÀq¥©ë…C¢¨ÂjWEp¡
2;^f_8N8„…*2]w2
8/‚h‚!C@HŽ<NŠ Œ#ƒ _‘b~
+C€T
+<y *!Ÿ¥|J¹Lµr7E(D´Â³»Rk$H[½Ç¤„¾)ÄÓÇ7=?Ù£´UÔKi7¹ÒÄ?©Ä)ð
+7ríÇСà}úÕëÚ ‹3­Ç‚Y⼫pƒMBY$IP¡“$zÚ(%{ðM9¬~<|€„ 
+g҂£€¬,†LxÉoGšGHZ»€ïÕ’ ¢ø©
+N9„ö9·à¨‚;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/3.5.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/3.5.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/3.5.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/3.5.stars.gif 2009-07-10 13:02:31.000000000 -0500
@@ -0,0 +1,7 @@
+GIF89aP¢ß¸åÉHÿÿþÞÙùòÓôé¯ïáëÔr!ù,Pÿ(ºtûp«h6“£!Tx€)œ9‚&8Œª#£iX ´Ð³ät5^¯3 3¨WHf˜U
+‡¦ø@†ÜÀ˜Xqôp&¤ƒj·p¾ln¿ƒWpD·<?JJ\ }pc†‰q9 6#“
+Y<l~Qœ‹H6¢…\h¡q ACA2—ƒ¦[Z¢(-
+¥¦7 ³c-yC%R©Š§·…º¿ªµU2¯ gCuÍNÏиK¶Ê‹Ø
+œÖu©Úä‹îðNô¨ïl$W)nª¼3ô)‚ý”‹ào
+ªä"éK <˜Eq(,‚
}=Ô 
+?@"2² ¬,Ìöýr ¡M „ùfÀœ=_&(H;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/3.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/3.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/3.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/3.stars.gif 2009-07-10 13:02:06.000000000 -0500
@@ -0,0 +1,4 @@
+GIF89aP¢ÿÿÿÞ·éÑgðà—ÞØ÷ïÊüùìâÁ9!ù,Pÿº%ûp‰+h6šá0"\XG(‘*0‚êét'ڎ¬Øz0‡¸Bç ä25Þ°x´ƒ€F:ü†‘éLÁhýx[#ÊûȆI†´ÃЩè„îÚíÆc~;I€‚ 8†‚OrP
+r;B”(r0xD^Œ€‰" ¡ƒ“¥‡( 5_X#>u (˜©d´#¡ª%¸« V´¿W}®#_5¼ÁD¼F¾¨E¦£'¾>/QÈѦƨÒã‡åVÙR'º)ÖäQçÄ
+öëPn@4YÅ
4!ò¦Ð2~
•`ñ±ÅÇ@züX @«5Æô àPÍ)I¼€ŒPƒä"ìFl°ÃšmOö NJŸ
+”acÀÓ5ŒfˆNI;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/4.5.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/4.5.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/4.5.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/4.5.stars.gif 2009-07-10 13:02:56.000000000 -0500
@@ -0,0 +1,5 @@
+GIF89aP¢ÞØÿÿþñåžÞ·æÎQøñÌëÚsâÂ6!ù,PÿºEûpkh6“£)B Tx
‡)’ê1€f1pŒª#Úi( 7“ëÕqtÐ4:Ò2F¤åG88"Cî8 | Áöx˜ÀÙ-Ð{Vd\‚ }'³ù
+øù@J}~\@=9|…€,CŠ€?€.e6…œ\=c\%›¢žn„¢k ¡O2 ¥A¬¦²œ´“·W p•µg2ªŸM³O ¶³È¨Çp4DÂÌͪÙNÓ΋%?~ÕÐâ‹Àæ»ÞëGí óàÎr½éŒ|õ
+¬ù»a`
‚bd%^.>s¦[Ø%ÌrÍm8„%Ŝ
+‡(ÐH1\ª@`¤;/Xö=XYîÆ
+Ùäú ;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/4.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/4.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/4.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/4.stars.gif 2009-07-10 13:02:45.000000000 -0500
@@ -0,0 +1,4 @@
+GIF89aP¢ñäŸÞ·ÞØÿÿþæÍQøñÎëÖuâÁ5!ù,Pÿ8ºEûpëh6“#(BTx‡)’ê€fpŒª#Úi7“³¸ºŒ
h!i™cÒ" €!‡  EEÀE^?-ø
´Ç.ý(l©ß–€~@K@€~=}†ˆ~.‚‡‚,x(0–W6‡ž]=eŸ]%¤ 
+?¨l32 §ŸA N¤ƒuŒ¶¡o½ž^C%³ ¬Â¿¸Ë’ÆÊºÍÀÓšaCnq’X ?ºFÏO܁ÑßÉÔãHãLåñïí°ðV“~õ ù÷¢Áa
+
+ømF"d mBM›1Ð4ñ$–2r0T0äʅaÈD»S¦,_<Ì!FÍÊÊ-×Ðm€‘;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/5.stars.gif substruct_new_features/vendor/plugins/substruct/assets/images/5.stars.gif
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/images/5.stars.gif 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/images/5.stars.gif 2009-07-10 13:03:06.000000000 -0500
@@ -0,0 +1,4 @@
+GIF89aP¢èÔañæžÿÿþÞ¶ÞÛøòËÞÈãÇ;!ù,Pÿ(ºûp«h6â Aá
+0Pà5e8¦Çð•Å Ær)®óPsŽ–-œ¥eZbÅpP$eˆÆJ¯øƒ4ˆ_àÅÜÔ WqefO[ˆ«[½:ði¢Ò™ g;…fÇËí?7:~v:Aƒ…†=†~I>4„~;"”•x‡dŠšr?ŽŸxE
+X£:4ŸTw•M¬Ÿ;¢š®¨•œ™›J-¹Q&ÀYc·°›U»ÅN§Ñ½Ó ÍECՅ¦ÍY×
+=Åf”Þä`„Úwéë çó"¤ï††Ïü1qO ­NéÕ8fҖëxDŸ‡>4hiq X›U±;p
@D<ŒG±d˳RV8 rL ;
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/assets/stylesheets/main.css substruct_new_features/vendor/plugins/substruct/assets/stylesheets/main.css
--- substruct_rel_1-0-a6/vendor/plugins/substruct/assets/stylesheets/main.css 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/assets/stylesheets/main.css 2009-07-10 13:05:03.000000000 -0500
@@ -948,3 +948,77 @@
color: #f86d0a;
}

+/* FORM CONTAINER */
+
+.field-row {
+ clear:both;
+ padding-top: .5em;
+}
+
+.field-row .description {
+ text-align: right;
+ width: 28%;
+ float: left;
+}
+
+.field-row .value {
+ width: 68%;
+ padding-left: 2%;
+ float: left;
+}
+
+/* Tell-A-Friend */
+.tell-a-friend {
+ border: none;
+}
+
+.tell-a-friend input {
+ width: 200px;
+}
+
+.tell-a-friend textarea {
+ width: 250px;
+ height: 75px;
+}
+
+.tell-a-friend .form-submit {
+ width: 125px;
+}
+
+/* Prodct Review */
+
+.review-and-rating {
+ border: none;
+}
+
+.review-and-rating select {
+ width: 150px;
+}
+
+.review-and-rating textarea {
+ width: 250px;
+ height: 150px;
+}
+
+.review-and-rating .form-submit {
+ width: 125px;
+}
+
+.rating-basis {
+ font-size: 0.9em;
+ height: 14px;
+ color: #888;
+ line-height: 14px;
+ vertical-align: +10%;
+ margin-left: 1em;
+}
+
+.top-dashed-border {
+ padding-top: 1em;
+ border-top: dashed 2px #ccc;
+}
+
+.product-review {
+ padding-bottom: 1em;
+ border-bottom: dashed 1px #ddd;
+}
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/db/bootstrap/rights.yml substruct_new_features/vendor/plugins/substruct/db/bootstrap/rights.yml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/db/bootstrap/rights.yml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/db/bootstrap/rights.yml 2009-07-09 11:56:51.000000000 -0500
@@ -119,3 +119,8 @@
actions: "*"
id: 19
controller: promotions
+right_00025:
+ name: Reviews - Admin
+ actions: "*"
+ id: 25
+ controller: reviews
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/db/bootstrap/rights_roles.yml substruct_new_features/vendor/plugins/substruct/db/bootstrap/rights_roles.yml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/db/bootstrap/rights_roles.yml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/db/bootstrap/rights_roles.yml 2009-07-09 12:22:11.000000000 -0500
@@ -35,3 +35,6 @@
join_00001:
role_id: "1"
right_id: "4"
+join_00012:
+ role_id: "1"
+ right_id: "25"
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/db/bootstrap/users.yml substruct_new_features/vendor/plugins/substruct/db/bootstrap/users.yml
--- substruct_rel_1-0-a6/vendor/plugins/substruct/db/bootstrap/users.yml 2008-02-08 23:04:33.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/db/bootstrap/users.yml 2009-06-30 16:49:02.000000000 -0500
@@ -1,5 +1,5 @@
---
user_00001:
id: 1
- password: 652b1b54a914207f0cfd15de1967d8ebe26c1b94
+ password: 76a2f7b59c6d65f0f6ce89a90e37bcf38b825eb3
login: admin
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/db/migrate/033_add_product_reviews.rb substruct_new_features/vendor/plugins/substruct/db/migrate/033_add_product_reviews.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/db/migrate/033_add_product_reviews.rb 1969-12-31 18:00:00.000000000 -0600
+++ substruct_new_features/vendor/plugins/substruct/db/migrate/033_add_product_reviews.rb 2009-07-10 11:16:41.000000000 -0500
@@ -0,0 +1,23 @@
+# Add fields necessary to hold product review data
+#
+class AddProductReviews < ActiveRecord::Migration
+ def self.up
+ create_table "product_reviews", :force => true do |t|
+ t.integer "rating", :null => false
+ t.string "summary", :null => true
+ t.text "review", :null => true
+ t.boolean "approved", :default => false, :null => false
+ t.integer "product_id", :null => false
+ t.integer "order_user_id", :null => false
+ t.timestamps
+ end
+
+ add_index "product_reviews", ["product_id"], :name => "rpid"
+ add_index "product_reviews", ["order_user_id"], :name => "ouid"
+ end
+
+ def self.down
+ drop_table :product_reviews
+ end
+
+end
\ No newline at end of file
diff -Naur substruct_rel_1-0-a6/vendor/plugins/substruct/db/schema.rb substruct_new_features/vendor/plugins/substruct/db/schema.rb
--- substruct_rel_1-0-a6/vendor/plugins/substruct/db/schema.rb 2008-08-29 02:14:41.000000000 -0500
+++ substruct_new_features/vendor/plugins/substruct/db/schema.rb 2009-07-10 11:16:51.000000000 -0500
@@ -297,5 +297,18 @@

add_index "wishlist_items", ["order_user_id"], :name => "user"
add_index "wishlist_items", ["item_id"], :name => "item"
+
+ create_table "product_reviews", :force => true do |t|
+ t.integer "rating", :null => false
+ t.string "summary", :null => true
+ t.text "review", :null => true
+ t.boolean "approved", :default => false, :null => false
+ t.integer "product_id", :null => false
+ t.integer "order_user_id", :null => false
+ t.timestamps
+ end
+
+ add_index "product_reviews", ["product_id"], :name => "rpid"
+ add_index "product_reviews", ["order_user_id"], :name => "ouid"

end
Powered by Google Project Hosting