From info at gauda.de Thu Feb 21 10:08:42 2008 From: info at gauda.de (gauda) Date: Thu, 21 Feb 2008 16:08:42 +0100 Subject: [Masterview-users] theme support? Message-ID: <5973e83c0802210708w2b1223c6r7fe206ced3524c64@mail.gmail.com> hi all! i like to know if its possible to use masterview with different themes per user. the idea is to use one theme per shop like www.shopify.com i would like to use masterview in combination with theme_support. http://mattmccray.com/svn/rails/plugins/theme_support/README can masterview handle this? if that is not possible, would it be hard to implement such a feature? i think the point are these configuration options. is it possible to change template_src_dir_path and template_src_dir_abs_path at runtime for example as a before_filter? settings.rb: config.template_src_dir_path = 'app/views' config.template_src_dir_abs_path( '/path/to/masterview/templates' ) -- so long, gauda From jeff.barczewski at gmail.com Fri Feb 22 16:38:49 2008 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Fri, 22 Feb 2008 15:38:49 -0600 Subject: [Masterview-users] theme support? In-Reply-To: <5973e83c0802210708w2b1223c6r7fe206ced3524c64@mail.gmail.com> References: <5973e83c0802210708w2b1223c6r7fe206ced3524c64@mail.gmail.com> Message-ID: <19cda190802221338q468fc0a1l78bc37e3f9a5218b@mail.gmail.com> On Thu, Feb 21, 2008 at 9:08 AM, gauda wrote: > hi all! > > i like to know if its possible to use masterview with different themes > per user. the idea is to use one theme per shop like www.shopify.com > i would like to use masterview in combination with theme_support. > http://mattmccray.com/svn/rails/plugins/theme_support/README > > can masterview handle this? if that is not possible, would it be hard > to implement such a feature? > > i think the point are these configuration options. is it possible to > change template_src_dir_path and template_src_dir_abs_path at runtime > for example as a before_filter? > settings.rb: > config.template_src_dir_path = 'app/views' > config.template_src_dir_abs_path( '/path/to/masterview/templates' ) > Gauda, I just looked at Matt's plugin and tried to determine what would need to change to make these work together. It looks like essentially that Matt's plugin allows one to have the equivalent of multiple roots (as far as layouts and views are concerned) and this factor would require a bit of changing to make MasterView take advantage of it. We'd probably have to loop over all of the themes changing the template_src_dir_path and template_dst_dir_path like you mentioned and I don't know if there would be any major hurdles in doing that. However one way that should work just fine is to put your MasterView templates without any major surgery is to make MasterView generate the rhtml files to disk and set things up so they will end up going into the structure Matt needs at runtime. You would tell MasterView to always generate rhtml files to disk (for all run modes) using config.generate_rhtml_files = true in your main masterview settings.rb file. To keep things clear I would create a new directory somewhere which will be the root of all your themed MasterView templates /foo. Inside here you'll have /foo/theme1 /foo/theme2 , ... Set config.template_src_dir_abs_path('/foo') # so it points to the dir above your themes and will process all of them inside Set config.template_dst_dir_path('app/themes') # so it points to the dir above the themes where your rhtml should be output Then you simply need to have your mv:generate, mv:gen_partial, mv:import, mv:import_partial filepaths all specify the theme as well as the rest of the filename, so mv:generate="layout/foo.rhtml" might become mv:generate="theme1/layout/foo.rhtml". MasterView will then generate the rhtml into the structure you need for the plugin. And by setting generate_rhtml_files = true, effectively you can run without MasterView at all at that point since all the necessary rhtml is already on the disk, so Matt's plugin should work fine given the the rhtml is all there in the proper structure. The only issue that might still occur is that the render_partial method calls might need tweaking depending on whether Matt's plugin allows the theme as part of the path or not. Well hope that helps. Blessings, Jeff config.template_src_dir_abs_path = -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20080222/8f444cc4/attachment.html From jeff.barczewski at gmail.com Wed Feb 27 11:38:48 2008 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Wed, 27 Feb 2008 10:38:48 -0600 Subject: [Masterview-users] Masterview In-Reply-To: References: Message-ID: <19cda190802270838r4aba32a7p1e3121153f420a47@mail.gmail.com> On Wed, Feb 27, 2008 at 6:07 AM, Stephen Devonald wrote: > Hi Jeff > > I'm new to Rails, but a long time developer going back into IT dark ages, > with a lot of experience in both using and creating frameworks. > > I was looking for a Rails compatible html editor, and found your site and > presentation. Masterview looks excellent, clearly addresses the big hole in > Rails; but as a new boy I've started with Rails 2.0.2 and don't want to > relearn what I've had to learn and unlearn already using all the non 2.0.xcompliant tutorials! > > (Incidentally, I cannot, as project manager, analyst, or coder, understand > the apparent lack of interest from Rails coders in this area - it is so > clearly vital to agile development and user buyin). > > Can't find any dates for Masterview release for Rails 2.0.x on web - can > you point me to any info on this? > > Great work! > Thanks Stephen! I feel your pain. We haven't done any new releases since Rails 2.0 came out, but at this point I don't know that anything is incompatible with the old release. A couple people mentioned that they were wanting to use Rails 2 with MasterView and I basically said if you run into any incompatibilities, let me know and I can usually turn around a fix pretty quick. I haven't had a chance to check with Rails 2 myself yet, but it is on my todo list. There is one setting that makes MasterView very compatible with Rails and other plugins, config.generate_rhtml_files = true which causes the rhtml files to be written to the hard drive. This allows Rails to function like it always does and requires no magic from MasterView once the files exist. In fact you can even deploy to production without MasterView plugin at all once you have the rhtml files. If you set that to true, another thing you might want to do if having both the .html and .rhtml in same directory is a problem, is to change the location of the masterview templates to maybe app/masterview using config.template_src_dir_path = "app/masterview" This just keeps things separately and less confusing. So give it a whirl and if you have any problems, please send me an email about the issue and I'll resolve it. Otherwise, I am planning to check Rails 2 compatibility soon, maybe by this weekend. I also have a bunch of other ideas for the next major version (so the project is alive and well) that I am thinking through currently. Have a blessed day! Jeff -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20080227/ca432cd4/attachment.html From info at gauda.de Wed Feb 27 19:27:28 2008 From: info at gauda.de (gauda) Date: Thu, 28 Feb 2008 01:27:28 +0100 Subject: [Masterview-users] Masterview In-Reply-To: <19cda190802270838r4aba32a7p1e3121153f420a47@mail.gmail.com> References: <19cda190802270838r4aba32a7p1e3121153f420a47@mail.gmail.com> Message-ID: <5973e83c0802271627p7eeb7dd1x79b4109a65e92fcb@mail.gmail.com> I, and I think many many others, would really appreciate this! Please give it a try! On Wed, Feb 27, 2008 at 5:38 PM, Jeff Barczewski wrote: > On Wed, Feb 27, 2008 at 6:07 AM, Stephen Devonald > wrote: > > > > > > > > > Hi Jeff > > > > I'm new to Rails, but a long time developer going back into IT dark ages, > with a lot of experience in both using and creating frameworks. > > > > I was looking for a Rails compatible html editor, and found your site and > presentation. Masterview looks excellent, clearly addresses the big hole in > Rails; but as a new boy I've started with Rails 2.0.2 and don't want to > relearn what I've had to learn and unlearn already using all the non 2.0.x > compliant tutorials! > > > > (Incidentally, I cannot, as project manager, analyst, or coder, understand > the apparent lack of interest from Rails coders in this area - it is so > clearly vital to agile development and user buyin). > > > > Can't find any dates for Masterview release for Rails 2.0.x on web - can > you point me to any info on this? > > > > Great work! > > > Thanks Stephen! I feel your pain. > > We haven't done any new releases since Rails 2.0 came out, but at this point > I don't know that anything is incompatible with the old release. A couple > people mentioned that they were wanting to use Rails 2 with MasterView and I > basically said if you run into any incompatibilities, let me know and I can > usually turn around a fix pretty quick. > > I haven't had a chance to check with Rails 2 myself yet, but it is on my > todo list. > > There is one setting that makes MasterView very compatible with Rails and > other plugins, config.generate_rhtml_files = true which causes the rhtml > files to be written to the hard drive. This allows Rails to function like it > always does and requires no magic from MasterView once the files exist. In > fact you can even deploy to production without MasterView plugin at all once > you have the rhtml files. > > If you set that to true, another thing you might want to do if having both > the .html and .rhtml in same directory is a problem, is to change the > location of the masterview templates to maybe app/masterview using > config.template_src_dir_path = "app/masterview" This just keeps things > separately and less confusing. > > So give it a whirl and if you have any problems, please send me an email > about the issue and I'll resolve it. > > Otherwise, I am planning to check Rails 2 compatibility soon, maybe by this > weekend. I also have a bunch of other ideas for the next major version (so > the project is alive and well) that I am thinking through currently. > > Have a blessed day! > > Jeff > > > -- > Jeff Barczewski, MasterView core team > Inspired Horizons Ruby on Rails Training and Consultancy > http://inspiredhorizons.com/ > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users > -- so long, HANS From johannes at leers.de Wed Feb 27 19:25:19 2008 From: johannes at leers.de (Johannes Leers) Date: Thu, 28 Feb 2008 01:25:19 +0100 Subject: [Masterview-users] Masterview In-Reply-To: <19cda190802270838r4aba32a7p1e3121153f420a47@mail.gmail.com> References: <19cda190802270838r4aba32a7p1e3121153f420a47@mail.gmail.com> Message-ID: <5973e83c0802271625y6fad33c1qe5fae4037a563822@mail.gmail.com> I, and I think many many others, would really appreciate this! Please give it a try! On Wed, Feb 27, 2008 at 5:38 PM, Jeff Barczewski wrote: > On Wed, Feb 27, 2008 at 6:07 AM, Stephen Devonald > wrote: > > > > > > > > > Hi Jeff > > > > I'm new to Rails, but a long time developer going back into IT dark ages, > with a lot of experience in both using and creating frameworks. > > > > I was looking for a Rails compatible html editor, and found your site and > presentation. Masterview looks excellent, clearly addresses the big hole in > Rails; but as a new boy I've started with Rails 2.0.2 and don't want to > relearn what I've had to learn and unlearn already using all the non 2.0.x > compliant tutorials! > > > > (Incidentally, I cannot, as project manager, analyst, or coder, understand > the apparent lack of interest from Rails coders in this area - it is so > clearly vital to agile development and user buyin). > > > > Can't find any dates for Masterview release for Rails 2.0.x on web - can > you point me to any info on this? > > > > Great work! > > > Thanks Stephen! I feel your pain. > > We haven't done any new releases since Rails 2.0 came out, but at this point > I don't know that anything is incompatible with the old release. A couple > people mentioned that they were wanting to use Rails 2 with MasterView and I > basically said if you run into any incompatibilities, let me know and I can > usually turn around a fix pretty quick. > > I haven't had a chance to check with Rails 2 myself yet, but it is on my > todo list. > > There is one setting that makes MasterView very compatible with Rails and > other plugins, config.generate_rhtml_files = true which causes the rhtml > files to be written to the hard drive. This allows Rails to function like it > always does and requires no magic from MasterView once the files exist. In > fact you can even deploy to production without MasterView plugin at all once > you have the rhtml files. > > If you set that to true, another thing you might want to do if having both > the .html and .rhtml in same directory is a problem, is to change the > location of the masterview templates to maybe app/masterview using > config.template_src_dir_path = "app/masterview" This just keeps things > separately and less confusing. > > So give it a whirl and if you have any problems, please send me an email > about the issue and I'll resolve it. > > Otherwise, I am planning to check Rails 2 compatibility soon, maybe by this > weekend. I also have a bunch of other ideas for the next major version (so > the project is alive and well) that I am thinking through currently. > > Have a blessed day! > > Jeff > > > -- > Jeff Barczewski, MasterView core team > Inspired Horizons Ruby on Rails Training and Consultancy > http://inspiredhorizons.com/ > _______________________________________________ > Masterview-users mailing list > Masterview-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-users > -- so long, HANS From jeff.barczewski at gmail.com Thu Feb 28 09:27:07 2008 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 28 Feb 2008 08:27:07 -0600 Subject: [Masterview-users] Masterview In-Reply-To: <5973e83c0802271627p7eeb7dd1x79b4109a65e92fcb@mail.gmail.com> References: <19cda190802270838r4aba32a7p1e3121153f420a47@mail.gmail.com> <5973e83c0802271627p7eeb7dd1x79b4109a65e92fcb@mail.gmail.com> Message-ID: <19cda190802280627s675a0358sa95020962588094c@mail.gmail.com> On Wed, Feb 27, 2008 at 6:27 PM, gauda wrote: > I, and I think many many others, would really appreciate this! Please > give it a try! I'll plan to check it out in Rails 2 this weekend. If you run into any issues yourself, just let me know. Thanks! Blessings, Jeff -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20080228/c42f226f/attachment.html