Updated 009 Adding Admin Views to a Component (markdown)

Amigo 2019-05-28 13:16:51 +02:00
parent 2e2a2616b7
commit 3bce177906

@ -50,12 +50,12 @@ Then this access switch might throw you out. This simply adds the following feat
**Settings Switch Export/Import**
Then when you do want to add to import/export function. This is a [00:16:38](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s) extended area which component builder dynamically just adds. You don't need to do anything is to relation to scripting at this stage. You could just click yes or no to import/export feature at the top of the page of every view. Every view will have an import/export. At the moment it's a direct relationship import/export. What I mean by that is You need to follow. If you export this then you'd see the the way it should look to do import. [00:17:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m13s) And the import is really nice you can map the headers to their specific database tables. Obviously there's work needed especially when you're dealing with information that was encrypted. If you export it, it will decrypt it, if you have the permissions to access that item of course. The problem is because it's encrypting yet when you imported, it doesn't know that it should encrypted. There is a little discrepancy with the advance storing methods. As long as you are having a data back end database table that doesn't require these advance storing methods, it's just your normal defaults like I explain before. Then import/export method will then works seemingly without any problems. I'm still working on this area but it's already working well enough that I felt I could leave it in there. [00:18:07](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) That is the switch here(Export/Import data) and if you don't like the feature just click no.
Then when you do want to add to import/export function. This is a [00:16:38](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s) extended area which component builder dynamically just adds. You don't need to do anything is to relation to scripting at this stage. You could just click yes or no to import/export feature at the top of the page of every view. Every view will have an import/export. At the moment it's a direct relationship import/export. What I mean by that is You need to follow. If you export this then you'd see the the way it should look to do import. [00:17:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m13s) And the import is really nice you can map the headers to their specific database tables. Obviously there's work needed especially when you're dealing with information that was encrypted. If you export it, it will encrypt it, if you have the permissions to access that item of course. The problem is because it's encrypting yet when you imported, it doesn't know that it should encrypted. There is a little discrepancy with the advance storing methods. As long as you are having a data back end database table that doesn't require these advance storing methods, it's just your normal defaults like I explain before. Then import/export method will then works seemingly without any problems. I'm still working on this area but it's already working well enough that I felt I could leave it in there. [00:18:07](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) That is the switch here(Export/Import data) and if you don't like the feature just click no.
**Settings Switch Edit - Create - Site Views**
Then here is a feature which I think I'm most excited about. That is every back end view has of course and edit area. If you've selected that read write option then the edit area you can change the values of that back end listview. The admin create site view means that the system is going to dynamically build [00:18:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m42s) the front area which you can access to edit the data at the front of the website. That is an excellent tool. It takes exactly this(see video) if I was to use this and as an example. It takes this editing area and place it on the front of your website. [00:19:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m13s) You are controlling in the permissional structures who has access to edit this, who access to edit the status, who has access to edit specific fields. We looked at adding the fields to your admin views and you could click whether this field should have permissional structure. That means that if you have those things set up in the back in the global professional tab, then it will be implemented in the front if a certain user is in the correct group. [00:19:44](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m44s) They wont be able to access this then if they have access. They don't have the right to for example update maybe the modified date or the status then in the front. They also will not be able to do that. You have immense control over who can do what. But at the same time you have the ability to actually edit items on the front. I think that is excellent to be able to do that. That all of that just possible by saying yes. But realize this, the fact that it creates the [00:20:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m19s) view if I could says so and places it on the front, doesn't mean that there is a link somewhere to it. That is something you need to add to your site front custom site as you develop it. And this is partly a feature therefore which if you don't know PHP and if you're not that familiar with how to setup your links on the front of the component. You would possibly would find this difficult to implement. But I will show you what it builds. I can show you that now. [00:20:54](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m54s) I have a component which I'm using that feature quite a lot. It's called costbenefitprojection. This is the back end. If we look at the views, we have here called company and we have one called scaling factor and intervention. Now these are editing views as you can see. Those other list views, those are the editing views. If I go to the front of the website [00:21:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m28s) and I open that component. And I click on view, you will see that there is company, intervention and scaling factors. They are basically being extended here. What the component builder does, it adds this view, and the model for it. I also add the controller for it. It puts all the script in place so that all you need to do, is inside of, for example [00:22:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m00s) I have here an area called cpanel. Let me show you this component briefly. This is just some dummy data that I placed in here. None of them is real. Here you can open multiple items. This is all stuff that I built in component. None of this was built outside of component builder. It all was done in component builder. And you can click on edit advance profile. And it will open the editing area. [00:22:37](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m37s)
Then here is a feature which I think I'm most excited about. That is every back end view has of course and edit area. If you've selected that read write option then the edit area you can change the values of that back end listview. The admin create site view means that the system is going to dynamically build [00:18:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m42s) the front area which you can access to edit the data at the front of the website. That is an excellent tool. It takes exactly this(see video) if I was to use this and as an example. It takes this editing area and place it on the front of your website. [00:19:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m13s) You are controlling in the permissional structures who has access to edit this, who access to edit the status, who has access to edit specific fields. We looked at adding the fields to your admin views and you could click whether this field should have permissional structure. That means that if you have those things set up in the back in the global professional tab, then it will be implemented in the front if a certain user is in the correct group. [00:19:44](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m44s) They wont be able to access this then if they have access. They don't have the right to for example update maybe the modified date or the status then in the front. They also will not be able to do that. You have immense control over who can do what. But at the same time you have the ability to actually edit items on the front. I think that is excellent to be able to do that. That all of that just possible by saying yes. But realize this, the fact that it creates the [00:20:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m19s) view if I could says so and places it on the front, doesn't mean that there is a link somewhere to it. That is something you need to add to your site front custom site as you develop it. And this is partly a feature therefore which if you don't know PHP and if you're not that familiar with how to setup your links on the front of the component. You would possibly would find this difficult to implement. But I will show you what it builds. I can show you that now. [00:20:54](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m54s) I have a component which I'm using that feature quite a lot. It's called costbenefitprojection. This is the back end. If we look at the views, we have here called company and we have one called scaling factor and intervention. Now these are editing views as you can see. Those other list views, those are the editing views. If I go to the front of the website [00:21:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m28s) and I open that component. And I click on view, you will see that there is company, intervention and scaling factors. They are basically being extended here. What the component builder does, it adds this view, and the model for it. I also add the controller for it. It puts all the script in place so that all you need to do, is inside of, for example [00:22:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m00s) I have here an area called cpanel. Let me show you this component briefly. This is just some dummy data that I placed in here. None of them is real. Here you can open multiple items. This is all stuff that I built in component. None of this was built outside of component builder. It all was done in component builder. And you can click on edit advance profile. And it will open the editing area. [00:22:37](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m37s) This is the front end editing area, as you can see there are all the tabs. Let me show you the back end. Here's the back end area. Its showing up the same information in the front. It only dumps the permission and publishing features. That is because of access permissions is done automatically [00:23:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) Because that front-end user didn't have permissions to edit most of the things in here. You didn't have the right to edit any of these. Therefore it didn't need to see it and so the system just remove that tab, same goes with the permissions. If you didn't have the right to do scaling factors on interventions, you also have dumped that, it won't show it up in the front.
???
And so this is the back end of that same dummy company that I've set up. You can see that it [00:23:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m42s) moved it to the front. Not only did it make it possible to edit data, but also to create new companies. If you click on that(create company) you will see it opens up in the area for you to start fresh. You can create a company from scratch. In this specific example you will see that it cannot add a user. So what the system has done through some custom scripting that I've added, if you click save it adds his ID in here(user(member)-select a user). And he doesn't need to select that(user(member)-select a user). That's just a quick look at [00:24:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m19s) that specific button called edit create site view. It adds the whole code base to the front. And integrates it to the way that the front needs to be able to control the permissions.
As you can see this is the back end editing area of that. now let me show you sorry this is the front end Editing area And as you can see there are all the Tabs Now let me show you the backend Here's the backend area So it's basically a showing up the same information in the front Is only dumps the permission and Publishing features But that is because of access permissions is done automatically [00:23:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) Because that front-end user didn't have permissions to edit things In most of the things in here in fact You didn't have the right to edit any of these Therefore it didn't need to see it and so the system just remove that tab same goes with the permissions And if you didn't have the right to do scaling factors on interventions You also have dumped that it won't show it up In the front And so this is the back end of that same dummy company That I've set up And you can see that it basically [00:23:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m42s) Moved it to the front Not only did it make it possible to edit data but also to create new companies So if you click on that You see it opens up in the area for you to start fresh so you can create a company from scratch Now In this specific example you see that it cannot actually add a user So what the system is done through some custom scripting that I've added If you click save it adds his ID in here And he doesn't need to select that Ok so that's just a quick look at [00:24:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m19s) That specific button Called edit create site view it adds the whole codebase to the front And integrates it to the Way that the front Needs to be able to control the permissions Then the order of of the items are Simply the way in which it will be displayed anywhere So if we think about the order For a moment here Of Example component builder [00:24:48](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m48s) The order of which these icons are laid out and even if you opened one of them The order in which this is done And also for the sub menu All of that is controlled with this order Number here Ok so That's a quick look at adding Admin views to your component I hope that is insightful enough for you to understand how to do that If you have any questions please you're welcome to send me a mail [00:25:22](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h25m22s) Thanks for watching
Then the order of the items are simply the way in which it will be displayed anywhere. If we think about the order for a moment here of example component builder, [00:24:48](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m48s) the order of which these icons are laid out and even if you opened one of them, the order in which this is done And also for the sub menu, all of that is controlled with this order number here. That's a quick look at adding admin views to your component. I hope that is insightful enough for you to understand how to do that. If you have any questions please you're welcome to send me a mail.