Details
-
Type: Improvement
-
Status: Done/Fixed
-
Priority: Critical
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.5
-
Fix Version/s: 4.5
-
Component/s: Core CiviCRM
-
Labels:None
Description
Summary
-------------
The current user interface for viewing and editing multi-record custom field sets is clumsy for many use cases. This project implements an alternate UI which displays existing records in a table format. Records are added, edited and viewed using a modal pop-up. Delete and Copy actions are provided for existing records.
Users will be able to control which fields are included in the table layout. A subset of more important fields can be included and memo-type fields (which don't display well in a table) can be excluded.
A new option for "Display Style" will be introduced - "Tab with Table" - allowing users to control which layout is used in the tab.
Implementation
----------------------
1. Schema and Upgrades
- New column in civicrm_custom_field:
- in_selector Boolean, tinyint(4), default 0
- For upgrades:
- insert new column (in_selector)
- check If DB has one or more custom_group rows WHERE is_multiple = 1. If TRUE:
+ set in_selector = 1 for all custom_field rows where (custom_group.is_multiple = 1 AND custom_group.style = 'Tab' AND custom_field.html_type != 'TextArea')
+ add postUpgrade status message (for 4.5.0): "This release allows you to view and edit multiple-record custom field sets in a table format which will be more usable in some cases. You can try out the format by navigating to Administer > Custom Data & Screens > Custom Fields. Click Settings for a custom field set and change Display Style to "Tab with Tables"."
NOTE: We will NOT automatically convert 'Tab' style to 'Tab with Table'. However, setting the in_selector property for the contained custom fields makes it easy for the site admin to make that change by just accessing the custom field set Settings form.
–
2. Add / Edit Custom Field Set (CRM_Custom_Form_Group)
2.1 New option for 'style' drop-down: "Tab with Table" (add to CRM_Core_SelectValues::customGroupStyle)
2.2 Improve client-side behaviors to set better defaults for multi-record sets
When '…allows multiple records' (is_multiple) is checked:
- uncheck Collapse on initial display (collapse_display)
- set "Tab with Table" as default for Display Style (style) drop-down (user can change that to Tab or Inline if desired)
–
3. Add / Edit Custom Fields (CRM_Custom_Form_Field)
New field - included in custom field form when custom_group.is_multiple is TRUE AND custom_group.style = "Tab with Table. Place this field after the "Data and Input Type" field:
- Label: Display in Table?
- Type: Checkbox
- Default: Checked
–
4. View / Edit Custom Fields (contact tab / table layout)
Table layout UI mockup and properties are covered on this wiki page:
http://wiki.civicrm.org/confluence/display/CRM/Multiple-record+Custom+Fields+UI+Improvements
NOTE: Pratik - Please investigate whether the code for rendering the table layout and modal pop-ups can share the existing multi-record custom fields profile code. Tim's suggestion is to "write a factory-function which reads the fields in a custom-data group and outputs them as a list of UFFields; then the profile-form engine uses that manufactured list of UFFields (instead of loading the UFFields from civicrm_uf_field)." Grab Tim (totten) on IRC if it would be helpful to discuss this in more detail once you get started.
Attachments
Issue Links
- is supplemented by
-
CRM-14327 Migrate Custom Data Tabs to use LivePage AJAX
- Done/Fixed