alchemy_cms 7.0.14 → 7.0.15

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.

Potentially problematic release.


This version of alchemy_cms might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4f009c36ef6be6cd2543d594e6e818b899fb03105db7afa1e043ac6eff667148
4
- data.tar.gz: 39453909b852611f2b9610442cb596241037100965691fc6766b3f98fe6f1130
3
+ metadata.gz: d12e298a1520aa5d0802cb5a0cdd4c572ccb95eb26694c05232e814cab02d872
4
+ data.tar.gz: 5ec2c91664ef21e02cc721d0f1b18197109228ded5e3a94431a2bb6725636e53
5
5
  SHA512:
6
- metadata.gz: 4c675c83bd57c8514dd1983051ba4dfef7af615f41001603fd25d2c556925a87e08d67307d4b610c3c9655572092cdf06e4d07bb5891dbdb3758b6cb7dccd721
7
- data.tar.gz: 1feb5da7ff3d8bafb2aac4cc03ac52682795457d41f7a28cbd5e7eeca4816a8536149fe87a8f49470f3d6e9e7ed08eb194dc632a511639a0f259a2738ce0e06c
6
+ metadata.gz: 18857f625f696da128914928fc6c93e92746004ffaf3683372168d5d4b29794e7a1ed8b406f4654913eb4a625a90d2ef0f5f20dfeade7dc3fa689aa57ce9ac02
7
+ data.tar.gz: 5c08d1c0ae99d4d10065aa7acf5ec5851e602b605fde0008221125e091440aa341360370b688418338be971d795f02bca2ef7c5d3a049e5362d595a8dfbaa9e7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
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
+
3
12
  ## 7.0.14 (2024-06-04)
4
13
 
5
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))
@@ -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
  )
@@ -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])
@@ -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
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Alchemy
4
- VERSION = "7.0.14"
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.14
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-06-04 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