From nico.ritsche at googlemail.com Thu Nov 1 15:19:13 2007 From: nico.ritsche at googlemail.com (Nico Ritsche) Date: Thu, 1 Nov 2007 19:19:13 +0000 Subject: [Masterview-users] conditional styling of html elements Message-ID: Hi Deb and Jeff, thanks for your kind answers! > The nicer response is that you need to let go of that attachment to > your source formatting. (As did I, in fact). > ;-) Well, maybe you are right... > It has to be functionally correct > and it's nice if it's at least reasonably readable, since in practice > we *do* end up looking at generated page source at various points in > web page development (View Source!), Not only there, but also the formatting of my static html files generated by masterview when importing layouts and partials gets changed. Anyway, my next "wish" would be to have a possibility to let masterview generate html files considering the current database content. This would be very useful, as it comes closer to true wysiwyg editing of your page and less dummies would be needed. So tables would be filled with the actual table data instead of dummies. Would that be difficult to implement? Or is it possible to extend mv with this functionality? Another thing that would be very useful for me to have is a way of using my own layout with mv scaffolding. Ideally I'd like to be able to do something like the following: - Create my layout, including navigation etc. - Define a standard way crud views and partials are generated from models - Using this standard for any further model to quickly setup new model views, like this: ...mv:import="layouts/mylayout.rhtml"... ...mv:content="@content_for_layout"... mv:generate_crud=" :model => 'myModel', :layout => 'myLayout.html', :crudLayout => 'myCrudLayout' " This would then generate the list view of the model in place, separate files for new, edit, view and delete, using my custom templates and the corresponding actions. That, would be great! Right now I'm manually typing in the code for all the different models I have, copy and pasting pieces from the mv scaffolds and adjusting them to my needs, which is quite tedious and not all too dry. What I have in mind is a kind of a finer grained custom scaffolding. There could be also defaults/naming conventions for the locations of the custom made layouta and crud styles. There could be also parameters to select which crud actions and views should be generated and which shouldn't. Also it would be great if the controller could be specified if not the default is used. Well, the possibilities seem endless... ;-) Does this idea make sense? Is it possible to extend mv like this? I haven't looked much into the developers section yet. Nico P.S.: How can I post to a thread instead of making a new one? Do I simply need to use the same subject text? I try... -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20071101/3236d9b1/attachment-0001.html From pkattau at gmail.com Sun Nov 4 16:55:29 2007 From: pkattau at gmail.com (Patrick J. Kattau) Date: Sun, 4 Nov 2007 16:55:29 -0500 Subject: [Masterview-users] Using multiple models with masterview Message-ID: Hi, I'm fairly new to rails and masterview. I'm sure this answer was probably staring me in the face already but all screencasts of masterview that I have seen to date only deal with one table and one model. What about using multiple tables and models? I was trying to add another link under 'tasks' that pointed to a different controller and action but it didn't seem to work. Any guidance would be appreciated. Regards, Patrick -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20071104/5099798b/attachment.html From jeff.barczewski at gmail.com Mon Nov 5 14:56:20 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 5 Nov 2007 13:56:20 -0600 Subject: [Masterview-users] conditional styling of html elements In-Reply-To: References: Message-ID: <19cda190711051156t35b929a9n6fa232478768365e@mail.gmail.com> On Nov 1, 2007 1:19 PM, Nico Ritsche wrote: > Anyway, my next "wish" would be to have a possibility to let masterview > generate html files considering the current database content. > This would be very useful, as it comes closer to true wysiwyg editing of > your page and less dummies would be needed. So tables would be filled > with the actual table data instead of dummies. Would that be difficult to > implement? Or is it possible to extend mv with this functionality? > That's an interesting idea but might be a little difficult to do since when we are parsing the html we don't yet have access to all the runtime objects. It seems like it would involve marrying much more tightly to Rails if we wanted to do this. Currently we'd prefer to stay a little bit abstracted so that we can eventually use MasterView with all sorts of web frameworks. (Rails is our most feature rich implementation, but I would envision us working with other Ruby frameworks in the future). > > Another thing that would be very useful for me to have is a way of using > my own layout with mv scaffolding. Ideally I'd like to be able to do > something like the following: > > - Create my layout, including navigation etc. > - Define a standard way crud views and partials are generated from > models > - Using this standard for any further model to quickly setup new > model views, like this: > > ...mv:import="layouts/mylayout.rhtml"... > > ...mv:content="@content_for_layout"... > > mv:generate_crud=" :model => 'myModel', :layout => 'myLayout.html', :crudLayout > => 'myCrudLayout' " > This would then generate the list view of the model in place, separate > files for new, edit, > view and delete, using my custom templates and the corresponding actions. > That, would be great! > Right now I'm manually typing in the code for all the different models I > have, copy and pasting > pieces from the mv scaffolds and adjusting them to my needs, which is > quite tedious and not all too dry. > What I have in mind is a kind of a finer grained custom scaffolding. There > could be also > defaults/naming conventions for the locations of the custom made layouta > and crud styles. > There could be also parameters to select which crud actions and views > should be generated and > which shouldn't. Also it would be great if the controller could be > specified if not the default is used. > Well, the possibilities seem endless... ;-) > Thanks for the input and ideas. I agree that it would be really nice to be able to do something like this. I will add the ideas to our todo list for future enhancements. If there were only more hours in the day :-) > > Does this idea make sense? Is it possible to extend mv like this? I > haven't looked much into the > developers section yet. > Yes, I think this would be useful in some environments. Whatever can reduce the turn around time in creating apps is a win in my book. > > Nico > > P.S.: How can I post to a thread instead of making a new one? Do I simply > need to use the same subject > text? I try... > Yes, if you reply to the thread so that it keeps the same subject (ignoring the re:) then it will go into the same thread. If you change the subject then it will be a new thread. -- 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/20071105/1cda6ea2/attachment.html From jeff.barczewski at gmail.com Mon Nov 5 15:12:32 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 5 Nov 2007 14:12:32 -0600 Subject: [Masterview-users] Using multiple models with masterview In-Reply-To: References: Message-ID: <19cda190711051212w6d668c01p17c62edac3588c34@mail.gmail.com> On Nov 4, 2007 3:55 PM, Patrick J. Kattau wrote: > Hi, I'm fairly new to rails and masterview. I'm sure this answer was > probably staring me in the face already but all screencasts of masterview > that I have seen to date only deal with one table and one model. What about > using multiple tables and models? I was trying to add another link under > 'tasks' that pointed to a different controller and action but it didn't seem > to work. Any guidance would be appreciated. > Patrick, In general most anything that you can do with Rails or ERB/rhtml we should be able to do with MasterView since we ultimately output ERB anyway. So the answer is yes, you can work with multiple tables, models, and controllers with MasterView. In the example of using multiple controllers with your links, you simply add the controller property into the directive just like you would do if using the Rails link_to helper. For example: New product This allows you to access a different controller than the current one. In general think about how you would do it in ERB or with native Rails helpers and that is what you typically want to do with MasterView. 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/20071105/680316ad/attachment.html From jeff.barczewski at gmail.com Mon Nov 5 15:30:13 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 5 Nov 2007 14:30:13 -0600 Subject: [Masterview-users] [Rails] Ruby web controls In-Reply-To: <1194077265.108186.107940@57g2000hsv.googlegroups.com> References: <1194077265.108186.107940@57g2000hsv.googlegroups.com> Message-ID: <19cda190711051230v27c7cc1maf7648d9cc14c10c@mail.gmail.com> On Nov 3, 2007 2:07 AM, Nowy wrote: > > HI, > > I Find rails great but theres lack of rich components, i mean any > components except standard html controls.. > I cant build everytime my table with all features, we are crud right ? > > So any component repository planned ? > Maybe rails isnt good solution for my requirements ? > Pete, I agree with you. We could really use some nice reusable component like functionality for Rails. That was one of the longer term goals of the MasterView project. I wanted to make it easy to package up complex functionality into simple directives that could be reused over and over across projects beyond the scope of typical helpers and plugins. I have on my plate right now to implement some of the first of these new advanced directives, so hopefully we'll be able to start to roll out some of these in MasterView later this winter. For more information on our project you can visit http://masterview.org/ 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/20071105/914b3440/attachment.html