New ajaxy CMS on Rails: adminpages


#1

hey, i’ve created a basic content management system using rails and
scriptaculous. I posted a first version last week, but I heavily
extended it since then.

Features:
Pages are arranged in a sortable tree (sortable by drag and drop)
Pages have “nice” URLS (no /index?articleid=97361496 or something)
Cacheing on page basis
every page has a layout with a number of columns
page elements can be put into the columns by drag and drop (sortable
lists)
Each page element has its own view and controller. Up to now I have
created Title, raw HTML, rich text editor and rails component, but
adding your own elements should be easy

You can check it out under http://adminpages.flowdev.de

Source: http://www.flowdev.de/adminpages_0.2.tar.gz

Of course there are many rough edges, but come on, second version!

And yes, it is BSD licensed. I would love it if any of you are
interested in joining me in the development. Mail me, then I will put it
on rubyforge

Cheers,
Martin (Username wooyay on #rubyonrails)


#2

Martin S. wrote:

hey, i’ve created a basic content management system using rails and
scriptaculous. I posted a first version last week, but I heavily
extended it since then.

Features:
Pages are arranged in a sortable tree (sortable by drag and drop)
Pages have “nice” URLS (no /index?articleid=97361496 or something)
Cacheing on page basis
every page has a layout with a number of columns
page elements can be put into the columns by drag and drop (sortable
lists)
Each page element has its own view and controller. Up to now I have
created Title, raw HTML, rich text editor and rails component, but
adding your own elements should be easy

You can check it out under http://adminpages.flowdev.de

That looks quite usable, nice interface!
I will take a look at the code.
Stan


#3

Hello Martin,

Very nice work on what you have so far - it’s amazing at what can be
accomplished with little added code with Rails, still gets me every
time…

Best I get to the point eh? What I wanted to remind you of is to post
on
the Rails Wiki - Your work with this, if you haven’t already. I just
looked
and hope that I didn’t somehow miss it.

http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS


#4

It is very nice and useful too. Only problem I have is this:
I created a simple table for news. I also created the controller and
views using scaffold. But when I try to “add render component” I get an
error that controller news with action list does not exit.

Martin S. wrote:

lists)
And yes, it is BSD licensed. I would love it if any of you are
interested in joining me in the development. Mail me, then I will put it
on rubyforge

