-
-
Notifications
You must be signed in to change notification settings - Fork 178
018 Custom Admin Views
00:00:00 (Click on these time links to see Youtube video)
Similar to Site Views, Custom Admin Views has some nice features, although some aspects when adding it to Component Builder is different. In the next video, we will look at adding Site Views as well as Component Custom Admin Views to the component. As Sermon Distributor is not using Custom Admin Views yet, it has not been discussed, but there is another component that can serve as an example: Cost-Benefit Projection. 00:00:33 It's a tool used to show companies the cost benefits of the intervention of certain diseases and causes in the company. 00:01:04 In it is 'Company results' and 'Combined results'. It respectively displays custom data in the back end of the component to certain people who have permission to view the data. In the component itself click on 'Companies'; an icon underneath each of these companies' names can be seen. 00:01:36 There is a 'new' button called 'Combined Results'. These buttons are dynamically added by Component Builder, which will be explained in the next tutorial.
This is how a Custom Admin View will look. (See video.) All the displayed information serves only as an example. 00:02:07 If 'ClientM' is opened, this large area is displayed where a lot of HTML and PHP can be placed. There are some custom buttons that may be added. All of this in the white area is done in the Custom View. There is a menu on the left side. All of this is done inside the Custom area of the component which is now the custom admin view. (See video.) 00:02:44 It has different value sets. From here an edit button can be added. Since it has been linked it to a specific client or company or one item in that list, you can click on 'edit'. 00:03:10 From here the companies data can be accessed and edited. The convenience is that if 'close' has been clicked it opens the exact result page again. All the implementation that has been done is displayed there. 00:03:35
Returning to the Companies list and the Dashboard. Take a look at Component Builder and open 'Company Results'. On this page, the PHP and HTML and a lot of templates are directly loaded. 00:04:05
I have a custom button area where I can add custom buttons. Click on custom buttons (add). There are 'icons' to select, the 'name' of the button and 'controller method' which you'd like to use to make the button work. 00:04:25 Here I say 'gotocompanies'; this one is 'editcompany'. (See video.) Here decide what kind of target you are looking at. Is this a single, a list, or both? 00:04:52 Set those respectively, then click save. It only saves it to the form, not to the database.
In the PHP controller method, add scripting to respectively implement the buttons click method. 00:05:16 You can do that to the model as well. Add the script in the controller and in the model, if you want to separate your code a bit, add scripting called from the controller. If you're not adding any script to the model, add none with two spaces (//) in front so that it won't warn that you did not add script there. As you can see the 'gotocompanies' take you back to the companies view. 00:05:47 The 'editcompany', on the other hand, implements Joomla's convention of opening an item to edit it by the correct channels. This is Joomla knowledge at work here; we are checking a token, etc. 00:06:13 This snippet may be reused. (See video.)
We have an area for custom scripting. A lot of custom scripting goes on in that view. It has its respective places. If you want to know where, if you're not certain by the naming conventions we have used, if you want to know what's happening at some snippet, compile your components, search for the snippet, and you'll see where it comes up. That is how you set up a Custom Admin view.
The combined results are this one here. (See video.) If you click it, it will say that you need to select some items. Select the items and click combined result again, and it will do a combined resolve, taking both companies, adding it's data together, and giving you a nice layout structure of its data sets. 00:07:16
If we go back to the implementation of the combined concept it looks similar to the other. Again there are a lot of HTML and PHP; the custom buttons go back to companies. 00:07:41 It's the same implementation and some custom scripting. I set up both of these custom views by adding the data, making use of the templates as well as layout implementation in both of these. You can set up layouts and templates and use them in site views. You can also use them in admin views. 00:08:11
- Home
- Beta Testing
- Custom Code
- PHP Settings
- Demo Component
-
Tutorials
- Hello World JCB
- Intro JCB Guide
- JCB Installation Steps
- Planning Components
- Field Type Overview
- Basic Fields Creation
- Admin View Management
- Advanced Field Usage
- Admin Component Integration
- Component Setting Customization
- Scripting Components
- Component FTP Options
- Dynamic Get Method
- Site View DynamicGet
- Site View Templates
- Template Setup Guide
- Layout Configuration Steps
- Custom Admin Management
- Adding Site Views
- Custom Admin Integration
- MySQL Demo Tweaking
- Global JCB Settings
- Custom Time Field
- User Helper Integration
- Email Helper Usage
- Message Store Email
- List View Unescape
- Export Import Customization
- Overwrite Custom Fields
- List Field Filtering
- Automatic Code Import
- Manual Code Implementation
- Component Export Import
- Custom Admin Buttons
- Translation Management
- Site View Permissions
- Component SQL Updates
- Site Edit Configuration
- JCB Backup System
- Helper Structure Integration
- JCB v2.5 Upgrade
- Tab Setup Guide
- JCB v2.6 Release
- Extended HelloWorld
- Field Rule Validation
- Community Snippets Intro
- Snippet Forking Tutorial
- Pull Request Snippets
- Library Manager Area
- Excel-based Translation
- Dynamic Router Details
- Database Auto Updates
- Subform Quick Demo
- VDM Package Import
- Dynamic File Inclusion
- File Field Upload
- Drag-n-Drop Upload
- Quick HelloWorld JCB
- Non-database Fields
- Dashboard Customization
- Menu Prefix Toggle
- Community JCB Packages
- Collaborative JCB Workflow
- JCB Package Install
- JCB JAB18 Event
- Convenient New Fields
- Component Language Strings
- Library Functionality Anticipation
- Join Field Relations
- License Template Change
- Code Reusability
- Local Dev Environment
- Extended Field Types
- Joomla Custom Fields
- Custom Field Expansion
- Site View Listing
- Run Expansion Method
- Form Site View
- Field URL Update
- Additional Helper Methods
- Field Validation Rules
- New Placeholder Feature
- Component Config Params
- Per-field Default Values