Updated 009 Adding Admin Views to a Component (markdown)
parent
fe5927be83
commit
573e3755df
@ -3,7 +3,7 @@
|
|||||||
[00:00:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s)
|
[00:00:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m00s)
|
||||||
(_Click on these time links to see Youtube video_)
|
(_Click on these time links to see Youtube video_)
|
||||||
|
|
||||||
We've looked at setting up admin views and creating fields for admin views. We've looked at setting up field types and how to use field types to create fields. Now we'll look at setting the admin views to the component and all that can be done to the component. [00:00:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m28s) First we will look at adding the admin views to a component. Go to components, sermon distributor, and settings. There you will see admin views.
|
We've looked at setting up admin views and creating fields for admin views. We've looked at setting up field types and how to use field types to create fields. Now we'll look at setting the admin views to the component and all that can be done to the component. [00:00:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m28s) First we will look at adding the admin views to a component. Go to components, sermon distributor, and settings. There you will see admin views.
|
||||||
|
|
||||||
### Sermon Component Setting as Example
|
### Sermon Component Setting as Example
|
||||||
|
|
||||||
@ -45,17 +45,17 @@ Auto check-in is a tweak that I've added to my Joomla components. (I'm possibly
|
|||||||
|
|
||||||
[00:05:06](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m06s)
|
[00:05:06](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m06s)
|
||||||
|
|
||||||
Keeping history of a back end view. The History Component is one of the most exciting things that I have integrated. It keeps track of every change you make in any article or item in your application.
|
Keeping a history of a back end view. The History Component is one of the most exciting things that I have integrated. It keeps track of every change you make in any article or item in your application.
|
||||||
|
|
||||||
* Example
|
* Example
|
||||||
|
|
||||||
If I go [00:05:33](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m33s) to preacher open 'A Capella Music' you'd see the 'version' button at the top. I type in Info@vdm.io, set 'Some text here' and clicked 'save'. If I click on 'version', you'll see that it now locked a new version. [00:06:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m13s) I could take the one I'm on currently and keep it. It would lock it in because you can also set the amount of history the system should keep. The default changes. I can click on the previous version and say restore and it will be restored it. As you can see, Email address and description is gone. To go back to the one that has been done just click on 'version' and 'restore' and the details are back again. [00:06:52](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m52s) History Component is a Joomla extension which you're able to integrate into your own components as a component developer. [00:07:14](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m14s)
|
If I go [00:05:33](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m33s) to preacher open 'A Capella Music' you'd see the 'version' button at the top. I type in Info@vdm.io, set 'Some text here' and click 'save'. If I click on 'version', you'll see that it now locked a new version. [00:06:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m13s) I could take the one I'm on currently and keep it. It would lock it in because you can also set the amount of history the system should keep. The default changes. I can click on the previous version and say restore and it will be restored it. As you can see, Email address and description are gone. To go back to the one that has been done just click on 'version' and 'restore' and the details are back again. [00:06:52](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m52s) History Component is a Joomla extension which you're able to integrate into your own components as a component developer. [00:07:14](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h07m14s)
|
||||||
|
|
||||||
### Settings Switch MetaData
|
### Settings Switch MetaData
|
||||||
|
|
||||||
[00:14:23](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m23s)
|
[00:14:23](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m23s)
|
||||||
|
|
||||||
Depending on whether you are going to use the views information on the front end as your main base for your page, you might want to add metadata. Although Google and others may be ignoring it and metadata isn't that useful anymore, it still plays a role making a page search engine optimized. If you do your homework and do things right in relationship to implementation of your metadata, you'd see that it adds good features to do the front end of your site. [00:14:51](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) I'd suggest that you add metadata when you use a specific area to the front. (You'll be remodeling the data because you can get relationships from many databases. You need the area in the back end to get the data.) [00:15:26](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m26s)
|
Depending on whether you are going to use the views information on the front end as your main base for your page, you might want to add metadata. Although Google and others may be ignoring it and metadata isn't that useful anymore, it still plays a role in making a page search engine optimized. If you do your homework and do things right in relation to the implementation of your metadata, you'd see that it adds good features to do the front end of your site. [00:14:51](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h14m51s) I'd suggest that you add metadata when you use a specific area to the front. (You'll be remodeling the data because you can get relationships from many databases. You need the area in the back end to get the data.) [00:15:26](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h15m26s)
|
||||||
|
|
||||||
### Settings Switch Access
|
### Settings Switch Access
|
||||||
|
|
||||||
@ -67,20 +67,20 @@ This access switch adds the following feature: if you open an article, and open
|
|||||||
|
|
||||||
[00:16:38](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s)
|
[00:16:38](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h16m38s)
|
||||||
|
|
||||||
When you want to add to import/export function. This is an extended area which component builder dynamically adds. You don't need to do anything in relation to scripting at this stage. You could click 'yes' or 'no' to import/export feature at the top of the page of every view. Every view will have an import/export function. It's a direct relationship import/export. If you export this, you'd see how to do a import; if it's is nice you can map the headers to their specific database tables. [00:17:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m13s) Work is 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, but the problem is that it had been decrypted when you imported it, so it doesn't know that it should encrypt it. There is a 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 normal defaults like I explained before. Then the import/export method will works without any problem. [00:18:07](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) The switch here is 'Export/Import data.' If you don't like the feature just click 'no'.
|
When you want to add to the import/export function. This is an extended area which component builder dynamically adds. You don't need to do anything in relation to scripting at this stage. You could click 'yes' or 'no' to import/export feature at the top of the page of every view. Every view will have an import/export function. It's a direct relationship with import/export. If you export this, you'd see how to do an import; if it's is nice you can map the headers to their specific database tables. [00:17:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h17m13s) Work is 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, but the problem is that it had been decrypted when you imported it, so it doesn't know that it should encrypt it. There is a 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 normal defaults like I explained before. Then the import/export method will work without any problem. [00:18:07](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m07s) The switch here is 'Export/Import data.' If you don't like the feature just click 'no'.
|
||||||
|
|
||||||
### Settings Switch Edit - Create - Site Views
|
### Settings Switch Edit - Create - Site Views
|
||||||
|
|
||||||
[00:18:20](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m20s)
|
[00:18:20](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m20s)
|
||||||
|
|
||||||
Every back end view has an edit area. If you've selected the read/write option in the edit area you can change the values of that back end listview. The admin create site view means that the system will dynamically build the front area which you then can access to edit the data at the front of the website. [00:18:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m42s) It's an excellent tool. For example, it takes this editing area and places it on the front of your website. (See video.) [00:19:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m13s) In the permissional structures you can control who is editing this, etc. (We looked at adding the fields to your admin views; you could set whether this field should have permissional structure.) It means that if you have those things set up back in the global permissional tab, it will be implemented in the front. [00:19:44](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m44s) If the user is in the incorrect group he won't be able to access this. Nor, for example, update the modified date or the status in the front. You have control over who can do what but at the same time you have the ability to edit items on the front. [00:20:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m19s) However, the fact that it creates the view 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. Therefore, if you don't know PHP and if you're not familiar with setting up your links on the front of the component, you would possibly find this feature difficult to implement. [00:20:54](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m54s)
|
Every back end view has an edit area. If you've selected the read/write option in the edit area you can change the values of that back end listview. The admin creates site view means that the system will dynamically build the front area which you then can access to edit the data at the front of the website. [00:18:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h18m42s) It's an excellent tool. For example, it takes this editing area and places it on the front of your website. (See video.) [00:19:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m13s) In the permissional structures you can control who is editing this, etc. (We looked at adding the fields to your admin views; you could set whether this field should have permissional structure.) It means that if you have those things set up back in the global permissional tab, it will be implemented in the front. [00:19:44](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h19m44s) If the user is in the incorrect group he won't be able to access this. Nor, for example, update the modified date or the status in the front. You have control over who can do what but at the same time you have the ability to edit items on the front. [00:20:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m19s) However, the fact that it creates the view 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. Therefore, if you don't know PHP and if you're not familiar with setting up your links on the front of the component, you would possibly find this feature difficult to implement. [00:20:54](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h20m54s)
|
||||||
|
|
||||||
Let's look at what it can build. I have a component in which I'm using the feature quite a lot. It's called 'costbenefitprojection'. In the back end we look at the views, where we have here one called 'company' and one called 'scaling' factor and 'intervention'. These are 'editing views' and 'list views'. Go to the front of the website, open the component, click on view, and you will see company, intervention and scaling factors. [00:21:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m28s) They are being extended here. The component builder adds this view and the module for it. The controller for it was also added. The script is placed in area. [00:22:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m00s) For example, we'll look at this component inside the area called 'cpanel'. (This is some dummy data that I placed in here.) Here you can open multiple items. You can click on 'edit advanced 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.) Here's the back end area. The same information in the front shows up here, only dumping the permission and publishing features. The Access permissions were done automatically because the front-end user didn't have permissions to edit most of the things here. [00:23:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) You didn't have the right to edit any of these, therefore the system removed the tab. The same goes with the permissions. If you didn't have the right to do scaling factors on interventions, you have dumped it; it won't show it up in the front.
|
Let's look at what it can build. I have a component in which I'm using the feature quite a lot. It's called 'costbenefitprojection'. In the back end, we look at the views, where we have here one called 'company' and one called 'scaling' factor and 'intervention'. These are 'editing views' and 'list views'. Go to the front of the website, open the component, click on view, and you will see company, intervention and scaling factors. [00:21:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h21m28s) They are being extended here. The component builder adds this view and the module for it. The controller for it was also added. The script is placed in the area. [00:22:00](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h22m00s) For example, we'll look at this component inside the area called 'cpanel'. (This is some dummy data that I placed in here.) Here you can open multiple items. You can click on 'edit advanced 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.) Here's the back end area. The same information in the front shows up here, only dumping the permission and publishing features. The Access permissions were done automatically because the front-end user didn't have permissions to edit most of the things here. [00:23:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m10s) You didn't have the right to edit any of these, therefore the system removed the tab. The same goes with the permissions. If you didn't have the right to do scaling factors on interventions, you have dumped it; it won't show it up in the front.
|
||||||
|
|
||||||
This is the back end of the dummy company that I've set up. [00:23:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m42s) You can see that it 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 create company you will see that it opens up in an area for you to start fresh. You can create a company from scratch. In this example you will see that it cannot add a user. If you click save, the system (through some custom scripting that I've added) adds his ID here. (See video.) He doesn't need to select it.
|
This is the back end of the dummy company that I've set up. [00:23:42](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h23m42s) You can see that it 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 'create company' you will see that it opens up in an area for you to start fresh. You can create a company from scratch. In this example, you will see that it cannot add a user. If you click Save, the system (through some custom scripting that I've added) adds his ID here. (See video.) He doesn't need to select it.
|
||||||
|
|
||||||
That was a quick look at that button called edit create site view. [00:24:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m19s) 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.
|
That was a quick look at that button called edit create site view. [00:24:19](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m19s) 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.
|
||||||
|
|
||||||
The order of the items are the way it will be displayed anywhere. For example, the order in which all of this is done (how the icons are laid out even if you opened one of them; for the submenu, etc.) is controlled by this order number here. (See video.) [00:24:48](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m48s)
|
The order of the items is the way it will be displayed anywhere. For example, the order in which all of this is done (how the icons are laid out even if you opened one of them; for the submenu, etc.) is controlled by this order number here. (See video.) [00:24:48](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h24m48s)
|
||||||
|
|
||||||
I hope this tutorial was insightful. If you have any questions you're welcome to send me an email.
|
I hope this tutorial was insightful. If you have any questions you're welcome to send me an email.
|
||||||
|
Loading…
Reference in New Issue
Block a user