Greg Hauptmann
2006-Aug-31 12:22 UTC
Scaffold Look & Feel Adjustments (CSS vs changing scaffold)?
Hi, Is the general feeling that the scaffolded views created can be made reasonable via an appropriate CSS? Or is it usually the case the people re-work the views generated? The views I see seem to use tables as opposed to DIVs with class names. Does thish imply that trying to make the scaffolded generated views pretty use CSS is not really possible (sorry - CSS is a bit new to me) Just trying to see whether I should be looking to either (a) learn more CSS to make the generated views look better or (b) jump in and hand modify the generated views. Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Alan Francis
2006-Aug-31 12:33 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffo
Greg Hauptmann wrote:> Is the general feeling that the scaffolded views created can be made > reasonable via an appropriate CSS? Or is it usually the case the people > re-work the views generated?Hi Greg, Well, IMO, the name scaffold indicates you''re just using them to prop the house up while you build it. The structure of the scaffolds isn''t the same as the structure of the house. So when you''re done scaffolding, you wouldn''t just paint the scaffolds and call it home, you only keep them until you''ve built the house and then throw them away. Alan -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
njmacinnes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2006-Aug-31 12:37 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffold)?
Well that depends on how much you want to modify. If you''re just talking about table size, colours, etc, then CSS can do it all. But if you want to completely alter the layout, then you''ll have to modify the views. I would suggest you learn CSS anyway though. It''s not that difficult (contrary to what some CSS specialists will tell you), and it''s very useful. Even if you do have to modify the views, you''ll have to do some CSS as well. Hope this helps, -Nathan On 31/08/06, Greg Hauptmann <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Hi, > > Is the general feeling that the scaffolded views created can be made > reasonable via an appropriate CSS? Or is it usually the case the people > re-work the views generated? > > The views I see seem to use tables as opposed to DIVs with class names. > Does thish imply that trying to make the scaffolded generated views > pretty use CSS is not really possible (sorry - CSS is a bit new to me) > > Just trying to see whether I should be looking to either (a) learn more > CSS to make the generated views look better or (b) jump in and hand > modify the generated views. > > Thanks > > -- > Posted via http://www.ruby-forum.com/. > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Pål Bergström
2006-Aug-31 12:43 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffo
Greg Hauptmann wrote:> Hi, > > Is the general feeling that the scaffolded views created can be made > reasonable via an appropriate CSS? Or is it usually the case the people > re-work the views generated? > > The views I see seem to use tables as opposed to DIVs with class names. > Does thish imply that trying to make the scaffolded generated views > pretty use CSS is not really possible (sorry - CSS is a bit new to me) > > Just trying to see whether I should be looking to either (a) learn more > CSS to make the generated views look better or (b) jump in and hand > modify the generated views. > > ThanksI''m kind of a newbie to RoR myself, but not to css. I would say you could do either way. Tables still has it''s meaning though you could do without it. You can define a div as a table to and rows and all in css, but that doesn''t work all the way (in my experience). Learn css. You will be able to do so many things. Even though the code generated by scaffold seems a bit old you can still use it with css. Css is the way to go if you want to develop good looking things and keep up with standard and where the web is going. http://friendlybit.com/css/beginners-guide-to-css-and-standards/ http://www.htmldog.com/guides/cssbeginner/ What I wonder is if the templates for pages of a scaffold can be modified? -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Igor Milovanović
2006-Aug-31 12:48 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffold)?
On 8/31/06, Greg Hauptmann <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Just trying to see whether I should be looking to either (a) learn more > CSS to make the generated views look better or (b) jump in and hand > modify the generated views. >I am kind of newbee here, but for now I was rewriting my views completly, and using CSS2 for nice app design. Maybe in future, core developers will change scaffolded code into "div" one? That would be nice, but I think it is not high priority. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jeff Barczewski
2006-Aug-31 15:03 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffo
Pål, If the structure of the generated code is good and you have the necessary hooks, you can often get away with changing the look and feel with CSS alone. However the rails scaffold generator has some shortcomings in what it generates (IMHO). So when we were creating a generator for the MasterView project, we started from that but then ended up changing most of it out to use divs and to apply the proper CSS classes to give you the hooks you need. We did use a table for the list partial, because to me it seems really hard to try and do tabular data with divs. Yes it can be done, but it is somewhat painful and seems to be more rigid (having to define column sizes and not allowing the structure to resize with the data like tables do. But I agree with everyone otherwise in that divs are much better for CSS layout in general except for when you actually need a table (then use a table :-) The answer to your question about whether you can modify the scaffold templates is: absolutely. This is Ruby :-) You can modify the templates, however I would suggest just copying the scaffold generator or any other generator that is closest to what you want and then modify it, creating a new generator. There is a wealth of information on this page about generators and doing just that. http://wiki.rubyonrails.org/rails/pages/UnderstandingGenerators Blessings, Jeff Barczewski MasterView project founder http://masterview.org/ On 8/31/06, Pål Bergström <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > What I wonder is if the templates for pages of a scaffold can be > modified? >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Pål Bergström
2006-Aug-31 15:37 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffo
Jeff Barczewski wrote:> CSS classes to give you the hooks you need. We did use a table for the > list partial, because to me it seems really hard to try and do tabular > data with divs. Yes it can be done, but it is somewhat painful and > seems to be more rigid (having to define column sizes and not allowing > the structure to resize with the data like tables do. But I agree with > everyone otherwise in that divs are much better for CSS layout in > general except for when you actually need a table (then use a table > :-)A definition of tables in css will act as a normal table, dynamic and fluid. But from what I can remember it''s not supported in IE – or something else that didn''t work in IE (as normal :-) ).> > The answer to your question about whether you can modify the scaffold > templates is: absolutely. This is Ruby :-) You can modify the > templates, however I would suggest just copying the scaffold generator > or any other generator that is closest to what you want and then > modify it, creating a new generator. > > There is a wealth of information on this page about generators and > doing just that. > http://wiki.rubyonrails.org/rails/pages/UnderstandingGenerators >Great. Thanks Jeff.> Blessings, > > Jeff Barczewski > MasterView project founder > http://masterview.org/-- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Mohit Sindhwani
2006-Aug-31 15:59 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffold)?
In many cases, for a number of pages, all I need to do is: 1. Point it to nicer CSS 2. Ask it to use my application layout 3. Make very small changes but let it use tables and most of it is taken care of. These are usually for ''admin'' like pages where you can add a few fields as part of setting up and configuring, etc. Any proper page (an important page of the app) that is accessed regularly is completely designed from scratch though I use scaffolds initially for that too. Cheers Mohit. njmacinnes-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org wrote:> Well that depends on how much you want to modify. If you''re just > talking about table size, colours, etc, then CSS can do it all. But if > you want to completely alter the layout, then you''ll have to modify > the views. I would suggest you learn CSS anyway though. It''s not that > difficult (contrary to what some CSS specialists will tell you), and > it''s very useful. Even if you do have to modify the views, you''ll have > to do some CSS as well. > Hope this helps, > -Nathan > > On 31/08/06, Greg Hauptmann <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: > >> Hi, >> >> Is the general feeling that the scaffolded views created can be made >> reasonable via an appropriate CSS? Or is it usually the case the people >> re-work the views generated? >> >> The views I see seem to use tables as opposed to DIVs with class names. >> Does thish imply that trying to make the scaffolded generated views >> pretty use CSS is not really possible (sorry - CSS is a bit new to me) >> >> Just trying to see whether I should be looking to either (a) learn more >> CSS to make the generated views look better or (b) jump in and hand >> modify the generated views. >> >> Thanks >> >> -- >> Posted via http://www.ruby-forum.com/. >> >> > > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
If you override a generator would this imply that if there were improvements to the generate in the next version of rails that you would not inherit them? (I''m guessing yes) - would you see this as an issue? On 9/1/06, Jeff Barczewski <jeff.barczewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > The answer to your question about whether you can modify the scaffold > templates is: absolutely. This is Ruby :-) You can modify the > templates, however I would suggest just copying the scaffold generator > or any other generator that is closest to what you want and then > modify it, creating a new generator. >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
Jeff Barczewski
2006-Aug-31 21:24 UTC
Re: Scaffold Look & Feel Adjustments (CSS vs changing scaffo
Well it depends on how you overrode things as to whether you would pick up the new features. But I wasn''t necessarily suggesting you override rails scaffold generator (per say) but simply use it as a starting point to create your own just like so many others have done. You end up with a different generator which you can call. The other one is still there and if you ever want to run the other one to compare the differenences you can. So while it is possible to extend a core generator, for most things it is not really worth the effort especially if the bulk of the changes are in the template itself. Most people who have written generators have simply written their own, many starting with what one of the existing generators does and modified. If there are signifigant improvements then you can choose to diff the files and move them over into your generator as well. However since the rails team believes in only minimalistic scaffolding, you are probably not going to encounter missing features that often. On 8/31/06, Greg H <greg.hauptmann.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> If you override a generator would this imply that if there were improvements > to the generate in the next version of rails that you would not inherit > them? (I''m guessing yes) - would you see this as an issue? > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---
thanks for clarifying Jeff On 9/1/06, Jeff Barczewski <jeff.barczewski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > > Well it depends on how you overrode things as to whether you would > pick up the new features.<CUT> --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk -~----------~----~----~----~------~----~------~--~---