⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

No-CMS and grocery-CRUD master-detail form



goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 20 January 2013 - 15:22 PM

Still wonder about how to make master-detail form with grocery-CRUD?
Imagine that you want to make a "town" form which is able to add, remove, and delete corresponding citizen with grocery-CRUD like this one:
12-enjoy.png

If you are also using No-CMS, then yes, you can do it now, without even open any IDE or text-editor
I have add a new cool module-generator, replacing the old one :)

Get a step-by-step howto here:
http://getnocms.blogspot.com/2013/01/nordrassil-new-web-development-pain.html

For now it is only works for No-CMS, and I don't find any convenient way to integrate "master-detail" feature into grocery-CRUD itself. It seems to be more complicated than it seen :(. And I think it is better to use callback since you can make some changes as needed.
But by modifying "$this->view()" into normal "$this->load->view()", and some other adjustment, you will find the generated code also works with normal CodeIgniter.


web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 20 January 2013 - 18:59 PM

Wow this is great :D . Yes for master-detail feature it is really complicated and I am trying hard to get there. They are many customizations but to get there from the core of grocery CRUD is difficult. Firstly I want to make the multiple grids in one page and then the master-detail feature. I have lot of work to do and I appreciate that some people know how hard it is :-D.

Again great job for this No-CMS feature.

victor

victor
  • profile picture
  • Member

Posted 20 January 2013 - 21:55 PM

I don't tried to use your cms, but it's interesting for me ;-). When I'll have some time I'll try to use your cms. maybe I'll be have some new ideas for you ;-)

goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 21 January 2013 - 03:14 AM

@web-johnny: Yeah, that will be hard, even if someone can provide such a feature, there will be a lot of customization needed. (e.g: for detail item, we will have to add quantity of existing record rather than add a new record in case of there is a same item added).
I think providing callback is already the best solution, since I can't find any other "simple" solution.

Sure @victor, I'll waiting forward for your comments and ideas :)

BTW, how to mention someone here? I found that adding "@" doesn't work :P

web-johnny

web-johnny
  • profile picture
  • Administrator
  • 1,166 posts

Posted 21 January 2013 - 21:54 PM

I agree the simplest way is to add as a callback. As I can see from the interface it seems really cool and I would like to add this feature at a future release as it doesn't seem so difficult if it is a simple master-detail form like this. The difficult is to do a master-detail with search , forms with more than one fields... e.t.c.

As for the forum is not so obvious.
So [b]first step[/b] press the third button of the left Special BBCode: [attachment=442:2013-01-21_214831.png]
[b]Second step[/b] select from the dropdown list the option: Member [attachment=443:2013-01-21_215052.png]
[b]Third step[/b] write the username of the user and press ok.

And this is the result: [member='goFrendiAsgard'] . So when you hover to the url you have the user like facebook AND the user get's informed through an email that somebody mentioned his name.

If you don't want to click the buttons you can write straight away this :

[member='goFrendiAsgard']

goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 23 January 2013 - 01:14 AM

I see, it works well, [member='web-johnny'] :)

davidoster

davidoster
  • profile picture
  • Member

Posted 23 January 2013 - 03:57 AM

[member='goFrendiAsgard'] make sure you fix that PAYPAL issue about the coffee donations on http://getnocms.com so people can contribute!

goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 27 January 2013 - 04:20 AM

[member="David Oster"] I've just know about it. Thanks
I think I should verify this account again.

Nicholas

Nicholas
  • profile picture
  • Member

Posted 07 February 2013 - 17:09 PM

Hi,  Your link is no longer working, is there another place to access this example?

 

Thanks!


davidoster

davidoster
  • profile picture
  • Member

Posted 07 February 2013 - 19:00 PM

Hi,  Your link is no longer working, is there another place to access this example?

 

Thanks!

Try here, http://getnocms.blogspot.gr/2013/01/nordrassil-new-web-development-pain.html


goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 08 February 2013 - 04:32 AM

BTW, do anybody know how to edit a post?

EDIT: okay, never mind, I've found how to edit a post and fix the dead link