Cheers,
Martin (Username wooyay on #rubyonrails)


Alexander A.
Information Systems Department
Mediterranean Agronomic Institute of Chania
Tel.: +30 28210 35000 718
Email: removed_email_address@domain.invalid


#5

Joe ManFoo wrote:

Hello Martin,

Very nice work on what you have so far - it’s amazing at what can be
accomplished with little added code with Rails, still gets me every
time…

Best I get to the point eh? What I wanted to remind you of is to post
on
the Rails Wiki - Your work with this, if you haven’t already. I just
looked
and hope that I didn’t somehow miss it.

http://wiki.rubyonrails.org/rails/pages/Ruby+on+Rails+based+CMS

Hi Joe,
yes, I will add it as soon as I have uploaded it to RubyForge.

Alexander,
Yes, it was a typo. In page_elements_controller, change
render_component_to_string to render_component_as_string.

I did some other minor changes, you can get the newest package at
http://www.flowdev.de/adminpages_0.2.1.tar.gz


#6

Martin S. wrote:

hey, i’ve created a basic content management system using rails and
scriptaculous. I posted a first version last week, but I heavily
extended it since then.

Features:
Pages are arranged in a sortable tree (sortable by drag and drop)
Pages have “nice” URLS (no /index?articleid=97361496 or something)
Cacheing on page basis
every page has a layout with a number of columns
page elements can be put into the columns by drag and drop (sortable
lists)
Each page element has its own view and controller. Up to now I have
created Title, raw HTML, rich text editor and rails component, but
adding your own elements should be easy

You can check it out under http://adminpages.flowdev.de

Source: http://www.flowdev.de/adminpages_0.2.tar.gz

Of course there are many rough edges, but come on, second version!

And yes, it is BSD licensed. I would love it if any of you are
interested in joining me in the development. Mail me, then I will put it
on rubyforge

Cheers,
Martin (Username wooyay on #rubyonrails)

I took a look at your cms. It would be great if there was a way to
define the relative position of the columns in the editor. Is that
possible?


#7

Looks pretty interesting - but I could use a couple sentences worth of
documentation. A very short README file would do. I downloaded the tar
file,
created a mysql database, loaded the datamodel, and started Webrick.
Then I
couldn’t find any pages. After looking at your demo site, I deduced that
I
need /page/$STUB to find the pages I see in the database. That gives me
the
“show” part. But how do I find the admin pages to do editing? On your
demo
site, that’s what you get at /. Clearly that isn’t what you want on a
real
site, but reading routes.rb and poking around in app/views/ didn’t
enlighten
me about where to find the login and admin pages. Thanks,


#8

Cynthia K. wrote:

Looks pretty interesting - but I could use a couple sentences worth of
documentation. A very short README file would do. I downloaded the tar
file,
created a mysql database, loaded the datamodel, and started Webrick.
Then I
couldn’t find any pages. After looking at your demo site, I deduced that
I
need /page/$STUB to find the pages I see in the database. That gives me
the
“show” part. But how do I find the admin pages to do editing? On your
demo
site, that’s what you get at /. Clearly that isn’t what you want on a
real
site, but reading routes.rb and poking around in app/views/ didn’t
enlighten
me about where to find the login and admin pages. Thanks,

Hi Cynthia,
you probably downloaded the 0.2 version, I changed the routes.rb in the
0.2.1 version. It now looks like this:

ActionController::Routing::Routes.draw do |map|
map.connect “#{ADMIN_PAGE_DIR}/*name”, :controller=>‘view_pages’,
:action=>'show_page

map.connect ‘’, :controller => “admin_pages”, :action=>“edit_pages”

map.connect ‘:controller/service.wsdl’, :action => ‘wsdl’
map.connect ‘:controller/:action/:id’
end

You are right, there is no documentation yet, but that will be my next
step.
I just received my Rubyforge account for the project, I will upload
everything to the CVS later in the day. First I have to earn me some
money :slight_smile:
Martin


#9

OK, I have uploaded the project files to RubyForge.

The project page is http://rubyforge.org/projects/adminpages/

So if you are interested in joining the project, drop me a note and I
can add you as a developer.

The demo is still running at http://adminpages.flowdev.de/ .

What is coming next:
Better integration with FCKeditor (upload images)
RMagick integration - an element type image
better cache clearing algorithm (at the moment the whole cache is
cleared every time the page tree changes)
A way to add custom data fields to page layouts (like header image or
meta keywords or whatever)

I added a small readme. This is the text:


Adminpages Readme

Project description:

A content management system on Rails.
Use it to administer design-heavy sites in a user-friendly way.
Features:
Manipulate pages and content with Drag n Drop,
“Nice” URLs,
Caching,
FCKEditor,
multiple columns per page,
custom content types

Aims of the project:

  • Create a system that can be used to add pages to a web site and add
    content to these pages.
  • The interface should be usable by non-technical persons.
  • Each page has a page layout. The page layout defines the content of
    the page, for example the number of columns, a header image and a page
    title. For each con
    tent element, the page edit mask should provide a way to change this
    element. The page layouts should be editable through the web mask, but
    maybe not by the end
    user
  • Integrate a rich text editor. At the moment there is a content element
    which uses FCKEditor, but there is no way to upload images yet.
  • Should work under Mozilla FireFox and IE6. Safari and Opera are a
    problem, because there are no rich text editors that support these
    browsers.

NOT aims of the project:

  • change templates over the web interface. The adminpages interface is
    only for end users, not for designers or programmers
  • add dynamic elements like comments or polls. Stuff like that can be
    integrated by adding a content element “render_component”, which can be
    used to integrate
    dynamic stuff.
  • Backwards-compability to ancient browser versions

INSTALLING

Create a new mysql database
Import adminpages/db/development.sql to that database
copy adminpages/config/database.yml.default to
adminpages/config/database.yml and change the content

Get the FCKEditor from http://www.fckeditor.net/download/
Uncompress the editor to adminpages/public. You should have a folder
adminpages/public/FCKeditor

Edit the file adminpages/config/routes.rb to define the URL that will be
used to access the pages.
Default is /pages/.
!!!Watch out:!!!
Don’t mount the pages to the root of the web server or to an existing
folder.
The cache clearing algorithm would delete any content of these
folders!!!

Starting the application: like any other rails app.