<img src=“https://badge.fury.io/rb/cms-fortress.png” alt=“Gem Version” /> <img src=“https://gemnasium.com/melvinsembrano/cms-fortress.png” alt=“Dependencies” /> <img src=“https://codeclimate.com/github/melvinsembrano/cms-fortress.png” alt=“Code Climate” />

cms-fortress

An extension for the awesome Comfortable Mexican Sofa (github.com/comfy/comfortable-mexican-sofa) CMS Engine

  • Added Role Management for proper workflow

  • Added Devise for User and Session Management

  • Added User Management

  • Added Page caching control

  • Added proper page workflow

  • Customizable menus, role abilities

  • Added layout theming, current themes (:default, :wide)

  • Integrate Cms::Files (image,video and link) attachements into WYSIWYG editor buttons (wide theme only)

NOTE: with the major changes of comfy-sofa, cms-fortress supports only Rails 4.0++

Installation

Add gem defintion to your Gemfile:

gem 'cms-fortress'

Then from the Rails project’s root run:

bundle install
rails generate cms:fortress
rake db:migrate

After that run your app and navigate to localhost:3000/cms-admin to start creating your pages, and also don’t forget to delete your public/index.html file.

login using the following info below:

username: [email protected]
password: 1234qwer

Adding custom role details

You can create a custom role ability via a three-step process.

1: Edit config/roles.yml and add the new role under the category you wish.

contents:
  - pages
  - files
  - page.review
  - page.publish
designs:
  - layouts
  - snippets
settings:
  - sites
  - roles
  - users
  - *my_role_detail*

2: Configure cms-fortress to add a new resource. Add this in an initializer:

Cms::Fortress.configure do |config|
  config.settings_resources << {
    :name => 'my_role_detail',
    :title => 'i18n.label.title', # this is passed to the t() function - can be plain text
    :path => 'admin_my_role_details_path'
  }
  # the other two lists are "content_resources" and "design_resources"
end

The path is eval’d at runtime, so you can use Rails helper methods such as current_user or @site in it. If the result is nil, the link will not show up in the left nav bar.

3: Restart the server. Go into each Role you have defined and click “Load New Roles”. Voila!

Other configuration

You can turn off page workflow or page caching via configuration:

Cms::Fortress.configure do |config|
  config.theme = :wide
  config.enable_page_workflow = false
  config.enable_page_caching = false
end

Wide Theme

With wide theme, the layout and menus are being compacted so that you have all the area for authoring. Files are also being nicely integrated to the WYSIWYG editor (tinymce). Below are the fetures for wide theme:

  • Compact Layout and Menus

  • Responsive Layout

  • Fullcreen Editing

  • Integrated image file attachement

  • Integrated video file attachment

  • Integrated link file attachement

TODO: More customization documents and sample

For more Comfortable Mexican Sofa awesomeness visit the wiki page here github.com/comfy/comfortable-mexican-sofa/wiki

Contributing to cms-fortress

  • Check out the latest master to make sure the feature hasn’t been implemented or the bug hasn’t been fixed yet.

  • Check out the issue tracker to make sure someone already hasn’t requested it and/or contributed it.

  • Fork the project.

  • Start a feature/bugfix branch.

  • Commit and push until you are happy with your contribution.

  • Make sure to add tests for it. This is important so I don’t break it in a future version unintentionally.

  • Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.

Copyright © 2013 Melvin Sembrano. See LICENSE.txt for further details.