Rails static pages CMS engine - ruby-on-rails

I need simple CMS to allow non-tech folks edit some static text in app I maintaing. App is in rails 3.2 and is multilingual. What would here fit best?

You might want to take a look at Refinery which is now a mountable engine. Version 2.0 has been released a few days ago.
There is also a bunch of other CMS, it all depend on your needs:
Locomotive. There is a 2.0.0.rc branch which is now a mountable engine. This looks promising with custom content type!!!
Comfortable Mexican Sofa (editorial: best CMS name, ever!)
Browser CMS
Radiant CMS
and a lot more...see most of them on Ruby-Toolbox

my suggestion is just add a WYSIWYG like CKeditor to text box. ckeditor gem
ps. rails it self can be a simple cms ... just rails g scaffold

tinyMCE will allow you to do images etc, but really if you're using rails for this stuff i would (and do), use tinyMCE for text then add paperclip to add the images and video (possibly also swfupload if the videos are big).
Then you can build your template as required and pull stuff in based on the page.id or other identified.
back to multilingual:
you'll want to model up 'my_cms_item' eg. news_item and 'my_cms_item_translation' e.g. 'news_item_translation' and create a 1-Many for these so that when a user creates a news_item they can select to add additional translations in whichever language and the system just detects and pulls if available. You can make it either hide the item or default to a translation as required.

Related

Locomotive CMS with Rails - location for liquid templates

I'm new to both Ruby on Rails and Locomotive CMS, but I'm just starting to create my first site with them.
I've got the engine running in a full Rails app (I'm going to need to deploy it on our own server later on). But it's just spitting out the 'Template' content defined through the admin interface, without any other template/content around it.
I can 'fix' it by shoving the html for the whole page in through this input field. But that's not right, surely? The Getting Started guide talks of putting the templates in the filesystem, at something like: Pages/index/first page. "All pages are inherited from index". I have an index.liquid under views/pages but it's not picking that up... (I've tried a couple of other locations too).
I'm sure this is a dumb question, but please could someone tell me where to put my template in the file system? Or how to point Locomotive to pick it up from the right place?
(I did get the file system liquid template working by defining it through the Rails way, with a route, a controller and adding a liquid template initializer I found here. But then it's missing the variables that should come from the CMS content).
I'm loading the site using bundle exec unicorn_rails. And I'm using Rails v3.2.13, Ruby v1.9.3 and Locomotive_cms v2.2.2.
Thanks!
I'm Didier from LocomotiveCMS.
LocomotiveCMS is a little bit different from the other CMS, in a sense, we offer a tool named Wagon to manage your site locally without having to install mongodb, rails and some other components.
Another huge benefit is that you can write your templates in HAML and your CSS in SASS/ SCSS or Less (we embedded Compass as well) and with our preferred texts editor (editing a whole site in a browser is a nightmare).
That's a nice eco-system in order to be super efficient when it comes to develop a LocomotiveCMS site.
Once you're done with your local work, you can deploy your site to a remote LocomotiveCMS engine in a similar way you push your application to Heroku. Actually, pushing a site will create the back-office for the final end user.
I suggest you to read that page.
http://doc.locomotivecms.com/guides/get-started/requirements
and this one too
http://www.locomotivecms.com/tour
Our message is still not clear on our official website but believe me, we are working to make it better.
Hope it will help you !
Didier

User custom theme support with rails assets pipeline

I have a rails app that allows users to create their own website easily but they share the same page structure.
I plan to switch my classic rails views for a templating language such as liquid or handlebars.
The goal is that my users could upload their own version of templates and css to completely customize the look and feel of their website.
Example of workflow :
User upload a theme folder containing Templates and Css files
Their website automatically uses this new templates and designs
Is it possible to do that and continue to take advantages of the Rails Assets pipeline?
Thanks a lot for your answers !
This might be something you can try: http://www.krautcomputing.com/blog/2012/03/27/how-to-compile-custom-sass-stylesheets-dynamically-during-runtime/.
I've used this in a Rails 3.2x project and it works fine, but I'm having difficulties getting it working in a different (somewhat modified Rails 4 project).
It's older article about compiling css on the fly using the Sprockets::StaticCompiler class.

Can an admin template be used in a Ruby on Rails web app?

I have been doing UI research and have come across admin templates at http://themeforest.net/. I was wondering how do you apply these onto a web app built on Rails. These templates look very similar to wordpress themes. Are they that easy to configure? Is it just as simple as setting up a link to the database to make the fields form capture data? I've been looking at this theme.
For admin templates I recommend using Active Admin. It's relatively easy to implement and gives you great admin screens with little effort.
Yes, You can. I'm trying to solve the same problem and so far I have a couple options:
1.) do it by hand, I've done this before, it works but takes a lot of time to truly understand how your theme is put together. First I would recommend using the included themes assets exactly as they are bundled with the theme. Don't assume that just because you have twitter-bootstrap-rails gem that the bootstrap classes in the theme will work. Link the assets statically and slowly extract out the static assets and replace them in the asset pipeline once you know they work.
2.) Use the strategy suggested in the install_theme gem (http://drnicwilliams.com/2009/10/06/install-any-html-themetemplate-into-your-rails-app/) the gem itself is not maintained any longer (i'm not sure about any forks), but the strategy is sound. Extract the core parts of the template into partials.
The short answer is yes, but there is no straight forward way to "import to rails"

Rails 3 CMS that doesn't mess with your application's code

For a client I have to build a CMS with my Rails 3.2.2 application. The thing is, the app is ready-to-go. Without the CMS, that is. I just have to implement a CMS, but when I tried to do that with RefineryCMS (following Refinery's own instructions), it didn't work, because Refinery didn't pick up the CSS and pages I had made.
What should I do? Is there another, useful CMS-plugin for an existing Rails app? Or should I build a CMS myself, with stuff such as omni-auth? If so, is there a tutorial around for building such a CMS?
Thanks a lot!
Have a look at copycopter it might fit your needs.

Help with rails and tinyMce

I have been using tinyMce_hammer plugin to use tinymce in my rails app... but right now I also want a way for my users to upload photos and insert them into their wysiwyg editor.... is there a simple way to get this done??.. is there any other wysiwyg editor that works with rails and comes with this feature built in??... what do you reccomend?
These two plugins claim to offer it - Rails 2.3 - https://github.com/andreferraro/rails_tiny_mce
Rails 3 - https://github.com/sandipransing/rails_tiny_mce
I don't think there's an easy way to do this in any of the common rich text editors. I usually have a separate section where users can upload photos and then choose from a variety of layout options.
TinyMCE has a couple of commercial image and file management plugins, but they are based on PHP and .Net. However, I haven't seen a Rails version. It's not particularly hard to build your own image manager using a plugin like paperclip and hook into TinyMCE.

Resources