comfy_middle_seat 4.0.2 → 4.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b5a4db65127e75cd26c7579614c4a0b7d9911cdc42c69642c23713a54f646c6e
4
- data.tar.gz: c715bde4f3d50f585f996cb6279a07b317e6cbdcd67fa9cdb2ffcc981492bb62
3
+ metadata.gz: b4278365e6cb2036d0909007c27e36878cb58dd915c801f4b9e0c9814a632eaf
4
+ data.tar.gz: 3d17520fe067057e477f7b269fe1eed2afe014846873d21cc5e68eda3041d143
5
5
  SHA512:
6
- metadata.gz: e4a9cdd0915e2bc45dcb9f58d35711566972838f16569e6b64d9408c9265974d4609f916a0aa5911dc6a872b183003023b3372c6f8247100ede1528c3aec6ac8
7
- data.tar.gz: fb6647ee01f1a0b907e314b379113100c3cc0062aa0baa91bbfa9f1b909539f1e8114719874e032d863b6c5e1f3ce36e98f6277bfd7ec7155fff2f3667089512
6
+ metadata.gz: 046346cefdb3ded2bd29e494d55a7c9ec9d4b84fe129b182a56aff0ce78f9c12802b232ce00bf73898461bd51aa9436759b0e04df0de948e72be45fe59b718e3
7
+ data.tar.gz: 8d888d9f83bd7c91693ba03335303513dde1f9df574f03ac757dcd67dfdf1ce9fbf6f213da0426a18b2ab9b5d46b8884d82b7881d9a292169052ab81b0ea04a0
data/CHANGELOG.md CHANGED
@@ -12,6 +12,13 @@ This changelog follows the project's lineage: **Comfortable Mexican Sofa → Com
12
12
 
13
13
  ## [Unreleased]
14
14
 
15
+ ## [v4.0.2] - 2026-09-21
16
+
17
+ ### Changed
18
+
19
+ - Refresh the README with clearer features, setup, compatibility, and upgrade guidance.
20
+ - Add RubyGems links for source code, issues, documentation, and the changelog.
21
+
15
22
  ## [v4.0.1] - 2026-09-18
16
23
 
17
24
  ### Changed
@@ -203,7 +210,8 @@ First release of `comfortable_media_surfer`. This new gem is a revival of [Comfo
203
210
 
204
211
  - Rebranded **ComfortableMexicanSofa** as **ComfortableMediaSurfer** in order to publish new gem (database table names and schema have not changed).
205
212
 
206
- [Unreleased]: https://github.com/avonderluft/comfy-middle-seat/compare/v4.0.1...master
213
+ [Unreleased]: https://github.com/avonderluft/comfy-middle-seat/compare/v4.0.2...master
214
+ [v4.0.2]: https://github.com/avonderluft/comfy-middle-seat/compare/v4.0.1...v4.0.2
207
215
  [v4.0.1]: https://github.com/avonderluft/comfy-middle-seat/compare/v4.0.0...v4.0.1
208
216
  [v4.0.0]: https://github.com/avonderluft/comfy-middle-seat/compare/v3.2.1...v4.0.0
209
217
  [v3.2.1]: https://github.com/avonderluft/comfy-middle-seat/compare/v3.2.0...v3.2.1
data/README.md CHANGED
@@ -6,7 +6,7 @@
6
6
 
7
7
  Add editor-managed pages, reusable layouts, rich text, Markdown, files, translations, search, and revision history to an existing Rails application—without moving your content into a separate service.
8
8
 
9
- Comfy Middle Seat is actively maintained and continues the lineage of Comfortable Mexican Sofa and Comfortable Media Surfer. It keeps the memorable C.M.S. initials, with a new place to sit. It all depend on who is sitting to your right and left.
9
+ Comfy Middle Seat is actively maintained and continues the lineage of Comfortable Mexican Sofa and Comfortable Media Surfer. It keeps the memorable C.M.S. initials, with a new place to sit. It all depends on who is sitting to your right and left.
10
10
 
11
11
  [Quick Start](#quick-start) · [Features](#features) · [Documentation](#documentation) · [Upgrading](#upgrading) · [Contributing](#contributing)
12
12
 
@@ -14,7 +14,7 @@ class Comfy::Admin::Cms::PagesController < Comfy::Admin::Cms::BaseController
14
14
 
15
15
  before_action :check_for_layouts, only: %i[new edit]
16
16
  before_action :build_page, only: %i[new create]
17
- before_action :load_page, only: %i[edit update destroy publish_children unpublish_children]
17
+ before_action :load_page, only: %i[edit update destroy toggle_publication publish_children unpublish_children]
18
18
 
19
19
  before_action :authorize
20
20
  before_action :assign_page_params, only: :update
@@ -118,6 +118,13 @@ class Comfy::Admin::Cms::PagesController < Comfy::Admin::Cms::BaseController
118
118
  head :not_found
119
119
  end
120
120
 
121
+ def toggle_publication
122
+ @page.update!(is_published: !@page.is_published?)
123
+ status = @page.is_published? ? 'published' : 'unpublished'
124
+ flash[:success] = I18n.t("comfy.admin.cms.pages.#{status}", default: "Page #{status}")
125
+ redirect_to comfy_admin_cms_site_pages_path(@site, params.permit(:q, :categories))
126
+ end
127
+
121
128
  def publish_children
122
129
  update_children_publication(true, :children_published)
123
130
  end
@@ -35,7 +35,10 @@
35
35
 
36
36
  .col-md-4.d-flex.align-items-center.justify-content-md-end
37
37
  .btn-group.btn-group-sm
38
- = link_to t(".add_child_page"), new_comfy_admin_cms_site_page_path(@site, parent_id: page.id), class: "btn btn-outline-secondary"
38
+ - publication_label = page.is_published? ? t(".unpublish", default: "Unpublish") : t(".publish", default: "Publish")
39
+ - publication_path = toggle_publication_comfy_admin_cms_site_page_path(@site, page, q: params[:q], categories: params[:categories])
40
+ = link_to publication_label, publication_path, method: :patch, class: "btn btn-outline-secondary"
41
+ = link_to t(".add_child_page"), new_comfy_admin_cms_site_page_path(@site, parent_id: page.id), class: "btn btn-outline-secondary text-nowrap"
39
42
  = link_to t(".edit"), edit_comfy_admin_cms_site_page_path(@site, page), class: "btn btn-outline-secondary"
40
43
  - unless page.root?
41
44
  = link_to t(".delete"), comfy_admin_cms_site_page_path(@site, page), method: :delete, data: {confirm: t('.are_you_sure')}, class: "btn btn-danger"
@@ -36,6 +36,7 @@ module ComfyMiddleSeat::Routing
36
36
  concerns :with_revisions, controller: 'revisions/page'
37
37
 
38
38
  get :toggle_branch, on: :member
39
+ patch :toggle_publication, on: :member
39
40
  patch :publish_children, on: :member
40
41
  patch :unpublish_children, on: :member
41
42
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ComfyMiddleSeat
4
- VERSION = '4.0.2'
4
+ VERSION = '4.0.4'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: comfy_middle_seat
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Oleg Khabarov