Jump to content


Suggestion for future release

linked content suggestion

  • Please log in to reply
7 replies to this topic

#1 Kobus

Kobus

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSouth Africa

Posted 07 October 2012 - 03:28 PM

Hi guys,

I have a question regarding a suggestion for future releases, and was wondering if this could be implemented in a later version of Grocery CRUD.

Let's say I have 3 tables:

Table: page (has 7 fields)
Table: box (has 5 fields)
Table: page_box (has 3 fields, namely page_id, box_id, position)

I have set up "Manage pages" and added a n_n relationship for the boxes, as follows:

$crud->set_table($this->config->item('db_prefix') . 'page');
$crud->set_relation_n_n('Boxes', $this->config->item('db_prefix') . 'page_box', $this->config->item('db_prefix') . 'box', 'page_id', 'box_id', 'title');

This works fine in the sense that I can assign boxes to the pages IF I do have defined boxes, but, if you do not have any boxes defined, you get a message that says "Please add boxes first" or something to that effect. How about allowing addition of boxes via a popup, which then immediately becomes available for selection in the "Manage pages" screen? This would be an awesome addition, in my opinion!

Thanks!

Kobus

--------------------
Kobus Myburgh
Managing Director: Impero Consulting
http://www.impero.co.za
+27 82 043 8488


#2 Kobus

Kobus

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSouth Africa

Posted 26 November 2012 - 06:49 AM

This can be done with actions, as Victor pointed out, but only from the listing page. I think making an "action" in the add/edit screen would be great. The same thing that does it for the listing page could possibly be made for the edit screen. I would like to check this out and see how I can make this work.

--------------------
Kobus Myburgh
Managing Director: Impero Consulting
http://www.impero.co.za
+27 82 043 8488


#3 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 26 November 2012 - 09:47 AM

The way I understand this, is that you could have within your controller a function that can be called(virtually from anywhere you want it) to display a popup window for addition.

Then this function could be called either automatically, when you get to a page with an empty dataset, or upon user request.
The way I see it it shouldn't be hardcoded to GC library so it gives freedom to the individual developer on how to approach this.

____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#4 Kobus

Kobus

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSouth Africa

Posted 07 January 2013 - 02:35 PM

David, correct - not hard coded, but I was wondering if there is an "add_action" commend available for ONLY the add/edit screens :-)

Kobus

--------------------
Kobus Myburgh
Managing Director: Impero Consulting
http://www.impero.co.za
+27 82 043 8488


#5 zrmba

zrmba

    Member

  • Members
  • PipPip
  • 16 posts

Posted 02 February 2013 - 10:48 AM

Hi there, should read here:
http://www.grocerycr...o-quick-insert/

#6 Kobus

Kobus

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSouth Africa

Posted 03 February 2013 - 04:19 PM

Thanks, zrmba, I saw that. I was just wondering if the "add_action" could be added to "add/edit" screens as opposed to the list screen. When there are no items to link to in the add/edit screen, I would like to add a new item on the fly.

 

The default "add_action" adds the icon to the list screen only, if I am not mistaken? Am I missing something?

 

Thanks!

 

Kobus


--------------------
Kobus Myburgh
Managing Director: Impero Consulting
http://www.impero.co.za
+27 82 043 8488


#7 davidoster

davidoster

    Grocery CRUD Ninja

  • Advanced Member
  • PipPipPip
  • 1,068 posts
  • LocationAthens, Greece

Posted 05 February 2013 - 09:03 AM

Thanks, zrmba, I saw that. I was just wondering if the "add_action" could be added to "add/edit" screens as opposed to the list screen. When there are no items to link to in the add/edit screen, I would like to add a new item on the fly.

 

The default "add_action" adds the icon to the list screen only, if I am not mistaken? Am I missing something?

 

Thanks!

 

Kobus

As it says here, http://www.grocerycr...ions/add_action

"Add an action/operation to the list table."

So you are right, add_action works on the list page.

I suppose somebody could make an extend on grocery_crud controller and make the add_action_add_delete function that adds on the add/edit forms!

But this, is not yet implemented!!!


____________________________________________________________

 

rtfm_small.jpg---!!!Please read these guidelines before asking to the forums!!!---

____________________________________________________________

 

David Oster aka George Pasparakis,
http://odphotography.com
http://eletter.gr


#8 Kobus

Kobus

    Advanced Member

  • Members
  • PipPipPip
  • 74 posts
  • LocationSouth Africa

Posted 05 February 2013 - 09:28 AM

Hi David,

 

Thank you. That confirms it. I know better than to promise to look into it, but I will try. :-)

 

Regards,

 

Kobus


--------------------
Kobus Myburgh
Managing Director: Impero Consulting
http://www.impero.co.za
+27 82 043 8488






Also tagged with one or more of these keywords: linked content, suggestion

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users