Updated 009 Adding Admin Views to a Component (markdown)

Amigo 2019-06-06 10:53:45 +02:00
parent d218dcebcd
commit c676b3305f
1 changed files with 9 additions and 9 deletions

@ -1,30 +1,30 @@
# ADDING ADMIN VIEWS TO A COMPONENT
Hi,we have looked at setting up admin views and looked at creating fields for admin views. We've looked at setting up field types and how to use field types to create fields. Now we will look at setting the admin views to the component. I'm going to deal with all that can be done to the component. [00:00:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m28s) Firstly we will be looking at adding the admin views to a component. We'll go to components, then to sermon distributor, and then go to settings. There you will see admin views. [00:00:59](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m59s)
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. [00:00:59](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h00m59s)
**Sermon Component Setting as Example**
To connect admin views to your component you need to go to settings and open this button here(as see in video). So you have a dropdown (select an option), then make a selection and then click 'next'. Then do the next one. If you have a lot of admin views like I do here you would type in the name of the admin view. [00:01:33](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m33s)
To connect admin views to your component go to settings and open this button here. (See video.) Select an option and click 'next'. Do the next one. If you have a lot of admin views, type in the name of the admin view. [00:01:33](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h01m33s)
**Adding Views Setting Icons**
Type in the name 'Sermon'. Now these icons here(See video) which have been mentioned previously, are the icons from Joomla which is called Joomla Standard Icomoon Fonts. [00:02:02](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m02s) If you select a an icon here 'Joomla', it will show you that little icon(1) but only during the selection face. That is the icon that is going to be used for the view here in the right. Look at the icon (top right) as we click through [00:02:24](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m24s) component builder ,the icon gets updated.
Type in the name 'Sermon'. These icons here which have been mentioned previously, are the icons from Joomla called Joomla Standard Icomoon Fonts. (See video.) [00:02:02](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m02s) If you select an icon here, 'Joomla', it will show you that icon (see video) but only during the selection face. That is the icon that is going to be used for the view in the right. Look at the icon (top right) as we click through component builder; it gets updated. [00:02:24](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m24s)
**Settings Switch Admin Menu**
This icon is what is being set here(See video). You can select the icons to reflect the admin view of your choice. We have a bunch of switches here and we'll look at them one at a time. 'Admin menu' is the menu. [00:02:49](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m49s) Do you want that view to show up next to your main view? That will be the first tick box. Then say, 'yes'.
This icon is what is being set here. (See video.) You can select the icons to reflect the admin view of your choice. We have a bunch of switches here that we'll look at one at a time. 'Admin menu' is the menu. [00:02:49](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h02m49s) Do you want that view to show up next to your main view? That will be the first tick box, yes.
**Settings Switch Dashboard Items**
Then do you want to have an 'add record' icon for this view? If you go to the dashboard, the 'add record' icon, [00:03:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m10s) it is this icon 'Add Admin View'. It is a shortcut to create an admin view from the dashboard. So we will say 'yes'. Then a 'Dashboard (list of records)' icon will show. Maybe you don't want this 'Admin View' icon, just add 'admin view', then tick that 'Dashboard(add record)' as 'no'. [00:03:35](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m35s) At 'Dashboard(list of records)' click, 'yes'.
Do you want to have an 'add record' icon for this view? If you go to the dashboard it is this icon 'Add Admin View'. [00:03:10](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m10s) It is a shortcut to create an admin view from the dashboard. Say 'yes' and a 'Dashboard (list of records)' icon will show. If you don't want this 'Admin View' icon, just add 'admin view' and tick that 'Dashboard(add record)' as 'no'. [00:03:35](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m35s)
**Settings Switch Submenu**
Then a submenu. The submenu if you've opened your view that has a submenu here that can collapse away. This submenu you can add this view to the submenu or not.
If you've opened your view it has a submenu here that can collapse away. You can add this view to the submenu or not.
**Settings Switch Auto Check-in**
Then auto check-in [00:03:59](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m59s) is a little tweak that I've added to my Joomla components and I'm possibly going to make a pull request to add it to Joomla. What auto check-in does, it adds a feature to your component. Since I had clients that have complained that some people had opened an item and then clicked back in the browser , instead of clicking close and consequently the item got locked out [00:04:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m28s) to that individual and got inaccessible unless they have admin rights to check it back in, therefore we had created an auto check-in. Auto check-in checks whether this item has been checked out longer than a set period and if it happened to be so, checks it automatically. That set period is something that the administrator sets in the global settings of the component. I'll show you that later. [00:04:57](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m57s) You can add auto check-in to a view by either saying 'yes' or 'no'.
Auto check-in is a tweak that I've added to my Joomla components. (I'm possibly going to make a pull request to add it to Joomla.) [00:03:59](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h03m59s) Auto check-in adds a feature to your component. [00:04:28](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m28s) It checks whether this item had been checked out longer than a set period; if it happened to be so, it checks it automatically. The set period is something that the administrator sets in the global settings of the component. [00:04:57](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h04m57s) You can add auto check-in to a view by either saying 'yes' or 'no'.
@ -34,9 +34,9 @@ Then auto check-in [00:03:59](https://www.youtube.com/watch?v=39vY66X7GGU&list=P
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.
* **For example**
* **Example**
If I go [00:05:33](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h05m33s) to preacher and I would open 'A Capella Music' you'd see that it has that 'version' button at the top. If I was going to make a change here(Email), let's say, I typed in Info@vdm.io and I set 'Some text here' and I clicked 'save'. Then I click on 'version', you will see that it is now locked a new version. [00:06:13](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m13s) There are the old ones. I could click on one of the old ones. First let me say I could take the one I'm on currently and I can say keep. That would sort of lock it in because you can also set it how long amount of history should the system keep. The default is 10 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' [00:06:52](https://www.youtube.com/watch?v=39vY66X7GGU&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h06m52s) and 'restore'again and the details are back again. History Component is actually a Joomla extension which you're able as a component developer to integrate into your own components. [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 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) <<<<<<<<<<<