solidus_reviews 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rubocop.yml +322 -0
- data/.travis.yml +27 -14
- data/Gemfile +23 -8
- data/LICENSE.md +2 -2
- data/README.md +9 -11
- data/Rakefile +2 -0
- data/app/controllers/spree/admin/feedback_reviews_controller.rb +3 -1
- data/app/controllers/spree/admin/review_settings_controller.rb +3 -1
- data/app/controllers/spree/admin/reviews_controller.rb +9 -6
- data/app/controllers/spree/feedback_reviews_controller.rb +25 -19
- data/app/controllers/spree/products_controller_decorator.rb +2 -0
- data/app/controllers/spree/reviews_controller.rb +11 -7
- data/app/helpers/spree/api/api_helpers_decorator.rb +12 -0
- data/app/helpers/spree/reviews_helper.rb +15 -5
- data/app/models/spree/feedback_review.rb +5 -4
- data/app/models/spree/product_decorator.rb +5 -4
- data/app/models/spree/review.rb +28 -10
- data/app/models/spree/reviews_ability.rb +17 -3
- data/app/models/spree/reviews_configuration.rb +16 -8
- data/app/models/spree/user_decorator.rb +3 -0
- data/app/overrides/add_reviews_after_product_properties.rb +7 -5
- data/app/overrides/add_reviews_tab_to_admin.rb +12 -4
- data/app/overrides/add_reviews_to_admin_configuration_sidebar.rb +13 -5
- data/app/views/spree/admin/feedback_reviews/index.html.erb +9 -9
- data/app/views/spree/admin/review_settings/edit.html.erb +64 -35
- data/app/views/spree/admin/reviews/_form.html.erb +26 -5
- data/app/views/spree/admin/reviews/edit.html.erb +2 -2
- data/app/views/spree/admin/reviews/index.html.erb +100 -88
- data/app/views/spree/api/reviews/_review.json.jbuilder +8 -0
- data/app/views/spree/api/reviews/index.json.jbuilder +6 -0
- data/app/views/spree/api/reviews/show.json.jbuilder +3 -0
- data/app/views/spree/feedback_reviews/_form.html.erb +5 -5
- data/app/views/spree/feedback_reviews/_summary.html.erb +3 -3
- data/app/views/spree/feedback_reviews/create.js.erb +2 -2
- data/app/views/spree/reviews/_form.html.erb +15 -10
- data/app/views/spree/reviews/new.html.erb +2 -2
- data/app/views/spree/shared/_rating.html.erb +3 -3
- data/app/views/spree/shared/_review.html.erb +29 -19
- data/app/views/spree/shared/_review_summary.html.erb +3 -3
- data/app/views/spree/shared/_reviews.html.erb +6 -6
- data/app/views/spree/shared/_shortrating.html.erb +2 -2
- data/bin/rails +4 -2
- data/config/initializers/constants.rb +2 -0
- data/config/initializers/load_preferences.rb +2 -0
- data/config/locales/de-CH.yml +14 -1
- data/config/locales/de.yml +14 -1
- data/config/locales/en-GB.yml +14 -2
- data/config/locales/en.yml +14 -1
- data/config/locales/es.yml +14 -2
- data/config/locales/fr.yml +14 -2
- data/config/locales/it.yml +79 -0
- data/config/locales/pl.yml +14 -2
- data/config/locales/pt-BR.yml +14 -2
- data/config/locales/pt.yml +14 -2
- data/config/locales/ro.yml +15 -3
- data/config/locales/ru.yml +14 -2
- data/config/locales/sv.yml +14 -1
- data/config/locales/tr.yml +14 -2
- data/config/locales/uk.yml +14 -1
- data/config/locales/zh-CN.yml +14 -1
- data/config/locales/zh-TW.yml +14 -1
- data/config/routes.rb +18 -1
- data/db/migrate/20081020220724_create_reviews.rb +4 -2
- data/db/migrate/20101222083309_create_feedback_reviews.rb +5 -3
- data/db/migrate/20110406083603_add_rating_to_products.rb +7 -5
- data/db/migrate/20110606150524_add_user_to_reviews.rb +4 -2
- data/db/migrate/20110806093221_add_ip_address_to_reviews.rb +3 -1
- data/db/migrate/20120110172331_namespace_tables.rb +3 -1
- data/db/migrate/20120123141326_recalculate_ratings.rb +6 -5
- data/db/migrate/20120712182514_add_locale_to_reviews.rb +4 -2
- data/db/migrate/20120712182627_add_locale_to_feedback_reviews.rb +4 -2
- data/db/migrate/20140703200946_add_show_identifier_to_reviews.rb +3 -1
- data/db/migrate/20190613165528_add_verified_purchaser_to_reviews.rb +5 -0
- data/lib/controllers/spree/api/reviews_controller.rb +111 -0
- data/lib/generators/solidus_reviews/install/install_generator.rb +5 -4
- data/lib/solidus_reviews.rb +3 -1
- data/lib/solidus_reviews/factories.rb +3 -1
- data/lib/solidus_reviews/factories/feedback_review_factory.rb +6 -5
- data/lib/solidus_reviews/factories/review_factory.rb +19 -9
- data/lib/spree_reviews/engine.rb +7 -0
- data/solidus_reviews.gemspec +20 -18
- data/spec/controllers/admin/feedback_reviews_controller_spec.rb +9 -7
- data/spec/controllers/admin/review_settings_controller_spec.rb +18 -16
- data/spec/controllers/admin/reviews_controller_spec.rb +18 -16
- data/spec/controllers/feedback_reviews_controller_spec.rb +29 -25
- data/spec/controllers/products_controller_spec.rb +4 -2
- data/spec/controllers/reviews_controller_spec.rb +67 -40
- data/spec/controllers/spree/api/reviews_controller_spec.rb +233 -0
- data/spec/features/admin_spec.rb +3 -0
- data/spec/features/reviews_spec.rb +27 -11
- data/spec/helpers/review_helper_spec.rb +3 -2
- data/spec/models/feedback_review_spec.rb +19 -17
- data/spec/models/product_spec.rb +41 -19
- data/spec/models/review_spec.rb +100 -42
- data/spec/models/reviews_ability_spec.rb +10 -8
- data/spec/models/reviews_configuration_spec.rb +28 -19
- data/spec/spec_helper.rb +21 -35
- data/vendor/assets/javascripts/jquery.rating.js +389 -376
- metadata +108 -59
@@ -1,5 +1,13 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
Spree::Backend::Config.configure do |config|
|
4
|
+
config.menu_items.detect { |menu_item|
|
5
|
+
menu_item.label == :settings
|
6
|
+
}.sections << :review_settings
|
7
|
+
end
|
8
|
+
|
9
|
+
Deface::Override.new(virtual_path: "spree/admin/shared/_settings_sub_menu",
|
10
|
+
name: "converted_admin_configurations_menu",
|
11
|
+
insert_bottom: "[data-hook='admin_settings_sub_tabs']",
|
12
|
+
text: "<%= tab :reviews, url: spree.edit_admin_review_settings_path, match_path: /review_settings/ %>",
|
13
|
+
disabled: false)
|
@@ -1,9 +1,9 @@
|
|
1
1
|
<% content_for :page_title do %>
|
2
|
-
<%=
|
2
|
+
<%= I18n.t("spree.feedback_review_for", review: @review.title) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% content_for :page_actions do %>
|
6
|
-
<li><%=
|
6
|
+
<li><%= link_to I18n.t("spree.back_to_reviews"), admin_reviews_path %></li>
|
7
7
|
<% end %>
|
8
8
|
|
9
9
|
<% render 'spree/admin/shared/product_sub_menu' %>
|
@@ -18,20 +18,20 @@
|
|
18
18
|
</colgroup>
|
19
19
|
<thead>
|
20
20
|
<tr>
|
21
|
-
<th><%=
|
22
|
-
<th><%=
|
23
|
-
<th><%=
|
24
|
-
<th></th>
|
21
|
+
<th><%= I18n.t("spree.user") %></th>
|
22
|
+
<th><%= I18n.t("spree.stars") %></th>
|
23
|
+
<th><%= I18n.t("spree.date") %></th>
|
24
|
+
<th class="actions"></th>
|
25
25
|
</tr>
|
26
26
|
</thead>
|
27
27
|
<tbody>
|
28
28
|
<%- @collection.each do |feedback| -%>
|
29
29
|
<tr id="<%= dom_id(feedback) %>">
|
30
30
|
<td><%= l feedback.created_at %></td>
|
31
|
-
<td><%= feedback.user.try(:login) ||
|
31
|
+
<td><%= feedback.user.try(:login) || I18n.t("spree.anonymous") %></td>
|
32
32
|
<td><%= feedback.rating %></td>
|
33
33
|
<td class="actions">
|
34
|
-
<%= link_to_delete feedback, :
|
34
|
+
<%= link_to_delete feedback, no_text: true %>
|
35
35
|
</td>
|
36
36
|
</tr>
|
37
37
|
<% end %>
|
@@ -39,6 +39,6 @@
|
|
39
39
|
</table>
|
40
40
|
<% else %>
|
41
41
|
<div class="no-objects-found">
|
42
|
-
<%=
|
42
|
+
<%= I18n.t("spree.no_results") %>
|
43
43
|
</div>
|
44
44
|
<% end %>
|
@@ -1,40 +1,69 @@
|
|
1
|
-
<%= render 'spree/admin/shared/configuration_menu' %>
|
2
|
-
|
3
1
|
<% content_for :page_title do %>
|
4
|
-
|
2
|
+
<%= I18n.t("spree.spree_reviews.review_settings") %>
|
3
|
+
<% end %>
|
4
|
+
|
5
|
+
<% admin_breadcrumb(I18n.t("spree.settings")) %>
|
6
|
+
|
7
|
+
<% content_for :tabs do %>
|
8
|
+
<nav>
|
9
|
+
<ul class="tabs">
|
10
|
+
<%= settings_tab_item I18n.t("spree.spree_reviews.review_settings"), spree.admin_review_settings_path %>
|
11
|
+
</ul>
|
12
|
+
</nav>
|
5
13
|
<% end %>
|
6
14
|
|
7
|
-
<%= form_tag(admin_review_settings_path, :
|
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
|
-
|
15
|
+
<%= form_tag(admin_review_settings_path, method: :put) do %>
|
16
|
+
<fieldset class="no-border-top">
|
17
|
+
<div class="field">
|
18
|
+
<label>
|
19
|
+
<%= check_box_tag('preferences[include_unapproved_reviews]', "1", Spree::Reviews::Config[:include_unapproved_reviews]) %>
|
20
|
+
<%= I18n.t("spree.spree_reviews.include_unapproved") %>
|
21
|
+
</label>
|
22
|
+
</div>
|
23
|
+
<div class="field">
|
24
|
+
<label>
|
25
|
+
<%= check_box_tag('preferences[display_unapproved_reviews]', "1", Spree::Reviews::Config[:display_unapproved_reviews]) %>
|
26
|
+
<%= I18n.t("spree.spree_reviews.display_unapproved") %>
|
27
|
+
</label>
|
28
|
+
</div>
|
29
|
+
<div class="field">
|
30
|
+
<label>
|
31
|
+
<%= check_box_tag('preferences[feedback_rating]', "1", Spree::Reviews::Config[:feedback_rating]) %>
|
32
|
+
<%= I18n.t("spree.spree_reviews.feedback_rating") %>
|
33
|
+
</label>
|
34
|
+
</div>
|
35
|
+
<div class="field">
|
36
|
+
<label>
|
37
|
+
<%= check_box_tag('preferences[show_email]', "1", Spree::Reviews::Config[:show_email]) %>
|
38
|
+
<%= I18n.t("spree.spree_reviews.show_email") %>
|
39
|
+
</label>
|
40
|
+
</div>
|
41
|
+
<div class="field">
|
42
|
+
<label>
|
43
|
+
<%= check_box_tag('preferences[show_verified_purchaser]', "1", Spree::Reviews::Config[:show_verified_purchaser]) %>
|
44
|
+
<%= I18n.t("spree.spree_reviews.show_verified_purchaser") %>
|
45
|
+
</label>
|
46
|
+
</div>
|
47
|
+
<div class="field">
|
48
|
+
<label>
|
49
|
+
<%= check_box_tag('preferences[require_login]', "1", Spree::Reviews::Config[:require_login]) %>
|
50
|
+
<%= I18n.t("spree.spree_reviews.require_login") %>
|
51
|
+
</label>
|
52
|
+
</div>
|
53
|
+
<div class="field">
|
54
|
+
<label>
|
55
|
+
<%= check_box_tag('preferences[track_locale]', "1", Spree::Reviews::Config[:track_locale]) %>
|
56
|
+
<%= I18n.t("spree.spree_reviews.track_locale") %>
|
57
|
+
</label>
|
58
|
+
</div>
|
59
|
+
<div class="field">
|
60
|
+
<label><%= I18n.t("spree.spree_reviews.preview_size") %></label><br>
|
61
|
+
<%= text_field_tag('preferences[preview_size]', Spree::Reviews::Config[:preview_size], size: 3) %>
|
62
|
+
</div>
|
33
63
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
</fieldset>
|
64
|
+
<div class="form-buttons filter-actions actions" data-hook="buttons">
|
65
|
+
<%= button_tag I18n.t("spree.actions.update") %>
|
66
|
+
<%= link_to I18n.t("spree.actions.cancel"), edit_admin_general_settings_url, class: 'button' %>
|
67
|
+
</div>
|
68
|
+
</fieldset>
|
40
69
|
<% end %>
|
@@ -1,22 +1,43 @@
|
|
1
|
-
<%= render "spree/shared/error_messages", :
|
1
|
+
<%= render "spree/shared/error_messages", target: @review %>
|
2
2
|
<%= f.field_container :name do %>
|
3
3
|
<%= f.label :name %><br />
|
4
|
-
<%= f.text_field :name, :
|
4
|
+
<%= f.text_field :name, maxlength: "255", size: "60" %>
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<%= f.field_container :email do %>
|
8
|
+
<%= f.label :email %><br />
|
9
|
+
<%= mail_to @review.email %>
|
5
10
|
<% end %>
|
6
11
|
|
7
12
|
<%= f.field_container :title do %>
|
8
13
|
<%= f.label :title %><br />
|
9
|
-
<%= f.text_field :title, :
|
14
|
+
<%= f.text_field :title, maxlength: "255", size: "60" %>
|
10
15
|
<% end %>
|
11
16
|
|
12
17
|
<%= f.field_container :review do %>
|
13
18
|
<%= f.label :review %><br />
|
14
|
-
<%= f.text_area :review, :
|
19
|
+
<%= f.text_area :review, wrap: "virtual", rows: "10", cols: "60" %>
|
20
|
+
<% end %>
|
21
|
+
|
22
|
+
<%= f.field_container :images do %>
|
23
|
+
<%= f.label :images %>
|
24
|
+
<table>
|
25
|
+
<% @review.images.each do |image| %>
|
26
|
+
<tr>
|
27
|
+
<td>
|
28
|
+
<%= image_tag image.url(:original) %>
|
29
|
+
</td>
|
30
|
+
<td>
|
31
|
+
<%= link_to_delete image, url: admin_review_image_url(@review, image, product_id: @review.product), no_text: true %>
|
32
|
+
</td>
|
33
|
+
</tr>
|
34
|
+
<% end %>
|
35
|
+
</table>
|
15
36
|
<% end %>
|
16
37
|
|
17
38
|
<% if Spree::Reviews::Config[:track_locale] %>
|
18
39
|
<%= f.field_container :locale do %>
|
19
40
|
<%= f.label :locale %><br />
|
20
|
-
<%= f.select :locale, I18n.available_locales.map { |lc| [t(lc, :
|
41
|
+
<%= f.select :locale, I18n.available_locales.map { |lc| [t(lc, default: lc.to_s), lc.to_s] } %>
|
21
42
|
<% end %>
|
22
43
|
<% end %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<% content_for :page_title do %>
|
2
|
-
<%=
|
2
|
+
<%= I18n.t("spree.editing_review_for_html", link: link_to(@review.product.name, product_path(@review.product))) %>
|
3
3
|
<% end %>
|
4
4
|
|
5
5
|
<% render 'spree/admin/shared/product_sub_menu' %>
|
@@ -15,7 +15,7 @@
|
|
15
15
|
</div>
|
16
16
|
|
17
17
|
<div class="omega eight columns">
|
18
|
-
<%= render 'form', :
|
18
|
+
<%= render 'form', f: f %>
|
19
19
|
</div>
|
20
20
|
|
21
21
|
<div class="clear"></div>
|
@@ -1,111 +1,123 @@
|
|
1
|
+
<% admin_breadcrumb(link_to plural_resource_name(Spree::Product), spree.admin_products_path) %>
|
2
|
+
|
1
3
|
<% content_for :page_title do %>
|
2
|
-
|
4
|
+
<%= I18n.t("spree.reviews") %>
|
3
5
|
<% end %>
|
4
6
|
|
5
|
-
<% render 'spree/admin/shared/product_sub_menu' %>
|
6
|
-
|
7
7
|
<% content_for :table_filter_title do %>
|
8
|
-
|
8
|
+
<%= I18n.t("spree.search") %>
|
9
9
|
<% end %>
|
10
10
|
|
11
11
|
<% content_for :table_filter do %>
|
12
12
|
<div data-hook="admin_reviews_index_search">
|
13
|
-
|
14
13
|
<%= search_form_for [:admin, @search] do |f| %>
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
14
|
+
<div class="alpha three columns">
|
15
|
+
<div class="field">
|
16
|
+
<%= f.label :name_cont, I18n.t("spree.user") %><br />
|
17
|
+
<%= f.text_field :name_cont, class: 'fullwidth' %>
|
18
|
+
</div>
|
19
|
+
</div>
|
21
20
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
21
|
+
<div class="seven columns">
|
22
|
+
<div class="field">
|
23
|
+
<%= f.label :title_cont, I18n.t("spree.title") -%><br/>
|
24
|
+
<%= f.text_field :title_cont, class: 'fullwidth' -%>
|
25
|
+
</div>
|
26
|
+
</div>
|
28
27
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
28
|
+
<div class="four columns">
|
29
|
+
<div class="field">
|
30
|
+
<%= f.label :review_cont, I18n.t("spree.review") -%><br/>
|
31
|
+
<%= f.text_field :review_cont, class: 'fullwidth' -%>
|
32
|
+
</div>
|
33
|
+
</div>
|
35
34
|
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
35
|
+
<div class="two columns omega">
|
36
|
+
<div class="field">
|
37
|
+
<%= f.label :approved_eq, I18n.t("spree.approval_status")-%><br/>
|
38
|
+
<%= f.select :approved_eq, [
|
39
|
+
[I18n.t("spree.all"), nil],
|
40
|
+
[I18n.t("spree.approved_reviews"), true],
|
41
|
+
[I18n.t("spree.unapproved_reviews"), false]
|
42
|
+
], {}, class: 'select2 fullwidth' -%>
|
43
|
+
</div>
|
44
|
+
</div>
|
42
45
|
|
43
|
-
|
46
|
+
<div class="clear"></div>
|
44
47
|
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
+
<div class="form-buttons actions filter-actions" data-hook="admin_reviews_index_search_buttons">
|
49
|
+
<%= button_tag I18n.t("spree.search") %>
|
50
|
+
</div>
|
48
51
|
<%- end -%>
|
49
52
|
</div>
|
50
53
|
<%- end -%>
|
51
54
|
|
52
|
-
|
55
|
+
<%= paginate @reviews, theme: "solidus_admin" %>
|
53
56
|
|
54
57
|
<% if @reviews.any? %>
|
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
|
-
|
58
|
+
<table class="index">
|
59
|
+
<colgroup>
|
60
|
+
<col style="width: 20%;">
|
61
|
+
<col style="width: 10%;">
|
62
|
+
<col style="width: 10%;">
|
63
|
+
<col style="width: 15%;">
|
64
|
+
<col style="width: 15%;">
|
65
|
+
<col style="width: 15%;">
|
66
|
+
<col style="width: 17%;">
|
67
|
+
</colgroup>
|
68
|
+
<thead>
|
69
|
+
<tr>
|
70
|
+
<th><%= I18n.t("spree.product") %></th>
|
71
|
+
<th><%= "#{Spree::Review.human_attribute_name(:rating)}/#{I18n.t("spree.feedback")}" %></th>
|
72
|
+
<th><%= I18n.t("spree.verified_purchaser") %></th>
|
73
|
+
<th><%= Spree::Review.human_attribute_name(:user) %></th>
|
74
|
+
<th><%= Spree::Review.human_attribute_name(:created_at) %></th>
|
75
|
+
<th><%= Spree::Review.human_attribute_name(:images) %></th>
|
76
|
+
<th class="actions"></th>
|
77
|
+
</tr>
|
78
|
+
</thead>
|
79
|
+
<tbody>
|
80
|
+
<%- @reviews.each do |review| -%>
|
81
|
+
<tr id="<%= dom_id review %>">
|
82
|
+
<td>
|
83
|
+
<% if review.product %>
|
84
|
+
<%= link_to review.product.name, product_path(review.product) %>
|
85
|
+
<% end %>
|
86
|
+
</td>
|
87
|
+
<td class="align-center">
|
88
|
+
<%= txt_stars(review.rating) %><br />
|
89
|
+
<%= link_to "(#{review.feedback_stars}/#{review.feedback_reviews.size})", admin_review_feedback_reviews_path(review) %>
|
90
|
+
</td>
|
91
|
+
<td class="align-center">
|
92
|
+
<% if review.verified_purchaser? %>
|
93
|
+
<%= solidus_icon('fa fa-check') %>
|
94
|
+
<% end %>
|
95
|
+
</td>
|
96
|
+
<td class="align-center">
|
97
|
+
<%= review.user_id ? link_to(review.user.try(:email), [:admin, review.user]) : I18n.t("spree.anonymous") %></p>
|
98
|
+
<p><%= Spree::Review.human_attribute_name(:ip_address) %>: <%= review.ip_address ? link_to(review.ip_address, "http://whois.domaintools.com/#{review.ip_address}") : '-' %></p>
|
99
|
+
</td>
|
100
|
+
<td class="align-center">
|
101
|
+
<%= l review.created_at, format: :short %>
|
102
|
+
</td>
|
103
|
+
<td class="align-center">
|
104
|
+
<% review.images.each do |image| %>
|
105
|
+
<%= link_to image_tag(image.url(:product)), image.url(:original) %>
|
106
|
+
<% end %>
|
107
|
+
</td>
|
108
|
+
<td class="actions">
|
109
|
+
<%= link_to_with_icon 'ok', I18n.t("spree.approve"), approve_admin_review_url(review), no_text: true, class: 'approve' unless review.approved %>
|
110
|
+
<%= link_to_edit review, no_text: true, class: 'edit' %>
|
111
|
+
<%= link_to_delete review, no_text: true %>
|
112
|
+
</td>
|
113
|
+
</tr>
|
114
|
+
<% end %>
|
115
|
+
</tbody>
|
116
|
+
</table>
|
105
117
|
<% else %>
|
106
|
-
|
107
|
-
|
108
|
-
|
118
|
+
<div class="no-objects-found">
|
119
|
+
<%= I18n.t("spree.no_results") %>
|
120
|
+
</div>
|
109
121
|
<% end %>
|
110
122
|
|
111
|
-
<%= paginate @reviews -%>
|
123
|
+
<%= paginate @reviews, theme: "solidus_admin" -%>
|