Custom Admin Templates?

0 views
Skip to first unread message

Kevin Miller

unread,
Aug 10, 2008, 1:18:26 AM8/10/08
to comatos...@googlegroups.com
Hello-

I ran the task to get the custom layout and views generated, but the system doesn't want to see to use them?   Can anyone give me any pointers on how to fix this asap?   Thanks for your help and time in advance!

Kevin

MRoderick

unread,
Aug 10, 2008, 2:18:57 AM8/10/08
to Comatose Plugin
> I ran the task to get the custom layout and views generated, but the system
> doesn't want to see to use them?   Can anyone give me any pointers on how to
> fix this asap?   Thanks for your help and time in advance!

I couldn't get the latest version to generate them, so I just copied
them from the plugin into the views folder.

cp vendor/plugins/comatose/views/comatose_admin app/views
cp vendor/plugins/comatose/views/layouts/comatose_admin.html.erb app/
views/layouts

Once they're in their right place, Comatose will detect them and all
you need to do, is to map the routes.

Hope this helps

/Morgan

Kevin Miller

unread,
Aug 10, 2008, 5:03:36 AM8/10/08
to comatos...@googlegroups.com
I have those files in place (they were generated) and the following routes.

  map.comatose_admin
  map.comatose_root ''

But the plugin is not using the  custom layout.   Can I change something in the plugin code to force this?

Thanks,

Kevin
--
Kevin Miller
stickm...@gmail.com


The information contained in this message is intended only for the recipient, and may be a confidential attorney-client communication or may otherwise be privileged and confidential and protected from disclosure. If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering this message to the intended recipient, please be aware that any dissemination or copying of this communication is strictly prohibited. If you have received this communication in error, please immediately notify us by replying to the message and deleting it from your computer.

MRoderick

unread,
Aug 10, 2008, 5:51:39 AM8/10/08
to Comatose Plugin
For the public facing pages, you can define the layouts in routes.rb

If Comatose doesn't pick up on the admin layout, then perhaps it's not
in the right place?

Here's a screenshot of where it should be:
http://img.skitch.com/20080810-pht5e28icp4f54rrpp2fmsfpke.png

/Morgan

Kevin Miller

unread,
Aug 10, 2008, 5:55:24 AM8/10/08
to comatos...@googlegroups.com
Hi-

Thats what I have.. wierd.   Below is my route config, is something messing it up?

ActionController::Routing::Routes.draw do |map|

  map.resources :categories

  map.resources :tags
 
  # Install the default routes as the lowest priority.
  map.connect '/', :controller => "sessions", :action => "new"
  map.resources :rights, :roles, :sessions # TODO: except for sessions, put the rest in the admin namespace
 
  # login/logout urls
  map.login   '/login',    :controller => "sessions", :action => "new"
  map.logout  '/logout',   :controller => "sessions", :action => "destroy"
 
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'
 
  map.comatose_admin
  map.comatose_root ''

end

Kevin Miller

unread,
Aug 10, 2008, 6:02:36 AM8/10/08
to comatos...@googlegroups.com
I tried removing the layouts and running

tag_mashup $ rake comatose:admin:customize
(in /projects/tag_mashup)
Copying public files...
cp /projects/tag_mashup/public/stylesheets
cp /projects/tag_mashup/public/javascripts
Copying application views...
cp /projects/tag_mashup/app/views/comatose_admin
Copying application layout...
cp /projects/tag_mashup/vendor/plugins/comatose/tasks/../lib/comatose/tasks/../views/layouts/comatose_admin_customize.html.erb /projects/tag_mashup/app/views/layouts/comatose_admin.html.erb
rake aborted!
No such file or directory - /projects/tag_mashup/vendor/plugins/comatose/tasks/../lib/comatose/tasks/../views/layouts/comatose_admin_customize.html.erb

(See full trace by running task with --trace)

Is this path off?

/projects/tag_mashup/vendor/plugins/comatose/tasks/../lib/comatose/tasks/../views/layouts/comatose_admin_customize.html.erb




On Sun, Aug 10, 2008 at 2:51 AM, MRoderick <roderic...@gmail.com> wrote:

MRoderick

unread,
Aug 10, 2008, 6:45:22 AM8/10/08
to Comatose Plugin
If you're running the latest comatose, it won't copy the files, you'll
have to do that manually.

Just open up the rake file and figure out what goes where, and steal
the files from the plugin.

When the plugin starts, it'll detect customized views in the host
application.

Oh, and don't forget to restart the server, as it might not detect the
updated files if they were added after the plugin has been loaded :-)

/Morgan

On Aug 10, 12:02 pm, "Kevin Miller" <stickmanl...@gmail.com> wrote:
> I tried removing the layouts and running
>
> tag_mashup $ rake comatose:admin:customize
> (in /projects/tag_mashup)
> Copying public files...
> cp /projects/tag_mashup/public/stylesheets
> cp /projects/tag_mashup/public/javascripts
> Copying application views...
> cp /projects/tag_mashup/app/views/comatose_admin
> Copying application layout...
> cp
> /projects/tag_mashup/vendor/plugins/comatose/tasks/../lib/comatose/tasks/.. /views/layouts/comatose_admin_customize.html.erb
> /projects/tag_mashup/app/views/layouts/comatose_admin.html.erb
> rake aborted!
> No such file or directory -
> /projects/tag_mashup/vendor/plugins/comatose/tasks/../lib/comatose/tasks/.. /views/layouts/comatose_admin_customize.html.erb
>
> (See full trace by running task with --trace)
>
> Is this path off?
>
> /projects/tag_mashup/vendor/plugins/comatose/tasks/../lib/comatose/tasks/.. /views/layouts/comatose_admin_customize.html.erb
>
> On Sun, Aug 10, 2008 at 2:51 AM, MRoderick <roderick.mor...@gmail.com>wrote:
>
>
>
>
>
> > For the public facing pages, you can define the layouts in routes.rb
>
> > If Comatose doesn't pick up on the admin layout, then perhaps it's not
> > in the right place?
>
> > Here's a screenshot of where it should be:
> >http://img.skitch.com/20080810-pht5e28icp4f54rrpp2fmsfpke.png
>
> > /Morgan
>
> > On Aug 10, 11:03 am, "Kevin Miller" <stickmanl...@gmail.com> wrote:
> > > I have those files in place (they were generated) and the following
> > routes.
>
> > >   map.comatose_admin
> > >   map.comatose_root ''
>
> > > But the plugin is not using the  custom layout.   Can I change something
> > in
> > > the plugin code to force this?
>
> > > Thanks,
>
> > > Kevin
>
> --
> Kevin Miller
> stickmanl...@gmail.com

Kevin Miller

unread,
Aug 10, 2008, 6:54:13 AM8/10/08
to comatos...@googlegroups.com
Seems to be working now :) Thanks!

Kevin
--
Kevin Miller
stickm...@gmail.com

MRoderick

unread,
Aug 10, 2008, 10:02:35 AM8/10/08
to Comatose Plugin
Glad I could help :-)
Reply all
Reply to author
Forward
0 new messages