model admin ideas

69 views
Skip to first unread message

Nicolaas Thiemen Francken - Sunny Side Up

unread,
Aug 6, 2010, 2:36:36 AM8/6/10
to silverstripe-dev
Hi Everyone

I have been talking with Jeremy about some ideas for ModelAdmin. I am writing to you to get your input / ideas.

Basically, we were considering to make the following recommendation on trac + the required patch. 

* add a "next result" and "previous result" button when viewing / editing one record (after you did a search) - perhaps this could replace the "back" and "forward" buttons
* add an (optional) tab to the search results view, where you can edit all records listed in the results in one go  (e.g. change the status of all orders found)

These recommendations are made because they make ModelAdmin significantly more efficient.
* the previous / next buttons work like the newer / older links in Gmail and allow fast cycling through a set
* the "change all records" option is a powerful way to edit data

I have added prev and next buttons to one of my applications and it seems to work well. 

Any input appreciated.

Nicolaas

Nivanka Fonseka

unread,
Aug 6, 2010, 5:25:58 AM8/6/10
to silverst...@googlegroups.com
hi,

+1 for the previous and the next buttons,
it is pretty time consuming as it is now.

Cheers

--
You received this message because you are subscribed to the Google Groups "SilverStripe Core Development" group.
To post to this group, send email to silverst...@googlegroups.com.
To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.



--
Nivanka Fonseka
Senior Software Engineer

Skype: nivanka.fonseka
Twitter: @nivankafonseka

Fred Condo

unread,
Aug 6, 2010, 11:56:36 AM8/6/10
to silverst...@googlegroups.com

This sounds good. Another thing ModelAdmin needs is an option to show
all when it initially loads. Having to do a blank search to show all
is a confusing and unnecessary step in most cases.

aram balakjian

unread,
Aug 6, 2010, 12:10:34 PM8/6/10
to silverst...@googlegroups.com
>
> This sounds good. Another thing ModelAdmin needs is an option to show
> all when it initially loads. Having to do a blank search to show all
> is a confusing and unnecessary step in most cases.
>
>
I totally agree, I always found that strange that it doesn't load anything.
I guess the thinking is that if you have a huge catalogue then it would take
time to load all the items, but even if it just fetched the first Page of
items it would make more sense to me. Perhaps it would be good to at least
be able toggle this feature on or off in the MyModelAdmin class, or set the
amount of items to show initially.

Aram


Jeremy Shipman

unread,
Aug 6, 2010, 7:03:08 PM8/6/10
to SilverStripe Core Development
Here is some further discussion we previously had:
http://groups.google.com/group/silverstripe-dev/browse_thread/thread/b78fb5a335498041/7cec8a5439cda078

I've done a tiny bit of work to create a 'group' for a result set, for
members in this case. I created a button next to 'Search' for creating
the group. Just getting the button there, and working was a bit of
work. Hopefully in future it will be a lot easier to call alternative
actions (batch actions?). ...slightly different to the batch editing
that Nicolaas mentions above.

Jeremy
> > silverstripe-d...@googlegroups.com<silverstripe-dev%2Bunsubscrib e...@googlegroups.com>
> > .

Nicolaas Thiemen Francken - Sunny Side Up

unread,
Aug 6, 2010, 11:09:11 PM8/6/10
to silverst...@googlegroups.com
Hi

Here is the basic code for the previous and next buttons:


This is still needs a lot more testing - but so far it should to work well.

Cheers

Nicolaas

Barry Swaisland

unread,
Aug 9, 2010, 4:23:17 AM8/9/10
to SilverStripe Core Development
Hi there following might be useful to you...

http://open.silverstripe.org/ticket/5665

it contains a simple patch for a nicer way to show multiple models in
a fixed size select and some jQuery from Unclecheese that auto
searches a managed model when you load the cms model admin section or
change models.

On Aug 7, 12:03 am, Jeremy Shipman <jez...@gmail.com> wrote:
> Here is some further discussion we previously had:http://groups.google.com/group/silverstripe-dev/browse_thread/thread/...

