Skip to Content.
Sympa Menu

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:; dkim=none (message not signed) header.d=none;; dmarc=none action=none;
  • 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?


-----Original Message-----
From: Chad Redman (JIRA)

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
Key: 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 is:

grouperUi.screenSubjectIcon2.screenHtmlEl.default = ${'<i class="fa
fa-user"></i> '}
- this is added to as the default or fallback
which can be overrided per subject id. If for some reason a patcher fails to
upgrade, 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.*, 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
* Subject detail page ([example
* Add members combo box ([example
* Group member listing
* Subject API diagnostics page

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

This message was sent by Atlassian JIRA

Archive powered by MHonArc 2.6.19.

Top of Page