Updated 007 Admin Views (markdown)

Amigo 2019-05-30 11:41:37 +02:00
parent d92ba8c61e
commit 77f0480951

@ -57,33 +57,19 @@ In the child database table, the ID of this preacher must be found. [00:25:43](h
The basic way of linking another view would be to select that view from 'Sermons' drop down; set in which tab it should display, what child database table in which to look, and which parent's value to use to build a relationship. [00:27:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m12s) Then there is 'Add New Button' option of 'yes' or 'no.' [00:27:38](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h27m38s) You can decide whether it should show or not. If you say 'yes' and you have, in that view, created the permissional structure for whether somebody can create an item or not, you can control the display of that button by setting the permission of that user's specific group. [00:28:02](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m02s) If that user is in a group that does not have permission to create new items, then the 'new' button will not show up. [00:28:26](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h28m26s) The feature that I have explained to you shows that we are busy in preachers and it is able to display the fields that are being used. The fields are linked to preachers from this column (see video), so we are using a repeatable field structure and we are able to connect the field names to this view. [00:29:05](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m05s)
Open the admin view,(See video.) [00:29:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m32s) Go to 'Linked Views.' There is an 'R' in the pointer as well as the word 'field.' If you are trying to connect a view from the parent, where it is stored in 'addfields' which is the database column name. [00:29:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m54s) Now go to database and 'componentbuilder_admin views.' You'd see 'addfields.' There it stores the ID, then the list. [00:30:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m21s) There's a way in which your repeatable fields are stored by Joomla. In the repeatable field called 'addfields,' there is a field called 'field'. It should look for the ID of the fields in addfields [00:30:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m51s) in the field array for the IDs that it need to fetch. The way you would have mapped that in the 'Connect a Linked view' is you would say that this is a capital 'R' for repeatable fields basically that is the convention to tell the system it is a repeatable field we looking in [00:31:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m14s) and inside of the repeatable field we must look in the field array for those ID's and they should map to the child's ID. If that wasn't a repeatable field but an array you would simply say array [00:31:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m34s) and if the array is just the values themselves you would drop off any pointer to the specific value. But if it's an associative array you would just add the name of the associative key that it needs to look in. [00:32:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m00s) If it's just a normal array without association leave it like that so this would just tell the system that it is a array and it needs to look inside of those values for these IDs. So that's sort of explains the linking of an admin view to another admin view. Now getting on with the setting up of fields. [00:32:28](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m28s)
Open the admin view. (See video.) [00:29:32](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m32s) Go to 'Linked Views.' There is an 'R' in the pointer as well as the word 'field.' If you are trying to connect a view from the parent, (in the parents it is stored in 'addfields' which is the database column name) go to database and 'componentbuilder_admin views.' [00:29:54](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h29m54s) You'd see 'addfields.' You'd see that there's a way in which your repeatable fields are stored by Joomla. [00:30:21](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m21s) In the repeatable field called 'addfields,' there is a field called 'field.' It should look for the ID of the fields in addfields in the field array for the IDs that it need to fetch. [00:30:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h30m51s) To connect a linked view you should set this as a capital 'R' for repeatable fields. That is the convention telling the system that it is a repeatable field we looking at. [00:31:14](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m14s) Inside of the repeatable field we must look in the field array for those IDs and they should map to the child's ID. If that wasn't a repeatable field but an array, you would simply say array. [00:31:34](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h31m34s) If the array is the values themselves you would drop off any pointer to the specific value. If it's an associative array you would add the name of the associative key that it needs to look in; if it's a normal array without association, leave it like that. This is so that the system would know that it is a array and it needs to look inside of those values for these IDs. [00:32:00](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m00s)
**Setting up of Fields**
**Setting Up Fields**
Now since we've already created the fields beforehand you will usually start out this way.(See video) The fields that you have created you would scroll down and if it is a long list you just start with typing that fields name and it will sort of bringing it up to you. Then it asks you whether you [00:32:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s) would like to show this field in the admin list view and that means if you've closed your editing area there is a list of names and if you want that specific field to show up in this list then you would select 'show'. [00:33:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m18s) If you have selected 'show' you could tell in which order you want this. Must it be the first one, second one, ext.
Since we already created the fields beforehand you will start out this way. (See video.) You would scroll down the fields that you created. (If it is a long list you can type the field's name and it will bringing it up to you.) It asks whether you'd like to show the field in the admin list view. [00:32:56](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h32m56s) That means that there is a list of names if you close your editing area; if you want that specific field to show up in this list you'd select 'show'. If you select 'show,' you can set in which order you want this. (See video.) [00:33:18](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m18s)
Now the title and alias concept in Joomla is quite interesting [00:33:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m41s) It's actually needed especially if you want to do history control or integration with Joomla's infrastructure when it comes to their history and tagging systems. You need to add a title and an alias to all your views [00:33:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m59s) especially if it is a view that is going to be used in the front. So in this case since we are going to use preachers in the front, to display list of preachers, we most certainly going to add a title, and we are going to use the name as the title. Then again back to the back end. Do we want to have this 'sortable', do we want this thing to be clickable there, so you can click on it, and it sorts the table alphabetically [00:34:30](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m30s) on the basis of this column. So if you want to have it 'sortable' or do you want to have this (See video) field be searchable. Do you want someone to type into this box? We take 'warehouse' for example, type it in and search. Do you want it to [00:34:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m51s) show only that specific field. So if you want them to be able to search for it you, say yes. Then the filter option is a tricky one. You don't want to set name to filtering because then it will show a list of all the names that already is being shown in the table. You only want to use filter on things that are like a radio box or a [00:35:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) other view or you know fields that actually are not all being displayed one after the other in the table. So for our example I added, let's go to sermon distributor and preacher. I added no extra fields there, but at sermons I added preacher. So there's a list of all the preachers here so I could sift and say ok I don't want to see this preachers sermons and then it shows up only those, so that is the filters and the way that you set up the filter is simply by clicking yes or no here and it will set up that filter for you. Then this link if you are setting up a custom field and you want to be able to [00:36:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m12s) in the display of the list have it clickable so I can click here and actually go to that preacher. And then click close and then I'm back in the sermons list view. I could also click on series and it will take me to the series, and I can edit the series immediately. And click close and take me back to the list view. So if you want that feature for the specific item then you need to tick yes (See video). Now usually we used the name as you see here to be the clickable title, if you select your title here and you click link then your actually telling us that this field item here is actually what we should use as the clickable option to open that actual sermon. So here we'll have that actual sermon opening up and all it's related fields. [00:37:16](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m16s)
In Joomla the title and alias concept is quite interesting. [00:33:41](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m41s) It's needed, especially if you want to do history control or integration with Joomla's infrastructure when it comes to their history and tagging systems. You need to add a title and an alias to all your views, especially if it is a view that is going to be used in the front. [00:33:59](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h33m59s) In this case, since we are going to use preachers in the front to display a list of preachers, we are going to add a title, using the name as the title. Back to the back end. There you can set if you want this 'sortable' or 'clickable;' you can click on this, and it sorts the table alphabetically on the basis of this column. (See video.) [00:34:30](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m30s) Do you want it to be searchable? Do you want someone to type into this box and show only a specific field? [00:34:51](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h34m51s) The filter option is a tricky one. You don't want to set name to filtering because then it will show a list of all the names that are already being shown in the table. You only want to use filter on things like a radio box, another view, or fields that aren't being displayed one after the other in the table. [00:35:19](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h35m19s) I added no extra fields in sermondistrubutor, but at sermons I added preacher. There's a list of all the preachers here, through which you could sift a chose which to show here or not. The way that you set up the filter is by clicking yes or no here. If you are setting up a custom field and in the display of the list have it clickable, this link is used. [00:36:12](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h36m12s) For example: I can click here and go to that preacher. I click close and then I'm back in the sermons list view. I could click on series and it will take me to the series; I can edit the series immediately. I click close and I'm back in the list view. We usually use the name to be the clickable title. If you select your title here and click link then you're saying that this field item here is what we should use as the clickable option to open that sermon. (See video.) [00:37:16](https://www.youtube.com/watch?v=CdSKS in Admin ViewCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h37m16s) That is the way for us to know which field should be used as the clickable field if you have a title. Since it is so easy to change, you can study this concept. Just click a button here to compile your component, install it, look at its behavior, change it a little, compile it, install it, look at its behavior. By doing that you would get a good understanding of what happens if you change these switches here.
So that is the way for us to know which field should be used as the clickable field if you have a title. Now this concept is something that you might need to play with and since it's so easy to change it you can just click a button here to compile your component, install it, look at its behavior, change it a little, compile it, install it. Look at its behavior by doing that you would get a good understanding of what happens if you change these switches here. Now we said that we wanted the preachers name and stuff on the settings and our tab for settings as the first tab.
**Field Alignment**
**Field Alignment in Admin View**
We said that we wanted the preacher's name, etc, on the settings. Our tab for settings is the first tab. (See video.) We are looking at the back end setup where you want to have this field's display. There are different placing options and an order in which it should go. (For example, see video.) [00:38:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m20s) Let me go to this one, 'Add Question'. (That is right of the tab, not in the tab.) You see an option which says: right in tab, left in tab, and left of tabs, right of tabs, etc. That means that you can put it outside of the tab area. Even if I was to click here it will remain displayed right there on the side. That is to put it right of tab. There's also a left of tab area over here. [00:39:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m31s) Above tab is this one here, above the tabs. It shows all the time. Then there's underneath tab. We added the option of placing data. At the right in tab, left in tab, right of tab, left of tab, above tab, and beneath tab which is six positions in the back end of your template. The places are being set by these alignment assignments here (select the field alignment inside the tab view) and you select these (from a list). This is the order in which you wanted them to display. [00:40:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m35s) Full width will always display under the left and right of in tab. You need to select your left and right and then your full width. Full width is the last thing to show up in a tab. Here is the switch to add permissions to specific values. If I want to control the group that can edit the name field, simply click this 'yes', and this field would be added into the permissional structure dynamically.
Now we going to look at the back end setup of where you want to have this fields display. There are these different placing options left in tab, right in tab, full width in tab, above tab, underneath tabs, left of tabs, right of tabs, and then [00:38:20](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h38m20s) there is the order in which it should go. That means if we look at this again this is left in tab(left side of the screen), this is right in tab(right side of the screen), I think I have another view that goes beyond some of those parameters.
**Fields Alignment Order**
Let me go to this one and we do 'Add Question'. So that is right of tab, not in tab, you see there is an option it says; right in tab, left in tab, and then it says left of tabs, and right of tabs. That means that you can put it outside of the tab area. So even if I was to click here it will remain displayed right there on the side and that is to put it right of tab. There's also a left of tab area over here. [00:39:31](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h39m31s) Then a above tab is this one here, that's above the tabs. So it also shows all the time and then there's underneath tab. We basically added the option of placing data. I will just show you. At the right in tab, left in tab and then right of tab and left of tab and above tab and beneath tab which is 1, 2, 3, 4, 5, 6, positions in the back end of your template. And the places are being set simply by these alignment assignments here (select the field alignment inside the tabview) and you select these(from a list) and then once you've selected them let's say you've selected this one above tab and you selected 1 then this is the order in which you wanted to display. First this one, [00:40:35](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h40m35s) then that one, left in tab. This is first, right in tab, this one is first, and then that one, and full width, it is a description. Now full width will always display under the left and right of in tab. So you need to select your left and right and then only your full width. Full width is always the last thing to show up in a tab, and then here is the switch to add permissions to a specific values. So if I want to control the group which can edit the name field, simply click this 'yes', and that would add this field into the permissional structure dynamically. That is how you control the permissions of fields.
**Fields Title - Alias**
**Fields Title**
That is how you add fields to a view and those are all the different switches. You can only have one title per view and only have one [00:41:39](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h41m39s) alias per view. You should not have more than one selected. In any case I think the system will ignore the others but just to be safe set the others to no. And then those that are actually the title to yes, and the one that's actually the alias, to yes. And so we will be able to be sure to use the correct field values. And then when you set any of these to show, you should set the order of their display here, and there is the filter. The filter then is added dynamically by simply clicking a yes here. If we go to sermons as an example, and we click on their fields they have many more fields which will help to illustrate some of these things. And you'd see that we have sermon series and we have it set up as a filter. Filter is the second last column. [00:42:43](https://www.youtube.com/watch?v=CdSKSCTzmRA&list=PLQRGFI8XZ_wtGvPQZWBfDzzlERLQgpMRE&t=00h42m43s) Sermons series, let's see we set that to yes, so that means we can sort this sermons by series that is how you set the filters for the back end. Remember this is primarily for the back end. Although some of that information will relate to the front eventually, especially this permissional switch will be able to access it from the front if you need to. But this is simply to add the fields to the actual view in the back end. If you have any questions about this please give me a heads up if you feel like I haven't done a good enough job explaining this, then let me know and I'll redo this video. So that's adding fields to the admin views.