Martijn Van Nieuwenhoven

unread,
Aug 23, 2010, 12:23:26 PM8/23/10
to silverst...@googlegroups.com
A few months ago I created a custom LeftAndMain extension to be able to create a more flexible type of ModelAdmin for ie the management of newsletters or orders.

Its not yet solid enough for general use, but there were a few reasons why I did it:

  1. To have a LeftPane that looks like the CMSMain and AssetAdmin with the ability to add custom accordion Panels (search, info, menu's, widgets etc.)
  2. To have te ability to use TableListField instead of the default ComplexTableField, so certain DataObjects can be changed without the need of a seperate detailform. This is usefull when you need to add a lot of dataobjects with only a few fields (Availability/prices for hotelrooms, custom variations for a single product or holiday dates, custom formfields for a single product etc.)
    The TableListField has a Default(ComplexTableField) in the CustomLeftAndMain but can be overloaded in each DataObject with getCustomResultsForm(). In this way it is also posible to show ie a calendar which shows all bookings or a Dashboard with sales information.
  3. To have the ability to add custom formactions and functions like sending a newsletter, review an order, send confirmations etc.
  4. One thing that bothered me with the default leftpane of ModelAdmin is that I needed a more userfriendly devision for certain DataObjects and their relations, like show the managed objects in a menu style like the CMSMain has, but with custom hierarchy. and to put a customized searchform in a seperate panel.
  5. Set defaultModel which will show up on initial load.
At the moment I'm refactoring the PanelLeftAdminMain to a PanelModelAdmin, since a lot of code is already there and the form and relationhandling is still a better then mine :) (and has better support for DataObjectManager).

Here I have a sideshare with some screenshots of how I implemented the PanelLeftAndMain and what the PanelModelAdmin should be able to do as well.

I wondered if there is a demand for this and would like to get some input or tips about what you all find usefull to have in such an extendable PanelModelAdmin.

Martijn

To unsubscribe from this group, send email to silverstripe-d...@googlegroups.com.

For more options, visit this group at http://groups.google.com/group/silverstripe-dev?hl=en.




--
Met vriendelijke groet,
Martijn van Nieuwenhoven

<strong>Mediavacature.nl</strong>

Postbus 775
2130 AT, Hoofddorp
KvK Amsterdam 05082935
T  : +31 (0)88-11 22 000
F  : +31 (0)88-11 22 001
M : +31 (0)6-28 59 68 96

in...@mediavacature.nl  -  www.mediavacature.nl

Mediavacature.nl: de grootste carrièresite voor de media

matt clegg

unread,
Aug 23, 2010, 3:39:51 PM8/23/10
to silverst...@googlegroups.com
Hey Martjin, that looks sweet.. Good work.

Im not sure if there is much of a demand for it -but Iv no doubt there are projects that might need it. Currently Im working on a project that has lightboxes 3 levels deep with most of them having tabs inside. It works, but maybe Il try something like a slick accordian next time.

+1 upvote for SS showing some results by default in model admin. Or at least remove the typo in the default text fixed ??

MattClegg

Martijn Van Nieuwenhoven

unread,
Sep 7, 2010, 7:41:37 PM9/7/10
to silverstripe-dev
Hi,

I created an extension of ModelAdmin with the intention to make some things more flexible.

See my previous mails in this thread.

The module can be downloaded for testing here:

http://axyrmedia.nl/assets/downloads/cms/modeladmin/panelmodeladmin.zip

A sample implementation can be downloaded here:

http://axyrmedia.nl/assets/downloads/cms/modeladmin/productadmin.zip

Note that this is a first pre pre alpha and since the trunkversion of ModelAdmin has been refactored all js will be likely rewritten to Entwine.
There is still also some duplicate code that needs to be reduced and some solutions are a little bit dirty.

Let me know what you think of it! If there is a demand for it, I will dump it in a public repo somewhere for further development.

Cheers,
Martijn

On Fri, Aug 27, 2010 at 4:23 PM, Dale <dale....@gmail.com> wrote:
Right on man.  Its a fresh view on the current system, and I could totally see it in the core if it gets stable.  I'm happy to help if you need, or throw in on github/google code/etc.

Happy coding!


On Fri, Aug 27, 2010 at 3:52 AM, Martijn Van Nieuwenhoven <marv...@gmail.com> wrote:
Still working on the PanelModelAdmin. I'm almost there, but it still contains a lot of duplicate code, nasty workarounds and bugs I need to fix.

But the proof of concept is there and most things work like I wanted it to.

See this screenshots for what is possible at the moment.

As soon as the basics work in a nice and solid way, I will post a first version here on the dev group for testing and to see if its usefull for more people.

To be continued!
If you in mean time have some ideas, please let me know.

Martijn

On Tue, Aug 24, 2010 at 6:04 PM, dalesaurus <dale....@gmail.com> wrote:
Man, that looks like some very promising stuff.  Would you have the
code up anywhere?   I'd be happy to play with it and give some
feedback.

On Aug 23, 11:23 am, Martijn Van Nieuwenhoven <marva...@gmail.com>

wrote:
> A few months ago I created a custom LeftAndMain extension to be able to
> create a more flexible type of ModelAdmin for ie the management of
> newsletters or orders.
>
> Its not yet solid enough for general use, but there were a few reasons why I
> did it:
>
>    1. To have a LeftPane that looks like the CMSMain and AssetAdmin with the

>    ability to add custom accordion Panels (search, info, menu's, widgets etc.)
>    2. To have te ability to use TableListField instead of the default

>    ComplexTableField, so certain DataObjects can be changed without the need of
>    a seperate detailform. This is usefull when you need to add a lot of
>    dataobjects with only a few fields (Availability/prices for hotelrooms,
>    custom variations for a single product or holiday dates, custom formfields
>    for a single product etc.)
>    The TableListField has a Default(ComplexTableField) in the
>    CustomLeftAndMain but can be overloaded in each DataObject with
>    getCustomResultsForm(). In this way it is also posible to show ie a calendar
>    which shows all bookings or a Dashboard with sales information.
>    3. To have the ability to add custom formactions and functions like

>    sending a newsletter, review an order, send confirmations etc.
>    4. One thing that bothered me with the default leftpane of ModelAdmin is

>    that I needed a more userfriendly devision for certain DataObjects and their
>    relations, like show the managed objects in a menu style like the CMSMain
>    has, but with custom hierarchy. and to put a customized searchform in a
>    seperate panel.
>    5. Set defaultModel which will show up on initial load.

>
> At the moment I'm refactoring the PanelLeftAdminMain to a PanelModelAdmin,
> since a lot of code is already there and the form and relationhandling is
> still a better then mine :) (and has better support for DataObjectManager).
>
> Here I have a sideshare with some
> > > > > To unsubscribe from this group, send email to> > > >silverstripe-d...@googlegroups.com<silverstripe-dev%2Bunsu...@googlegroups.com><silverstripe-dev%2Bunsubscrib>e...@googlegroups.com>

> > > > > .
> > > > > For more options, visit this group at
> > > > >http://groups.google.com/group/silverstripe-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "SilverStripe Core Development" group.> To post to this group, send email tosilvers...@googlegroups.com.
> > To unsubscribe from this group, send email to>silverstripe-d...@googlegroups.com<silverstripe-dev%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/silverstripe-dev?hl=en.
>
> --
> Met vriendelijke groet,
> Martijn van Nieuwenhoven
>
> <strong>Mediavacature.nl</strong>
>
> Postbus 775
> 2130 AT, Hoofddorp
> KvK Amsterdam 05082935
> T  : +31 (0)88-11 22 000
> F  : +31 (0)88-11 22 001
> M : +31 (0)6-28 59 68 96
>
Reply all
Reply to author
Forward
0 new messages