grouper-users - [grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull)
Subject: Grouper Users - Open Discussion List
List archive
[grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull)
Chronological Thread
- From: "Hyzer, Chris" <>
- To: " Mailing List" <>
- Subject: [grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull)
- Date: Fri, 24 Mar 2017 17:33:23 +0000
- Accept-language: en-US
- Authentication-results: internet2.edu; dkim=none (message not signed) header.d=none;internet2.edu; dmarc=none action=none header.from=isc.upenn.edu;
- Ironport-phdr: 9a23:DSgPlRRaPy0gsVCsNX8AD9SvZNpsv+yvbD5Q0YIujvd0So/mwa6zYRSN2/xhgRfzUJnB7Loc0qyN4v2mBjFLsMbJmUtBWaQEbwUCh8QSkl5oK+++Imq/EsTXaTcnFt9JTl5v8iLzG0FUHMHjew+a+SXqvnYdFRrlKAV6OPn+FJLMgMSrzeCy/IDYbxlViDanb75/KBW7oR/Tu8QWjodvLqU8wQbVr3VVfOhb2XlmLk+JkRbm4cew8p9j8yBOtP8k6sVNT6b0cbkmQLJBFDgpPHw768PttRnYUAuA/WAcXXkMkhpJGAfK8hf3VYrsvyTgt+p93C6aPdDqTb0xRD+v4btnRAPuhSwaMTMy7WPZhdFqjK9DoByvuQFxw5Labo+WOvpxfKLdcs8VS2VORctRSzdODp+gY4cTE+YMP+BVpJT9qVsUqhu+ABGhCO3txD5Ih375w7c63/w8GgzY3AwgBdMOsG/aoN7oM6oSVPy6zKnIzDTCcfxWwyzw6InTch89u/2MQKpwftTXyUkpDQ/KkEifqZH8Mj6Ty+8DvW+b7+96WuKujW4qswBxoj6zxsgykInJgJwaykza+Slj3ok6OMC4RFZ0Yd6lDJtQtzyaOJBsTsw+RGFovT42yrwdtpGgZiQF1JMnyhjCYPKEa4iF+gzvWPqTLDtii39oeaiziwuz/EWu0OHwSNW43E5XoidLjtXArHQA2wHJ5sSZV/dw+l2t1SuN2g3S7OxPPFo6mrDBK5E7x749jpoTvlrHHi/xgEj4lLObeEI49uWm8ujpbLLoq5GFO49zkQ7xLL4imsuiAeQkKQcOWHWb+eKh27H55U35WrJKjuEonabFrJDaJMMbpqijDw9Sz4Yj9xK/DzCh0NQbh3UIMFVFeBefg4joPVHBPuz4AO+hj1iwkjpn3f/LM7z7DpnQL3XOnq3tcahh50JEzQo819Ff55ZaCrEbJ/LzX1f8tNnEAR85Mw21wvjoCM9m24MfQmKAHrWVML7KsVCW4OIvJfOAa5EItzbgM/Ql/eLhjWclmV8BeqmkxZQXaGq/HvR7O0WWf2Dsjs4cEWcRoAU+VvfqhUaGUT5SfHayQ7k86i8hBIKnC4fDWp6igKaH3CilAp1aeHpKBU6RHnf1JM24XKJGZziVP9dsiHkZTrW7UKcg0w2jrgn31+AhI+bJsggRtJbi0tc9w+zIiVt6oTNuCNmF3nvIUnp5hHggRjkq0bp5rFAnjFqPzP4rreZfEIkZx+JbXx1+fbXc1e1hQZimXwnBb8WEUn6nWd7gHCk8SNR3ztMTNRUuU+6+hwzOinL5S4QekKaGUcQ5
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
Chad, this looks like a great enhancement! Thanks! Can you make a pull
request for 2.3 and for master (or just master or whatever you want?
Thanks
Chris
-----Original Message-----
From: Chad Redman (JIRA)
[mailto:]
Sent: Friday, March 24, 2017 12:06 PM
To: Hyzer, Chris
<>
Subject: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready
for pull)
Chad Redman created GRP-1506:
--------------------------------
Summary: New feature - Configurable subject icons (ready for
pull)
Key: GRP-1506
URL: https://bugs.internet2.edu/jira/browse/GRP-1506
Project: Grouper
Issue Type: New Feature
Components: UI
Affects Versions: 2.3.0, 2.4.0
Reporter: Chad Redman
Assignee: Chris Hyzer
Priority: Trivial
Our institutional Grouper config uses four distinct sources. To make it
easier to identify them, we have customized a few UI classes and added new
properties, so that different icons are used for different subjects. An
example showing usage (set in grouper-ui.properties) is:
grouperUi.screenSubjectIcon2.screenHtmlEl.default = ${'<i class="fa
fa-user"></i> '}
- this is added to grouper-ui.base.properties as the default or fallback
which can be overrided per subject id. If for some reason a patcher fails to
upgrade grouper-ui.base.properties, the same value is hardcoded in
GrouperUiUtils so that the existing person icon is still displayed as before.
grouperUi.screenSubjectIcon2.sourceId.0 = student
grouperUi.screenSubjectIcon2.screenHtmlEl.0 = ${'<i class="fa
fa-graduation-cap"></i> '}
grouperUi.screenSubjectIcon2.sourceId.1 = nonstudent
grouperUi.screenSubjectIcon2.screenHtmlEl.1 = ${'<i class="fa fa-coffee"></i>
'}
- like the other indexed properties, these start at zero and iterate
through sequential grouperUi.screenSubjectIcon2.sourceId.N indexes. If any
defined sourceId value matches the source ID for a subject, the corresponding
grouperUi.screenSubjectIcon2.screenHtmlEl.N value is used for the icon HTML
instead of the default.
Any valid EL can work here. For example, you can set a different icon based
on attributes. E.g.,:
grouperUi.screenSubjectIcon2.screenHtmlEl.1 =
${subject.attributes['businessCategory']==null ? '<i class="fa
fa-question-circle"></i> ' :
subject.attributes['businessCategory'].iterator().next() == 'Account Payable'
? '<i style="color: red" class="fa fa-coffee"></i> ' : '<i class="fa
fa-coffee"></i> '}
There is also a change in grouperText/grouper.text.*.base.properties, just to
replace the hardcoded HTML with the dynamic value. If you have customized
guiSubjectShortLink from the base default, you may want to change your
version to use the dynamic icon.
This works everywhere in the New UI (at least where I checked) - see links
for example screenshots:
* Search results
([example|https://image.ibb.co/eKnBRF/grouper_custom_icons_01_search_results.png])
* Subject detail page ([example
1|https://image.ibb.co/mzFy6F/grouper_custom_icons_02_student_source.png],
[example
2|https://image.ibb.co/cG65mF/grouper_custom_icons_03_nonstudent_source.png]
* Add members combo box ([example
1|https://image.ibb.co/gm3J6F/grouper_custom_icons_04_add_members.png],
[example
2|https://image.ibb.co/hyprRF/grouper_custom_icons_07_add_members_attribute.png])
* Group member listing
([example|https://image.ibb.co/cBnd6F/grouper_custom_icons_05_group_members.png])
* Subject API diagnostics page
([example|https://image.ibb.co/jk42Yv/grouper_custom_icons_06_subject_api_diag.png])
This only affects the New UI, not the Admin UI or Lite UI.
As it's a major feature add, I didn't know if this would be better as a
straight pull request, or as an optional package. The changeset are currently
in my [Github
fork|https://github.com/cer28/grouper/tree/cer28-custom-subject-icons].
--
This message was sent by Atlassian JIRA
(v7.2.6#72008)
- [grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull), Hyzer, Chris, 03/24/2017
- <Possible follow-up(s)>
- [grouper-users] RE: [JIRA] (GRP-1506) New feature - Configurable subject icons (ready for pull), Hyzer, Chris, 03/24/2017
Archive powered by MHonArc 2.6.19.