Nicholas

Nicholas
  • profile picture
  • Member

Posted 08 February 2013 - 20:47 PM

Hi goFrendiAsgard,

 

I set up some examples in your cms, and I think the master detail form is exactly what I am looking for.   I am noting several bugs, specifically delete does not appear to work in the master/detail field, and when editing an existing record it is only possible to see the last detail record added.  Are these currently expected?  Do you have a better place to bring these issues up in rather than grocerycrud forums? :)


goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 13 February 2013 - 05:11 AM

Hi Nicholas, sorry I've just see this. You can e mail me directly at gofrendiasgard@gmail.com or put an issue at https://github.com/goFrendiAsgard/No-CMS
Do you try it with the newest stable release (https://github.com/goFrendiAsgard/No-CMS/archive/v_0.6.0_stable_rev1.zip)
What browser do you use? some people have a problem with Internet-Explorer.
 


clausanoid

clausanoid
  • profile picture
  • Member

Posted 10 May 2013 - 16:17 PM

Hi can i ask for a favor? i am a student and i loved No-CMS but i am having a little trouble  trying to do a relation (of the master detail type =( )so i can put quantity in a products-components relation, i need something like this:

 

I have a product (photon cannon) it must have (forge) in quantity (1) and (pylon) in quantity (2) ...

if i need  to put on my code it is ok ... thanks in advice 

 

P.D ignore my poor english skills i am from mexico  ;)


goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 11 May 2013 - 00:48 AM

Hi [member='clausanoid']. I'm not a native English speaker too, so don't worry.
I still can't understand what you want. But let me guess. Is it something like this?:

Product                 Quantity
Photon Cannon    1
Pylon                    2


If it is the case, I think you should have these tables:
Project (Project_Id, Name)
Product (Product_Id, Name)
Project_Product (Project_Id, Product_Id, Quantity)

Add those 3 tables to your project by using Module Generator (Nordrassil).

Add a field in "Project" Table, Let's name it "Product".
Change The "Product" field role into "Detail One To Many"
Select "Project_Product" as Selection Table, and "Project_Id" as Relation Column To This Table

Edit "Product_Id" field in "Project_Product" table, change the role into "Lookup"
Choose "Product" as lookup table and "Name" as lookup column.

Please let me know if you want something else.


clausanoid

clausanoid
  • profile picture
  • Member

Posted 13 May 2013 - 14:58 PM

thanks for the answer  i have products  and components  the products are composed by various components in differents quantities what i want to do is to insert components, then make a product and with the relationship select the components and the quantity for each one this my EER

diagramsf.png

so i insert some components, then i create a product select the components that are needed for the product and the quantity of the component for the product.

 

P.D do not look over the id_rel primary key i forgot to put it as the first column  -_-  thanks :3


goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 14 May 2013 - 00:52 AM

I see. My previous post should work well. Just adjust the table and field names.
The key is you must add a "detail one to many" field in productos table


clausanoid

clausanoid
  • profile picture
  • Member

Posted 14 May 2013 - 02:50 AM

well i get it, thanks for the fast answer   ^_^  good job with No-CMS :3  I really appreciate all the help you've given me. I am new to this and these are my school-job practices so i am a little worried about my project .. can i ask you for help in the future?  well anyway... if i can be of help to you only ask it  :D 

 

EDIT: i have done it now it shows me 2 textboxes one for components and one for quantity but the quantity one searchs for values in the database :S


goFrendiAsgard

goFrendiAsgard
  • profile picture
  • Member

Posted 14 May 2013 - 04:12 AM

Sure, as long as I able to help.

You can be a contributor by reporting bugs, suggesting things, do translation (I already add Spanish Language, but if you know other languages that would help a lot), and send some donation :)


clausanoid

clausanoid
  • profile picture
  • Member

Posted 14 May 2013 - 05:15 AM

well i will do it when i can i am a student so i am poor haha i am honing my skills now i have this problem 

 

http://www.youtube.com/watch?v=Vh58sLdKlWs