From 64e43f950a92492d46bf80e89428a2892d2c9615 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Tue, 23 Mar 2021 04:01:03 +0000 Subject: [PATCH 1/7] Bump bootsnap from 1.7.2 to 1.7.3 Bumps [bootsnap](https://github.com/Shopify/bootsnap) from 1.7.2 to 1.7.3. - [Release notes](https://github.com/Shopify/bootsnap/releases) - [Changelog](https://github.com/Shopify/bootsnap/blob/master/CHANGELOG.md) - [Commits](https://github.com/Shopify/bootsnap/compare/v1.7.2...v1.7.3) Signed-off-by: dependabot[bot] --- Gemfile.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 80e09fce..e98e6b6d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -84,7 +84,7 @@ GEM aws-eventstream (~> 1, >= 1.0.2) bcrypt (3.1.16) bindex (0.8.1) - bootsnap (1.7.2) + bootsnap (1.7.3) msgpack (~> 1.0) brakeman (5.0.0) builder (3.2.4) From b83d3012779a6c6f337f90c910773390f6957ad5 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 24 Mar 2021 04:01:23 +0000 Subject: [PATCH 2/7] Bump listen from 3.4.1 to 3.5.0 Bumps [listen](https://github.com/guard/listen) from 3.4.1 to 3.5.0. - [Release notes](https://github.com/guard/listen/releases) - [Commits](https://github.com/guard/listen/compare/v3.4.1...v3.5.0) Signed-off-by: dependabot[bot] --- Gemfile | 2 +- Gemfile.lock | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Gemfile b/Gemfile index 435b4567..4bfb92db 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ end group :development do gem 'annotate' - gem 'listen', '~> 3.3' + gem 'listen', '~> 3.5' gem 'pry-rails' gem 'rails-erd' gem 'spring' # Spring speeds up development by keeping your application running in the background. diff --git a/Gemfile.lock b/Gemfile.lock index e98e6b6d..e5ad26bd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -125,7 +125,7 @@ GEM railties (>= 5.0.0) faker (2.17.0) i18n (>= 1.6, < 2) - ffi (1.14.2) + ffi (1.15.0) ffi-compiler (1.0.1) ffi (>= 1.0.0) rake @@ -152,7 +152,7 @@ GEM activesupport (>= 5.0.0) jmespath (1.4.0) json (2.5.1) - listen (3.4.1) + listen (3.5.0) rb-fsevent (~> 0.10, >= 0.10.3) rb-inotify (~> 0.9, >= 0.9.10) loofah (2.9.0) @@ -383,7 +383,7 @@ DEPENDENCIES friendly_id image_processing jbuilder (~> 2.11) - listen (~> 3.3) + listen (~> 3.5) pg pry-rails puma (~> 5.2) From 1cbc7b960053f8fd9cef1955fa27d7367dc8a3e8 Mon Sep 17 00:00:00 2001 From: Rogier Date: Wed, 24 Mar 2021 15:22:59 +0100 Subject: [PATCH 3/7] Remove image from mailings as pdf is showing a thumbnail --- app/models/mailing.rb | 2 -- app/views/mailings/_form.html.erb | 15 --------------- app/views/mailings/show.html.erb | 3 --- 3 files changed, 20 deletions(-) diff --git a/app/models/mailing.rb b/app/models/mailing.rb index 08396d17..f78ca29d 100644 --- a/app/models/mailing.rb +++ b/app/models/mailing.rb @@ -22,7 +22,6 @@ # class Mailing < ApplicationRecord has_one_attached :attachment - has_one_attached :image has_rich_text :content self.implicit_order_column = :published_at @@ -32,7 +31,6 @@ class Mailing < ApplicationRecord validates :content, presence: true validates :description, presence: true - validates :image, presence: true validates :title, presence: true, length: { minimum: 5 }, uniqueness: true validates :slug, presence: true, uniqueness: true end diff --git a/app/views/mailings/_form.html.erb b/app/views/mailings/_form.html.erb index c4ae6ac5..4ac59598 100644 --- a/app/views/mailings/_form.html.erb +++ b/app/views/mailings/_form.html.erb @@ -48,21 +48,6 @@ <% end %> -
- <%= form.label :image %> - <%= form.file_field :image %> -
- -
- <% if @mailing.image.attached? == false %> -

No image attached

- <% elsif @mailing.image.previewable? %> - <%= image_tag(@mailing.image.preview(resize: "480x640")) %> - <% else @mailing.image.variable? %> - <%= image_tag(@mailing.image.variant(resize: "480x640")) %> - <% end %> -
-
<%= form.submit %>
diff --git a/app/views/mailings/show.html.erb b/app/views/mailings/show.html.erb index d71463d7..7699ec72 100644 --- a/app/views/mailings/show.html.erb +++ b/app/views/mailings/show.html.erb @@ -38,9 +38,6 @@ <%= link_to "Download #{@mailing.attachment.blob.filename}", rails_blob_path(@mailing.attachment, disposition: "attachment") %> <% end %>

-

- <%= image_tag url_for(@mailing.image) %> -

<%= render partial: '/common/share' %> From f7ac2d5293a2cd2dd09f58393314bac8b7d5c260 Mon Sep 17 00:00:00 2001 From: Rogier Date: Wed, 24 Mar 2021 15:27:47 +0100 Subject: [PATCH 4/7] Send mailings cannot be altered --- app/views/mailings/show.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/mailings/show.html.erb b/app/views/mailings/show.html.erb index 7699ec72..c8f6b6ac 100644 --- a/app/views/mailings/show.html.erb +++ b/app/views/mailings/show.html.erb @@ -8,14 +8,14 @@

<%= @mailing.title %>

<% if current_user.admin? %> - <%= link_to 'Bewerken', edit_mailing_path(@mailing), class: 'button btn btn-primary', style: "background: #FBB901" %> <% if @mailing.mailing_send == false %> + <%= link_to 'Bewerken', edit_mailing_path(@mailing), class: 'button btn btn-primary', style: "background: #FBB901" %> <%= link_to "/mailings/#{@mailing.slug}/verzenden", class: 'button btn btn-primary', style: "background: #9A6836" do %> Vesturen <% end %> + <%= link_to 'Verwijderen', @mailing, class: 'button btn btn-primary', style: "background: #FF8000", method: :delete, data: { confirm: 'Weet je het zeker?' } %> <% end %> - <%= link_to 'Verwijderen', @mailing, class: 'button btn btn-primary', style: "background: #FF8000", method: :delete, data: { confirm: 'Weet je het zeker?' } %> <% end %>