1. Queenielass
  2. Support
  3. Friday, April 06 2018, 02:30 PM
Back to the Mentoring site....
When a mentee runs a search on the Mentor usergroup, limited to 10 possible users, we would like 10 users to be shown, even if 1-2 of them are unavailable at that time.
Would it be possible to distinguish these by having them 'greyed out' or having a banner to show they are only unavailable 'at the moment'? ie make this relevant field stand out in some way?

Thanks
admin Accepted Answer
Admin
Hi,
this is not possible natively, but maybe there is a workaround,

We need to understand what mean "unavailable" status (for example this is set by a field, this is set by a usergroup or it mean offline)?
  1. more than a month ago
  2. Support
  3. # 1
Queenielass Accepted Answer
Pro
This position is set by two possible conditions 1. Are you available to Mentor - yes/no checkbox - That would mean mentees could 'see' the mentor exists but that he is presently unavailable 2. Number of mentees - max of 5 - when Mentor is checked as Available, but has reached max number of mentees,,,,at present.

This would be a 'nice to have' option to keep the search populated with mentors, even if they are currently unavailable.

Would some instance of this type of option be possible?

Thanks
  1. more than a month ago
  2. Support
  3. # 2
admin Accepted Answer
Admin
Hi,
I have found a solution.
You can use HTML delimiter field type with some plugin like sourcerer (https://www.regularlabs.com/extensions/sourcerer) to add a style different for each user based on field value.

Try to follow these steps:
- Download and install Sourcerer plugin
- Create an HTML Delimiter field hidden into registration and edit profile pages like screenshot, with this code:
{source}
<?php
global $JSNLIST_DISPLAYED_ID;
if($JSNLIST_DISPLAYED_ID) $owner_id=$JSNLIST_DISPLAYED_ID;
else $owner_id=JRequest::getVar( 'id' , JFactory::getUser()->id );
$user = JsnHelper::getUser($owner_id);
$class = 'profile'.substr(md5($user->username),0,10);
if($user->available_for_mentoring || $user->no_of_mentees_at_present > 4) echo '<style>.'.$class.' .jsn-l-top{opacity:0.2}</style>';
?>
{/source}

- Add this field to show in User List

This field should show a CSS code that make user "grey out" when available_for_mentoring is equal to "No" (value is 1) or no_of_mentees_at_present is greater than 4

NOTE: this code is not tested and not supported, it is only for example purpose.
  1. more than a month ago
  2. Support
  3. # 3
Queenielass Accepted Answer
Pro
This looks like a good possibility!
I'll test it out and let you know.

Thanks!
  1. more than a month ago
  2. Support
  3. # 4
Queenielass Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. Support
  3. # 5
admin Accepted Answer
Admin
Hi,
I have removed condition that remove field "Availability css".

Of course this field need to be hidden so I have added in your custom.scss this code:
.availability_css{display:none;}
  1. more than a month ago
  2. Support
  3. # 6
Queenielass Accepted Answer
Pro
That has worked! Many thanks as ever!
  1. more than a month ago
  2. Support
  3. # 7
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.