[Masterview-users] conditional styling of html elements

Jeff Barczewski jeff.barczewski at gmail.com
Mon Nov 5 14:56:20 EST 2007

On Nov 1, 2007 1:19 PM, Nico Ritsche <nico.ritsche at googlemail.com> 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/masterview-users/attachments/20071105/1cda6ea2/attachment.html 

More information about the Masterview-users mailing list