Skip to content

Commit 720e68b

Browse files
authored
Fix intergram deface integration in admin (#255)
* rebuild intergram integration in admin * bump version * bundle for legacy
1 parent af40e0c commit 720e68b

File tree

9 files changed

+33
-11
lines changed

9 files changed

+33
-11
lines changed

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
CHANGELOG
22
=========
33

4+
v0.10.2
5+
------
6+
7+
Compatibility:
8+
- Decidim v0.27.4
9+
- Decidim v0.26.8
10+
11+
Features:
12+
- Added translations
13+
- Fix deface override updating <body> tag in the admin
14+
415
v0.10.1
516
------
617

Gemfile.legacy.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
decidim-decidim_awesome (0.10.1)
4+
decidim-decidim_awesome (0.10.2)
55
decidim-admin (>= 0.26.0, < 0.28)
66
decidim-core (>= 0.26.0, < 0.28)
77
deface (>= 1.5)

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
decidim-decidim_awesome (0.10.1)
4+
decidim-decidim_awesome (0.10.2)
55
decidim-admin (>= 0.26.0, < 0.28)
66
decidim-core (>= 0.26.0, < 0.28)
77
deface (>= 1.5)

app/overrides/layouts/decidim/admin/_application/add_intergram.html.erb.deface

Lines changed: 0 additions & 5 deletions
This file was deleted.

app/overrides/layouts/decidim/admin/_header/replace_scripts.html.erb.deface

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@
44

55
<%= javascript_pack_tag "decidim_admin_decidim_awesome", defer: false %>
66
<%= javascript_pack_tag("decidim_admin_decidim_awesome_custom_fields") if Decidim::DecidimAwesome.enabled?(:proposal_custom_fields) %>
7+
<% if awesome_config[:intergram_for_admins] %>
8+
<%= render partial: "layouts/decidim/decidim_awesome/intergram_widget", locals: { settings: organization_awesome_config[:intergram_for_admins_settings] } %>
9+
<% end %>

lib/decidim/decidim_awesome/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
module Decidim
44
# This holds the decidim-decidim_awesome version.
55
module DecidimAwesome
6-
VERSION = "0.10.1"
6+
VERSION = "0.10.2"
77
COMPAT_DECIDIM_VERSION = [">= 0.26.0", "< 0.28"].freeze
88
end
99
end

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "decidim-module-decidim_awesome",
3-
"version": "0.9.3",
3+
"version": "0.10.2",
44
"description": "Mods and tweaks for Decidim",
55
"main": "index.js",
66
"directories": {

spec/system/awesome_intergram_spec.rb

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@
7979

8080
it_behaves_like "shows the chat", false
8181

82+
if legacy_version?
83+
it "has the script tag in the head" do
84+
expect(page).to have_xpath("//head/script[@src='#{intergram_url}']", visible: :all)
85+
end
86+
else
87+
it "has the script tag in the body" do
88+
expect(page).to have_xpath("//body/script[@src='#{intergram_url}']", visible: :all)
89+
end
90+
end
91+
8292
context "when login is required" do
8393
let(:require_login) { true }
8494

@@ -118,6 +128,9 @@
118128
end
119129

120130
it_behaves_like "shows the chat", true
131+
it "has the script tag in the head" do
132+
expect(page).to have_xpath("//head/script[@src='#{intergram_url}']", visible: :all)
133+
end
121134

122135
context "and admin chat is disabled" do
123136
let(:intergram_for_admins) { false }

0 commit comments

Comments
 (0)