testimonials 0.7.3 → 0.7.5
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/app/controllers/testimonials/application_controller.rb +4 -0
- data/app/controllers/testimonials/nps_responses_controller.rb +1 -1
- data/app/controllers/testimonials/testimonials_controller.rb +1 -1
- data/app/views/testimonials/testimonials/_testimonial_panel.html.erb +15 -15
- data/lib/generators/testimonials/install/templates/initializer.rb +4 -0
- data/lib/testimonials/configuration.rb +5 -0
- data/lib/testimonials/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e16b76775e1ff90ce9376d7f853f76b5efd889769248040e6f2d128615bb5ac2
|
|
4
|
+
data.tar.gz: b55bdbffecb5fa8f65026465266ed39f1767935de3d72b1cb85e6a9f1c79ed6e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2de8f2e8eba6981a7aebf1cd8e0a5e3ec0c2834080a4b634142a874ad35bef7e1db5ae9cc968ed94e768220bc07eb3ddee81506a99953abf6a698790b082cf57
|
|
7
|
+
data.tar.gz: 13a1041471b5cc2963fa97269b87040fb55a4d6c34bb03b6cfa5c1ad7bddde8fd5d9299a09443aeca173395b7505fb511edce860c4394a31726abede70fe4864
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.7.5
|
|
4
|
+
|
|
5
|
+
- Moved the selected testimonial status and rating into the main metadata card,
|
|
6
|
+
removing the extra detail-pane header from the admin review view.
|
|
7
|
+
- Fixed the trusted publishing workflow by building and pushing the gem
|
|
8
|
+
directly with RubyGems OIDC credentials after the test suite passes.
|
|
9
|
+
|
|
10
|
+
## 0.7.4
|
|
11
|
+
|
|
12
|
+
- Added `config.admin_layout`, letting host apps render the testimonial and NPS
|
|
13
|
+
dashboards inside their own admin layout while keeping the standalone gem
|
|
14
|
+
layout as the default.
|
|
15
|
+
|
|
3
16
|
## 0.7.3
|
|
4
17
|
|
|
5
18
|
- Redesigned the testimonial and NPS admin dashboards into two-column review
|
|
@@ -4,7 +4,7 @@ module Testimonials
|
|
|
4
4
|
class TestimonialsController < ApplicationController
|
|
5
5
|
PER_PAGE = 50
|
|
6
6
|
|
|
7
|
-
layout
|
|
7
|
+
layout :testimonials_admin_layout, except: :create
|
|
8
8
|
|
|
9
9
|
# create is the public widget endpoint; everything else is the dashboard.
|
|
10
10
|
before_action :require_enabled, only: :create
|
|
@@ -1,22 +1,22 @@
|
|
|
1
1
|
<section class="testimonial-panel">
|
|
2
|
-
<div class="panel-head">
|
|
3
|
-
<h1 class="title-row">
|
|
4
|
-
<span class="badge status-<%= testimonial.status %>">
|
|
5
|
-
<%= t("testimonials.statuses.#{testimonial.status}", default: testimonial.status.humanize) %>
|
|
6
|
-
</span>
|
|
7
|
-
<% if testimonial.featured? %>
|
|
8
|
-
<span class="badge status-approved">⭐ <%= t('testimonials.dashboard.featured', default: 'Featured') %></span>
|
|
9
|
-
<% end %>
|
|
10
|
-
<% if testimonial.rating %>
|
|
11
|
-
<span class="stars"><%= '★' * testimonial.rating %><span class="off"><%= '★' * (5 - testimonial.rating) %></span></span>
|
|
12
|
-
<% end %>
|
|
13
|
-
<span class="case-id">#<%= testimonial.id %></span>
|
|
14
|
-
</h1>
|
|
15
|
-
</div>
|
|
16
|
-
|
|
17
2
|
<div class="detail-scroll">
|
|
18
3
|
<div class="card pad">
|
|
19
4
|
<dl>
|
|
5
|
+
<dt><%= t('testimonials.dashboard.testimonial', default: 'Testimonial') %></dt>
|
|
6
|
+
<dd><span class="case-id">#<%= testimonial.id %></span></dd>
|
|
7
|
+
<dt><%= t('testimonials.dashboard.status', default: 'Status') %></dt>
|
|
8
|
+
<dd>
|
|
9
|
+
<span class="badge status-<%= testimonial.status %>">
|
|
10
|
+
<%= t("testimonials.statuses.#{testimonial.status}", default: testimonial.status.humanize) %>
|
|
11
|
+
</span>
|
|
12
|
+
<% if testimonial.featured? %>
|
|
13
|
+
<span class="badge status-approved"><%= t('testimonials.dashboard.featured', default: 'Featured') %></span>
|
|
14
|
+
<% end %>
|
|
15
|
+
</dd>
|
|
16
|
+
<% if testimonial.rating %>
|
|
17
|
+
<dt><%= t('testimonials.dashboard.rating', default: 'Rating') %></dt>
|
|
18
|
+
<dd><span class="stars"><%= '★' * testimonial.rating %><span class="off"><%= '★' * (5 - testimonial.rating) %></span></span></dd>
|
|
19
|
+
<% end %>
|
|
20
20
|
<dt><%= t('testimonials.dashboard.from', default: 'From') %></dt>
|
|
21
21
|
<dd>
|
|
22
22
|
<% if testimonial.avatar_attached? %>
|
|
@@ -12,6 +12,10 @@ Testimonials.configure do |config|
|
|
|
12
12
|
# Who can triage testimonials at the mount path. Defaults to development
|
|
13
13
|
# only — override before deploying.
|
|
14
14
|
# config.authorize_admin = ->(request) { request.env["warden"]&.user&.admin? }
|
|
15
|
+
#
|
|
16
|
+
# Render the dashboard inside your app's admin layout. Default: the gem's
|
|
17
|
+
# standalone dashboard layout.
|
|
18
|
+
# config.admin_layout = "admin/application"
|
|
15
19
|
|
|
16
20
|
# Attribute submissions to a user (optional). Return an object responding
|
|
17
21
|
# to #id, or nil. Receives the request.
|
|
@@ -17,6 +17,10 @@ module Testimonials
|
|
|
17
17
|
# only — override it before deploying, e.g. with an admin check.
|
|
18
18
|
attr_accessor :authorize_admin
|
|
19
19
|
|
|
20
|
+
# Layout used by the built-in dashboard. Override this to render
|
|
21
|
+
# Testimonials inside your app's admin shell, e.g. "admin/application".
|
|
22
|
+
attr_accessor :admin_layout
|
|
23
|
+
|
|
20
24
|
# Resolve the current user for attribution (optional). Return an object
|
|
21
25
|
# responding to #id, or nil. Receives the request.
|
|
22
26
|
attr_accessor :current_user
|
|
@@ -104,6 +108,7 @@ module Testimonials
|
|
|
104
108
|
@app_name = nil
|
|
105
109
|
@enabled = ->(_request) { true }
|
|
106
110
|
@authorize_admin = ->(_request) { Rails.env.development? }
|
|
111
|
+
@admin_layout = 'testimonials/application'
|
|
107
112
|
@current_user = ->(_request) {}
|
|
108
113
|
@tenant = ->(_request) {}
|
|
109
114
|
@user_display = lambda { |user|
|
data/lib/testimonials/version.rb
CHANGED