alchemy_cms 7.0.13 → 7.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7e1e1f44ae24e197683a4022bc888322ad87557119ab90f85fe455e3d0871a11
4
- data.tar.gz: d88442e6659689d233994892136e531ed45727cea4a771ff3947589d01964fbf
3
+ metadata.gz: d12e298a1520aa5d0802cb5a0cdd4c572ccb95eb26694c05232e814cab02d872
4
+ data.tar.gz: 5ec2c91664ef21e02cc721d0f1b18197109228ded5e3a94431a2bb6725636e53
5
5
  SHA512:
6
- metadata.gz: a881a0032cfd6c600e71513982d172db9f5d8bd1276d53de1ca045c758c2a6b256937f68df26375bcc085cf1cff52a4e5db087ba8b33595b5b9884447d419f12
7
- data.tar.gz: 7701f3c046c5bef17f75be1121fc4908d3aeba17abc88cadf04a5a59656c5c66bf0fcdb76cf395783d0cf5aaff27fab5b5549c512d00427485a5dbbf7407a8a0
6
+ metadata.gz: 18857f625f696da128914928fc6c93e92746004ffaf3683372168d5d4b29794e7a1ed8b406f4654913eb4a625a90d2ef0f5f20dfeade7dc3fa689aa57ce9ac02
7
+ data.tar.gz: 5c08d1c0ae99d4d10065aa7acf5ec5851e602b605fde0008221125e091440aa341360370b688418338be971d795f02bca2ef7c5d3a049e5362d595a8dfbaa9e7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.0.15 (2024-09-04)
4
+
5
+ - [7.0-stable] Render Datetime ingredient in local time zone [#3017](https://github.com/AlchemyCMS/alchemy_cms/pull/3017) ([tvdeyen](https://github.com/tvdeyen))
6
+ - [7.0-stable] Allow to set input_type on Datetime ingredient editor [#3014](https://github.com/AlchemyCMS/alchemy_cms/pull/3014) ([tvdeyen](https://github.com/tvdeyen))
7
+ - [7.0-stable] Fix combining search filters and pagination [#2980](https://github.com/AlchemyCMS/alchemy_cms/pull/2980) ([alchemycms-bot](https://github.com/alchemycms-bot))
8
+ - [7.0-stable] Remove call to missing content_positions task [#2961](https://github.com/AlchemyCMS/alchemy_cms/pull/2961) ([alchemycms-bot](https://github.com/alchemycms-bot))
9
+ - [7.0-stable] Fix re-render of layoutpages form if validation fails [#2952](https://github.com/AlchemyCMS/alchemy_cms/pull/2952) ([alchemycms-bot](https://github.com/alchemycms-bot))
10
+ - [7.0-stable] fix(ContactMessages): Use alchemy route proxy [#2927](https://github.com/AlchemyCMS/alchemy_cms/pull/2927) ([alchemycms-bot](https://github.com/alchemycms-bot))
11
+
12
+ ## 7.0.14 (2024-06-04)
13
+
14
+ - [7.0-stable] fix(RoutingConstraints): Allow Turbo Stream requests [#2914](https://github.com/AlchemyCMS/alchemy_cms/pull/2914) ([alchemycms-bot](https://github.com/alchemycms-bot))
15
+ - [7.0-stable] fix Ingredient Audio and Video boolean type casting [#2910](https://github.com/AlchemyCMS/alchemy_cms/pull/2910) ([alchemycms-bot](https://github.com/alchemycms-bot))
16
+
3
17
  ## 7.0.13 (2024-05-29)
4
18
 
5
19
  - [7.0-stable] Fix preview window width for smaller viewports [#2889](https://github.com/AlchemyCMS/alchemy_cms/pull/2889) ([alchemycms-bot](https://github.com/alchemycms-bot))
@@ -11,10 +11,11 @@ module Alchemy
11
11
  end
12
12
 
13
13
  def call
14
+ datetime = ingredient.value.in_time_zone(Rails.application.config.time_zone)
14
15
  if date_format == "rfc822"
15
- ingredient.value.to_s(:rfc822)
16
+ datetime.try(:to_fs, :rfc822) || datetime.to_s(:rfc822)
16
17
  else
17
- ::I18n.l(ingredient.value, format: date_format)
18
+ ::I18n.l(datetime, format: date_format)
18
19
  end.html_safe
19
20
  end
20
21
  end
@@ -17,6 +17,25 @@ module Alchemy
17
17
  def edit
18
18
  @page = Page.find(params[:id])
19
19
  end
20
+
21
+ def update
22
+ @page = Page.find(params[:id])
23
+ if @page.update(page_params)
24
+ @notice = Alchemy.t("Page saved", name: @page.name)
25
+ render "alchemy/admin/pages/update"
26
+ else
27
+ render :edit, status: :unprocessable_entity
28
+ end
29
+ end
30
+
31
+ private
32
+
33
+ def page_params
34
+ params.require(:page).permit(
35
+ :name,
36
+ :tag_list
37
+ )
38
+ end
20
39
  end
21
40
  end
22
41
  end
@@ -97,7 +97,7 @@ module Alchemy
97
97
  else
98
98
  Language.current_root_page.urlname
99
99
  end
100
- redirect_to show_page_path(
100
+ redirect_to alchemy.show_page_path(
101
101
  urlname: urlname,
102
102
  locale: prefix_locale? ? Language.current.code : nil
103
103
  )
@@ -26,6 +26,17 @@ module Alchemy
26
26
  def preview_text(max_length = 30)
27
27
  name.to_s[0..max_length - 1]
28
28
  end
29
+
30
+ %i[
31
+ autoplay
32
+ controls
33
+ loop
34
+ muted
35
+ ].each do |method|
36
+ define_method(:"#{method}=") do |value|
37
+ super(ActiveModel::Type::Boolean.new.cast(value))
38
+ end
39
+ end
29
40
  end
30
41
  end
31
42
  end
@@ -5,7 +5,7 @@ module Alchemy
5
5
  # A datetime value
6
6
  #
7
7
  class Datetime < Alchemy::Ingredient
8
- allow_settings %i[date_format]
8
+ allow_settings %i[date_format input_type]
9
9
 
10
10
  def value
11
11
  ActiveRecord::Type::DateTime.new.cast(self[:value])
@@ -31,6 +31,18 @@ module Alchemy
31
31
  def preview_text(max_length = 30)
32
32
  name.to_s[0..max_length - 1]
33
33
  end
34
+
35
+ %i[
36
+ autoplay
37
+ controls
38
+ loop
39
+ muted
40
+ playsinline
41
+ ].each do |method|
42
+ define_method(:"#{method}=") do |value|
43
+ super(ActiveModel::Type::Boolean.new.cast(value))
44
+ end
45
+ end
34
46
  end
35
47
  end
36
48
  end
@@ -1,4 +1,4 @@
1
- <%= alchemy_form_for [:admin, @page], class: 'edit_page' do |f| %>
1
+ <%= alchemy_form_for [:admin, @page], url: alchemy.admin_layoutpage_path(@page), class: 'edit_page' do |f| %>
2
2
  <%= f.input :name, autofocus: true %>
3
3
  <div class="input string">
4
4
  <%= f.label :tag_list %>
@@ -1,6 +1,6 @@
1
1
  <%= form_tag url_for, method: :get, class: 'per-page-select-form' do |f| %>
2
2
  <% search_filter_params.reject { |k, _| k == 'page' || k == 'per_page' }.each do |key, value| %>
3
- <% if value.is_a? ActionController::Parameters %>
3
+ <% if value.respond_to?(:keys) %>
4
4
  <% value.each do |k, v| %>
5
5
  <%= hidden_field_tag "#{key}[#{k}]", v, id: nil %>
6
6
  <% end %>
@@ -7,7 +7,8 @@
7
7
  datetime_editor, :value, {
8
8
  name: datetime_editor.form_field_name,
9
9
  id: datetime_editor.form_field_id,
10
- value: datetime_editor.value
10
+ value: datetime_editor.value,
11
+ type: datetime_editor.settings[:input_type]
11
12
  }
12
13
  ) %>
13
14
  <% end %>
data/config/routes.rb CHANGED
@@ -49,7 +49,7 @@ Alchemy::Engine.routes.draw do
49
49
  end
50
50
  end
51
51
 
52
- resources :layoutpages, only: [:index, :edit]
52
+ resources :layoutpages, only: [:index, :edit, :update]
53
53
 
54
54
  resources :pictures, except: [:new] do
55
55
  collection do
@@ -96,7 +96,7 @@ module Alchemy
96
96
  can :leave, :alchemy_admin
97
97
  can [:info, :help], :alchemy_admin_dashboard
98
98
  can :manage, :alchemy_admin_clipboard
99
- can :edit, :alchemy_admin_layoutpages
99
+ can :update, :alchemy_admin_layoutpages
100
100
  can :tree, :alchemy_admin_pages
101
101
 
102
102
  # Resources
@@ -27,7 +27,7 @@ module Alchemy
27
27
  # because it could be a legacy route that needs to be redirected.
28
28
  #
29
29
  def handable_format?
30
- @request.format.symbol.nil? || (@request.format.symbol == :html)
30
+ @request.format.symbol.nil? || @request.format.html?
31
31
  end
32
32
 
33
33
  # We don't want to handle the Rails info routes.
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.0.13"
4
+ VERSION = "7.0.15"
5
5
 
6
6
  def self.version
7
7
  VERSION
@@ -7,7 +7,6 @@ namespace :alchemy do
7
7
  desc "Tidy up Alchemy database."
8
8
  task :up do
9
9
  Rake::Task["alchemy:tidy:element_positions"].invoke
10
- Rake::Task["alchemy:tidy:content_positions"].invoke
11
10
  Rake::Task["alchemy:tidy:remove_orphaned_records"].invoke
12
11
  Rake::Task["alchemy:tidy:remove_trashed_elements"].invoke
13
12
  Rake::Task["alchemy:tidy:remove_duplicate_legacy_urls"].invoke
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 7.0.13
4
+ version: 7.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas von Deyen
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2024-05-29 00:00:00.000000000 Z
16
+ date: 2024-09-04 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: actionmailer
@@ -1456,7 +1456,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1456
1456
  version: '0'
1457
1457
  requirements:
1458
1458
  - ImageMagick (libmagick), v6.6 or greater.
1459
- rubygems_version: 3.5.9
1459
+ rubygems_version: 3.5.16
1460
1460
  signing_key:
1461
1461
  specification_version: 4
1462
1462
  summary: A powerful, userfriendly and flexible CMS for Rails