comfy_middle_seat 4.0.1 → 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 +4 -4
- data/CHANGELOG.md +34 -7
- data/README.md +138 -98
- data/app/controllers/comfy/admin/cms/pages_controller.rb +8 -1
- data/app/views/comfy/admin/cms/pages/_index_branch.html.haml +4 -1
- data/comfy_middle_seat.gemspec +4 -0
- data/lib/comfy_middle_seat/routing.rb +1 -0
- data/lib/comfy_middle_seat/version.rb +1 -1
- metadata +5 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b4278365e6cb2036d0909007c27e36878cb58dd915c801f4b9e0c9814a632eaf
|
|
4
|
+
data.tar.gz: 3d17520fe067057e477f7b269fe1eed2afe014846873d21cc5e68eda3041d143
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 046346cefdb3ded2bd29e494d55a7c9ec9d4b84fe129b182a56aff0ce78f9c12802b232ce00bf73898461bd51aa9436759b0e04df0de948e72be45fe59b718e3
|
|
7
|
+
data.tar.gz: 8d888d9f83bd7c91693ba03335303513dde1f9df574f03ac757dcd67dfdf1ce9fbf6f213da0426a18b2ab9b5d46b8884d82b7881d9a292169052ab81b0ea04a0
|
data/CHANGELOG.md
CHANGED
|
@@ -12,12 +12,36 @@ 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
|
+
|
|
15
17
|
### Changed
|
|
16
18
|
|
|
17
|
-
-
|
|
18
|
-
-
|
|
19
|
-
|
|
20
|
-
|
|
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
|
+
|
|
22
|
+
## [v4.0.1] - 2026-09-18
|
|
23
|
+
|
|
24
|
+
### Changed
|
|
25
|
+
|
|
26
|
+
- Remove unsaved-changes navigation warnings. Local draft recovery remains available for Pages and Translations.
|
|
27
|
+
|
|
28
|
+
## [v4.0.0] - 2026-09-18
|
|
29
|
+
|
|
30
|
+
### Added
|
|
31
|
+
|
|
32
|
+
- Search pages by title, path, or content, and find files and images in the editor.
|
|
33
|
+
- Restore or discard locally saved drafts for Pages and Translations.
|
|
34
|
+
- Preview Page and Translation revisions before restoring them.
|
|
35
|
+
- Add `comfy-middle-seat-upgrade` to convert legacy initializers with a backup.
|
|
36
|
+
|
|
37
|
+
### Changed
|
|
38
|
+
|
|
39
|
+
- Complete the rename from Comfortable Media Surfer to Comfy Middle Seat.
|
|
40
|
+
- Load page branches on demand and speed up page reordering.
|
|
41
|
+
- Preserve unsaved content when switching layouts; warn before discarding incompatible fields.
|
|
42
|
+
- Improve revision comparisons and prevent deletion of the root page.
|
|
43
|
+
|
|
44
|
+
**Upgrading:** Rename `config/initializers/comfortable_media_surfer.rb` to `comfy_middle_seat.rb` and replace `ComfortableMediaSurfer` Ruby references with `ComfyMiddleSeat`. Preview initializer conversion with `bundle exec comfy-middle-seat-upgrade --dry-run`. No database migration is required.
|
|
21
45
|
|
|
22
46
|
## [v3.2.1] - 2026-09-17
|
|
23
47
|
|
|
@@ -39,7 +63,7 @@ This changelog follows the project's lineage: **Comfortable Mexican Sofa → Com
|
|
|
39
63
|
### Changed
|
|
40
64
|
|
|
41
65
|
- Publish the gem as `comfy_middle_seat` and rename the gemspec to `comfy_middle_seat.gemspec`.
|
|
42
|
-
- At the time of v3.2.0, preserve the `ComfortableMediaSurfer` Ruby namespace and configuration while retaining the existing routes and database tables. The
|
|
66
|
+
- At the time of v3.2.0, preserve the `ComfortableMediaSurfer` Ruby namespace and configuration while retaining the existing routes and database tables. The v4.0.0 namespace rename supersedes the Ruby compatibility behavior; the database compatibility remains unchanged.
|
|
43
67
|
- Move the version definition to `lib/comfy_middle_seat/version.rb` for release tooling, retaining a compatibility loader at the old path.
|
|
44
68
|
- Run the main test suite in six isolated processes by default, with merged coverage and a separate `test:serial` task for Coveralls.
|
|
45
69
|
- Update CI coverage to Rails 7.2, 8.0, and 8.1, with a separate browser/system test job.
|
|
@@ -57,7 +81,7 @@ This changelog follows the project's lineage: **Comfortable Mexican Sofa → Com
|
|
|
57
81
|
|
|
58
82
|
### Historical v3.2.0 upgrade behavior
|
|
59
83
|
|
|
60
|
-
For v3.2.0, users replaced `comfortable_media_surfer` with `comfy_middle_seat` in the Gemfile while keeping the former Ruby namespace and initializer name. That release-specific compatibility guidance is preserved for history but is superseded by
|
|
84
|
+
For v3.2.0, users replaced `comfortable_media_surfer` with `comfy_middle_seat` in the Gemfile while keeping the former Ruby namespace and initializer name. That release-specific compatibility guidance is preserved for history but is superseded by v4.0.0: current upgrades must rename the initializer to `config/initializers/comfy_middle_seat.rb` and replace `ComfortableMediaSurfer` Ruby references with `ComfyMiddleSeat`. Neither stage changes the database schema.
|
|
61
85
|
|
|
62
86
|
## Comfortable Media Surfer — inherited releases
|
|
63
87
|
|
|
@@ -186,7 +210,10 @@ First release of `comfortable_media_surfer`. This new gem is a revival of [Comfo
|
|
|
186
210
|
|
|
187
211
|
- Rebranded **ComfortableMexicanSofa** as **ComfortableMediaSurfer** in order to publish new gem (database table names and schema have not changed).
|
|
188
212
|
|
|
189
|
-
[Unreleased]: https://github.com/avonderluft/comfy-middle-seat/compare/
|
|
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
|
|
215
|
+
[v4.0.1]: https://github.com/avonderluft/comfy-middle-seat/compare/v4.0.0...v4.0.1
|
|
216
|
+
[v4.0.0]: https://github.com/avonderluft/comfy-middle-seat/compare/v3.2.1...v4.0.0
|
|
190
217
|
[v3.2.1]: https://github.com/avonderluft/comfy-middle-seat/compare/v3.2.0...v3.2.1
|
|
191
218
|
[v3.2.0]: https://github.com/avonderluft/comfy-middle-seat/compare/eeb5d590f47b5d6bb70191fb81c781540753fa97...v3.2.0
|
|
192
219
|
[v3.1.7]: https://github.com/shakacode/comfortable-media-surfer/compare/v3.1.6...v3.1.7
|
data/README.md
CHANGED
|
@@ -2,69 +2,85 @@
|
|
|
2
2
|
|
|
3
3
|
# Comfy Middle Seat
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
*A self-hosted, embeddable CMS engine for Rails 7.2+, 8.x*
|
|
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
|
-
|
|
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
|
|
|
13
|
-
|
|
14
|
-
- **[oCcaMS](https://github.com/avonderluft/occams)** was an attempted revival of Sofa. Andrew vonderLuft was a contributor to [RadiantCMS](https://github.com/radiant/radiant) back in the day, but that project became inactive. He found Sofa and liked it even better than Radiant, but sadly it too became inactive. Hence Occams.
|
|
15
|
-
- **[Comfortable Media Surfer](https://github.com/shakacode/comfortable-media-surfer)** revived Sofa under the sponsorship of ShakaCode, continuing its development for modern Rails applications.
|
|
16
|
-
- **[Comfy Middle Seat](https://github.com/avonderluft/comfy-middle-seat)** began as a fork of Comfortable Media Surfer and is now implemented under its own `ComfyMiddleSeat` namespace and `comfy_middle_seat` paths.
|
|
13
|
+
## Why Comfy Middle Seat?
|
|
17
14
|
|
|
18
|
-
|
|
15
|
+
Choose Comfy Middle Seat when you want content editing inside your Rails application rather than a separate hosted CMS.
|
|
19
16
|
|
|
20
|
-
|
|
17
|
+
- Keep application code and CMS-rendered pages together.
|
|
18
|
+
- Own and host your content, database, and files.
|
|
19
|
+
- Use familiar Rails controllers, views, helpers, authentication, and authorization.
|
|
20
|
+
- Add CMS-managed pages without creating a separate frontend application.
|
|
21
|
+
- Extend or override the admin area using normal Rails conventions.
|
|
22
|
+
|
|
23
|
+
Comfy Middle Seat is best suited to Rails applications that render their own websites. It is not intended to be a hosted SaaS CMS or a JavaScript-first visual page builder.
|
|
21
24
|
|
|
22
|
-
|
|
23
|
-
* The CMS keeps clear from the rest of your application
|
|
24
|
-
* Powerful page templating capability using [Content Tags](https://github.com/shakacode/comfortable-media-surfer/wiki/Docs:-Content-Tags)
|
|
25
|
-
* [Multiple Sites](https://github.com/shakacode/comfortable-media-surfer/wiki/Sites) from a single installation
|
|
26
|
-
* Multi-Language Support (i18n) (ca, cs, da, de, en, es, fi, fr, gr, hr, it, ja, nb, nl, pl, pt-BR, ru, sv, tr, uk, zh-CN, zh-TW) and page localization.
|
|
27
|
-
* [CMS Seeds](https://github.com/shakacode/comfortable-media-surfer/wiki/CMS-Seeds) for initial content population
|
|
28
|
-
* [Revision History](https://github.com/shakacode/comfortable-media-surfer/wiki/Revisions) to revert changes
|
|
29
|
-
* [Extendable Admin Area](https://github.com/shakacode/comfortable-media-surfer/wiki/HowTo:-Reusing-Admin-Area) built with [Bootstrap 4](http://getbootstrap.com) (responsive design). Using [CodeMirror](http://codemirror.net) for HTML and Markdown highlighing and [Redactor](http://imperavi.com/redactor) as the WYSIWYG editor.
|
|
25
|
+
## Features
|
|
30
26
|
|
|
31
|
-
|
|
27
|
+
### For content editors
|
|
32
28
|
|
|
33
|
-
-
|
|
34
|
-
-
|
|
35
|
-
-
|
|
29
|
+
- Hierarchical pages with fast, on-demand tree navigation.
|
|
30
|
+
- Rich text, Markdown, plain text, images, files, dates, numbers, checkboxes, and reusable snippets.
|
|
31
|
+
- Search across page titles, paths, and content.
|
|
32
|
+
- Searchable image and file selection inside the editor.
|
|
33
|
+
- Local draft recovery for Pages and Translations.
|
|
34
|
+
- Revision history with comparison, preview, and restore workflows.
|
|
35
|
+
- Page translations and multilingual publishing.
|
|
36
|
+
- Multi-site publishing from one installation.
|
|
37
|
+
- Controls to publish or unpublish child pages together.
|
|
36
38
|
|
|
37
|
-
|
|
39
|
+
### For Rails developers
|
|
38
40
|
|
|
39
|
-
|
|
41
|
+
- Drop-in Rails engine with configurable admin and public routes.
|
|
42
|
+
- Flexible layouts built with simple `{{ cms:... }}` content tags.
|
|
43
|
+
- Active Storage integration for files and images.
|
|
44
|
+
- CMS seed files for version-controlled starter content.
|
|
45
|
+
- Configurable authentication and authorization.
|
|
46
|
+
- Extendable admin views, controllers, helpers, and partials.
|
|
47
|
+
- Stable `comfy_cms_*` database tables for upgrades from Sofa and Surfer.
|
|
48
|
+
- CI coverage across current Ruby and Rails releases.
|
|
40
49
|
|
|
41
|
-
##
|
|
50
|
+
## Quick Start
|
|
42
51
|
|
|
43
|
-
Add gem
|
|
52
|
+
Add the gem to your Rails application's `Gemfile`:
|
|
44
53
|
|
|
45
54
|
```ruby
|
|
46
|
-
gem "comfy_middle_seat", "~>
|
|
55
|
+
gem "comfy_middle_seat", "~> 4.0"
|
|
47
56
|
```
|
|
48
57
|
|
|
49
|
-
|
|
58
|
+
Install the gem and generate the CMS:
|
|
50
59
|
|
|
51
60
|
```sh
|
|
52
61
|
bundle install
|
|
53
|
-
rails
|
|
54
|
-
rails
|
|
55
|
-
rails
|
|
62
|
+
bin/rails active_storage:install
|
|
63
|
+
bin/rails generate comfy:cms
|
|
64
|
+
bin/rails db:migrate
|
|
65
|
+
bin/rails comfy:compile_assets
|
|
56
66
|
```
|
|
57
67
|
|
|
58
|
-
|
|
68
|
+
The generator adds the CMS routes and creates `config/initializers/comfy_middle_seat.rb`.
|
|
59
69
|
|
|
60
|
-
|
|
70
|
+
Make sure the public content route remains after your application's other routes so it does not capture them first:
|
|
61
71
|
|
|
62
72
|
```ruby
|
|
63
73
|
comfy_route :cms_admin, path: "/admin"
|
|
64
74
|
comfy_route :cms, path: "/"
|
|
65
75
|
```
|
|
66
76
|
|
|
67
|
-
|
|
77
|
+
Start Rails and open [http://localhost:3000/admin](http://localhost:3000/admin). The generated development credentials are `user` and `pass`.
|
|
78
|
+
|
|
79
|
+
> **Security:** Replace the default admin credentials or configure application authentication before exposing the admin area to a network.
|
|
80
|
+
|
|
81
|
+
### Basic configuration
|
|
82
|
+
|
|
83
|
+
Use the `ComfyMiddleSeat` namespace in `config/initializers/comfy_middle_seat.rb`:
|
|
68
84
|
|
|
69
85
|
```ruby
|
|
70
86
|
ComfyMiddleSeat.configure do |config|
|
|
@@ -72,52 +88,87 @@ ComfyMiddleSeat.configure do |config|
|
|
|
72
88
|
config.admin_base_controller = "ApplicationController"
|
|
73
89
|
end
|
|
74
90
|
|
|
75
|
-
ComfyMiddleSeat::AccessControl::AdminAuthentication.username = "user"
|
|
91
|
+
ComfyMiddleSeat::AccessControl::AdminAuthentication.username = "admin-user"
|
|
76
92
|
ComfyMiddleSeat::AccessControl::AdminAuthentication.password = "change-me"
|
|
77
93
|
```
|
|
78
94
|
|
|
79
|
-
|
|
95
|
+
The initializer documents additional options for authentication, authorization, revisions, locales, seeds, helpers, partials, and application integration.
|
|
96
|
+
|
|
97
|
+
## How content works
|
|
98
|
+
|
|
99
|
+
A Site defines a hostname, path, and language. Layouts define page structure and the fields editors can manage. For example:
|
|
100
|
+
|
|
101
|
+
```html
|
|
102
|
+
<div id="page">
|
|
103
|
+
{{ cms:snippet header }}
|
|
104
|
+
<div id="main">
|
|
105
|
+
<div id="content">
|
|
106
|
+
{{ cms:breadcrumbs }}
|
|
107
|
+
{{ cms:siblings exclude: "search,comments" }}
|
|
108
|
+
<hr/>
|
|
109
|
+
{{ cms:markdown content }}
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
When an editor creates a Page using this Layout, the admin automatically presents fields for `title` and `content`. Content tags can also provide Markdown, files, images, dates, numbers, checkboxes, snippets, partials, helpers, navigation, and other reusable content.
|
|
80
116
|
|
|
81
|
-
|
|
117
|
+
## Compatibility and requirements
|
|
82
118
|
|
|
83
|
-
|
|
84
|
-
|
|
119
|
+
| Component | Support |
|
|
120
|
+
| --- | --- |
|
|
121
|
+
| Ruby | 3.2 or newer; CI tests 3.3, 3.4, and 4.0 |
|
|
122
|
+
| Rails | CI tests 7.2, 8.0, and 8.1 |
|
|
123
|
+
| Node.js | 18 or newer for asset compilation |
|
|
124
|
+
| File storage | Active Storage |
|
|
125
|
+
| Image processing | ImageMagick |
|
|
126
|
+
|
|
127
|
+
Pagination is provided by [Kaminari](https://github.com/amatsuda/kaminari). The admin uses Bootstrap, CodeMirror, and Redactor.
|
|
128
|
+
|
|
129
|
+
## Documentation
|
|
130
|
+
|
|
131
|
+
The [Comfortable Media Surfer Wiki](https://github.com/shakacode/comfortable-media-surfer/wiki) remains a reference for inherited CMS features while first-party Comfy Middle Seat documentation is expanded.
|
|
132
|
+
|
|
133
|
+
Useful starting points:
|
|
134
|
+
|
|
135
|
+
- [Content Tags](https://github.com/shakacode/comfortable-media-surfer/wiki/Content-Tags)
|
|
136
|
+
- [Multiple Sites](https://github.com/shakacode/comfortable-media-surfer/wiki/Sites)
|
|
137
|
+
- [CMS Seeds](https://github.com/shakacode/comfortable-media-surfer/wiki/CMS-Seeds)
|
|
138
|
+
- [Revision History](https://github.com/shakacode/comfortable-media-surfer/wiki/Revisions)
|
|
139
|
+
- [Extending the Admin Area](https://github.com/shakacode/comfortable-media-surfer/wiki/HowTo:-Reusing-Admin-Area)
|
|
140
|
+
- [Changelog](CHANGELOG.md)
|
|
141
|
+
|
|
142
|
+
When adapting upstream examples, use the `comfy_middle_seat` gem, `config/initializers/comfy_middle_seat.rb`, and the `ComfyMiddleSeat` Ruby namespace.
|
|
143
|
+
|
|
144
|
+
## Upgrading
|
|
145
|
+
|
|
146
|
+
### From Comfortable Media Surfer
|
|
147
|
+
|
|
148
|
+
1. Replace `comfortable_media_surfer` with `comfy_middle_seat` in the `Gemfile`. Do not include both gems.
|
|
149
|
+
2. Run `bundle install`.
|
|
150
|
+
3. Preview and run the standalone initializer converter from the Rails application root:
|
|
85
151
|
|
|
86
152
|
```sh
|
|
87
153
|
bundle exec comfy-middle-seat-upgrade --dry-run
|
|
88
154
|
bundle exec comfy-middle-seat-upgrade
|
|
89
155
|
```
|
|
90
156
|
|
|
91
|
-
|
|
92
|
-
3. In any other application integrations, replace Ruby references to `ComfortableMediaSurfer` with `ComfyMiddleSeat`.
|
|
157
|
+
4. Replace any remaining Ruby references from `ComfortableMediaSurfer` to `ComfyMiddleSeat`.
|
|
93
158
|
|
|
94
|
-
|
|
159
|
+
The converter renames `config/initializers/comfortable_media_surfer.rb` to `config/initializers/comfy_middle_seat.rb`, updates namespace references, and preserves the original as a `.bak` file. It refuses to overwrite an existing initializer or backup.
|
|
95
160
|
|
|
96
|
-
|
|
97
|
-
# Before
|
|
98
|
-
ComfortableMediaSurfer.configure do |config|
|
|
99
|
-
config.cms_title = "My CMS"
|
|
100
|
-
end
|
|
161
|
+
The existing `comfy_cms_*` tables, schema, and stored records are used as-is. No CMS database migration is required for this upgrade.
|
|
101
162
|
|
|
102
|
-
|
|
103
|
-
ComfyMiddleSeat.configure do |config|
|
|
104
|
-
config.cms_title = "My CMS"
|
|
105
|
-
end
|
|
106
|
-
```
|
|
163
|
+
### From Comfortable Mexican Sofa
|
|
107
164
|
|
|
108
|
-
|
|
165
|
+
Upgrade the application to Rails 7.2 or newer, replace the old gem with `comfy_middle_seat`, run `bundle install`, generate or convert `config/initializers/comfy_middle_seat.rb`, and update application integrations to use `ComfyMiddleSeat`.
|
|
109
166
|
|
|
110
|
-
|
|
167
|
+
Sofa and Comfy Middle Seat use the same `comfy_cms_*` database table names, so the CMS tables do not need to be renamed.
|
|
111
168
|
|
|
112
|
-
|
|
169
|
+
### From Occams
|
|
113
170
|
|
|
114
|
-
|
|
115
|
-
gem "comfy_middle_seat", "~> 3.2.0"
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### From Occams to Middle Seat
|
|
119
|
-
|
|
120
|
-
The project must be on Rails 7.2 or newer. Unlike Surfer and Sofa, Occams used different table names, so converting an Occams database requires the following SQL. This is an Occams data conversion, not a migration caused by the current `ComfyMiddleSeat` namespace or internal-path change.
|
|
171
|
+
Upgrade the application to Rails 7.2 or newer and replace Occams with `comfy_middle_seat`. Occams used different table names and namespace values, so its data requires conversion:
|
|
121
172
|
|
|
122
173
|
```sql
|
|
123
174
|
ALTER TABLE occams_cms_categories RENAME TO comfy_cms_categories;
|
|
@@ -141,55 +192,44 @@ UPDATE comfy_cms_revisions SET record_type = 'Comfy::Cms::Snippet' WHERE record_
|
|
|
141
192
|
UPDATE active_storage_attachments SET record_type = 'Comfy::Cms::File' WHERE record_type = 'Occams::Cms::File';
|
|
142
193
|
```
|
|
143
194
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
After finishing installation you should be able to navigate to http://localhost:3000/admin
|
|
195
|
+
Back up the database and test this conversion outside production first.
|
|
147
196
|
|
|
148
|
-
|
|
197
|
+
## Project history
|
|
149
198
|
|
|
150
|
-
|
|
199
|
+
- [Comfortable Mexican Sofa](https://github.com/comfy/comfortable-mexican-sofa), created by Oleg Khabarov, established the original Rails CMS.
|
|
200
|
+
- [oCcaMS](https://github.com/avonderluft/occams) explored a revival after Sofa became inactive.
|
|
201
|
+
- [Comfortable Media Surfer](https://github.com/shakacode/comfortable-media-surfer), sponsored by ShakaCode, brought the project forward for current Rails versions.
|
|
202
|
+
- [Comfy Middle Seat](https://github.com/avonderluft/comfy-middle-seat) continues that work under its own namespace, release line, and maintenance direction.
|
|
151
203
|
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
```html
|
|
155
|
-
<html>
|
|
156
|
-
<body>
|
|
157
|
-
<h1>{{ cms:text title }}</h1>
|
|
158
|
-
{{ cms:wysiwyg content }}
|
|
159
|
-
</body>
|
|
160
|
-
</html>
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
Once you have a layout, you may start creating pages and populating content. It's that easy.
|
|
164
|
-
|
|
165
|
-
## Documentation
|
|
166
|
-
|
|
167
|
-
The [Comfortable Media Surfer Wiki](https://github.com/shakacode/comfortable-media-surfer/wiki) remains an upstream reference for inherited CMS features, including [Content Tags](https://github.com/shakacode/comfortable-media-surfer/wiki/Docs:-Content-Tags). These historical upstream links are intentionally preserved. When adapting its examples, use the `comfy_middle_seat` gem, `config/initializers/comfy_middle_seat.rb`, and the `ComfyMiddleSeat` Ruby namespace; upstream examples that use `ComfortableMediaSurfer` show the former API and must be updated.
|
|
204
|
+
See the [Changelog](CHANGELOG.md), [Sofa releases](https://github.com/comfy/comfortable-mexican-sofa/releases), and [Surfer releases](https://github.com/shakacode/comfortable-media-surfer/releases) for the complete inherited history.
|
|
168
205
|
|
|
169
206
|
## Add-ons
|
|
170
207
|
|
|
171
|
-
|
|
172
|
-
[ComfyBlog](https://github.com/comfy/comfy-blog).
|
|
173
|
-
|
|
174
|
-

|
|
208
|
+
For blog functionality, see [ComfyBlog](https://github.com/comfy/comfy-blog).
|
|
175
209
|
|
|
210
|
+
## Contributing
|
|
176
211
|
|
|
177
|
-
|
|
212
|
+
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for setup and pull-request guidance.
|
|
178
213
|
|
|
179
|
-
|
|
214
|
+
The main checks are:
|
|
180
215
|
|
|
181
|
-
|
|
216
|
+
```sh
|
|
217
|
+
bundle exec rake test
|
|
218
|
+
bundle exec rails test:system
|
|
219
|
+
bundle exec rubocop
|
|
220
|
+
```
|
|
182
221
|
|
|
183
|
-
|
|
184
|
-
- `rake db:test:prepare`
|
|
185
|
-
- `rake test`
|
|
222
|
+
Bug reports and focused feature proposals can be opened through [GitHub Issues](https://github.com/avonderluft/comfy-middle-seat/issues).
|
|
186
223
|
|
|
187
|
-
|
|
224
|
+
## Acknowledgements
|
|
188
225
|
|
|
189
|
-
-
|
|
190
|
-
-
|
|
191
|
-
-
|
|
226
|
+
- [Oleg Khabarov](https://github.com/GBH) and the contributors to [Comfortable Mexican Sofa](https://github.com/comfy/comfortable-mexican-sofa), the original Comfy CMS.
|
|
227
|
+
- [Andrew vonderLuft](https://github.com/avonderluft) for reviving Sofa with the [oCcaMS](https://github.com/avonderluft/occams) project, and carrying it forward.
|
|
228
|
+
- [ShakaCode](https://github.com/shakacode) for sponsoring the revived project as [Comfortable Media Surfer](https://github.com/shakacode/comfortable-media-surfer).
|
|
229
|
+
- [Roman Almeida](https://github.com/nasmorn) for contributing the OEM license for [Redactor Text Editor](https://imperavi.com/redactor/).
|
|
192
230
|
|
|
193
231
|
---
|
|
194
232
|
|
|
195
|
-
Copyright 2010-2019 Oleg Khabarov, 2024-2026 ShakaCode LLC, 2026 Andrew vonderLuft
|
|
233
|
+
Copyright 2010-2019 Oleg Khabarov, 2024-2026 ShakaCode LLC, 2026 Andrew vonderLuft.
|
|
234
|
+
|
|
235
|
+
Released under the [MIT License](LICENSE).
|
|
@@ -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
|
-
=
|
|
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"
|
data/comfy_middle_seat.gemspec
CHANGED
|
@@ -26,6 +26,10 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
|
|
27
27
|
spec.required_ruby_version = '>= 3.2.0'
|
|
28
28
|
spec.metadata['rubygems_mfa_required'] = 'true'
|
|
29
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
|
30
|
+
spec.metadata['bug_tracker_uri'] = "#{spec.homepage}/issues"
|
|
31
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/CHANGELOG.md"
|
|
32
|
+
spec.metadata['documentation_uri'] = "#{spec.homepage}/blob/master/README.md#documentation"
|
|
29
33
|
|
|
30
34
|
spec.add_dependency 'active_link_to', '~> 1.0', '>= 1.0.5'
|
|
31
35
|
spec.add_dependency 'comfy_bootstrap_form', '~> 4.0', '>= 4.0.0'
|
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.
|
|
4
|
+
version: 4.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oleg Khabarov
|
|
@@ -647,6 +647,10 @@ licenses:
|
|
|
647
647
|
- MIT
|
|
648
648
|
metadata:
|
|
649
649
|
rubygems_mfa_required: 'true'
|
|
650
|
+
source_code_uri: https://github.com/avonderluft/comfy-middle-seat
|
|
651
|
+
bug_tracker_uri: https://github.com/avonderluft/comfy-middle-seat/issues
|
|
652
|
+
changelog_uri: https://github.com/avonderluft/comfy-middle-seat/blob/master/CHANGELOG.md
|
|
653
|
+
documentation_uri: https://github.com/avonderluft/comfy-middle-seat/blob/master/README.md#documentation
|
|
650
654
|
post_install_message: |
|
|
651
655
|
Please run rake comfy:compile_assets to compile assets.
|
|
652
656
|
Upgrading from comfortable_media_surfer? Run bundle exec comfy-middle-seat-upgrade --dry-run first.
|