Skip to content

LouisMoreaux/apex-multiple-avatars

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

apex-multiple-avatar

Oracle APEX - Multiple Avatar Template Component Plug-in

A template component useful to display a list of user's avatar.

Screenshot showing the Multiple Avatars template component plug-in used as a single region to displays avatars with initials, icons or images and with and without limits

Screenshot showing the Multiple Avatars template component plug-in used as in interactive reports with initials, icons or images and with and without limits

Installation

Import the file located at plug-in/template_component_plugin_apex_lmoreaux_multiple_avatars.sql

configuration

Attribute Description
JSON Data

Column containing a JSON array of object

[
   {
      "title": "John Doe",
      "initals": "JD",
      "picture": "https://example.com/john_doe.jpg",
      "page": 1,
      "items": "P1_ITEM1,P1_ITEM2",
      "values": "VALUE1,VALUE2",
      "cssClass": "u-color-1"
   },
   ...
]

Here is a SQL query:

select json_arrayagg(
          json_object(
             'title' value mt.full_name,
             'initials' value apex_string.get_initials(mt.full_name),
             'picture' value mt.picture_url,
             'page' value 1,
             'items' value 'P1_ITEM1,P1_ITEM2',
             'values' value mt.value1||','||mt.value2,
             'cssClass' value 'u-color-'
                              || ora_hash(mt.full_name, 45)
          )
       ) as json_data
  from my_table mt
 where rownum < 10
Type Choose if you want to display it as an image, an icon or with the initials. In case the url is wrong, the plug-in will try to use the initial as a fallback and if not provided in the JSON, it will use the default icon.
Size Choose between the 3 available size: Small, Medium or Large
Default Color Class See: Universal Theme colors
Default Icon Default icon (used if not defined in the JSON data).
Limit Specify the maximum of avatars to display. In case there is more, then the plug-in will display the number of additional avatars.
More Color Class Default color class when more avatar is displayed see: Universal Theme colors
More Link Link for the more avatar.
More Link Attributes More avatar link attributes.

Demo

A live demo can be found at https://apex.oracle.com/pls/apex/r/louis/template-component/multipe-avatars

About

Oracle APEX - Multiple Avatar Template Component Plug-in

Resources

License

Stars

Watchers

Forks

Packages

No packages published