Calendar view in model admin panel to addition list and tree items.

edited February 2015 in Modules
Hello, Admin!

I have also another question about admin-side model view generation.

I have a schedule model and want to integrate http://fullcalendar.io/ as additional view (on top bar where list, tree situated).

Which method handle returned data from Base_module_model to generate view?
I found that pathes {module}/items_list (items_list in Base_module_model and for table generation Data_table.php), {module}/items_tree ( _tree in Base_module_model) handles list and tree model views. So, I need add something function like items_calendar to my shedule model and handle uri segment {module}/items_calendar and load custom view?

Comments

  • edited 4:20AM
    There is a parameter you can add to your module's configuration of "list_actions" that will accept a key value array with the key being the link to the button and the value being the label. If you want to add Javascript to the page, there is some documentation you can find about that here (the button will automatically be given a class you can target with your javascript "ico_{action}":
    http://docs.getfuelcms.com/general/javascript

    If the calendar is pure javascript and you don't need a controller to display the HTML, you could leverage using a module model's method prefixed with "ajax_". For example, a method on your model of "ajax_my_method" can be accessed by your module's controller at fuel/my_module/ajax/my_method and will get passed an array of any $_POST or $_GET parameters passed to it.
  • edited 4:20AM
    Hi!

    Thanks, It works like a charm!

    You discovered for me "ajax_" model's feature, which I was missed when read docs.
Sign In or Register to comment.