has_right and displayme

505 views
Skip to first unread message

issin...@gmail.com

unread,
Mar 9, 2017, 8:12:33 AM3/9/17
to Fujitsu RunMyProcess Developer Community
Hi,

I have a little issue when combinate has_right and displayme to limit icons display.

An extract of my code:
<div class="container">
<div class="row row-centered">
<div id="newRequest" class="col-md-2 col-sm-4 col-xs-6 col-centered displayme_${has_right('392101')}">
<div class="well"><div class="homeThumbnail"><span class="homeTitle">Reporter un incident</span></div><br>
<i class="homeImage"><a href="https://live.runmyprocess.com/live/xxxxxx/appli/326650?P_mode=${P_mode}"><img class="homeIcon img-thumbnail" src="https://live.runmyprocess.com/live/xxxxxx/upload/yyyyyy/open_ticket_200.png" title="Reporter un incident" /></a></i>
</div>
</div>
<div id="imacRequest" class="col-md-2 col-sm-4 col-xs-6 col-centered displayme_${has_right('392101')=='false' && has_right('384675')=='true'}">
<div class="well"><div class="homeThumbnail"><span class="homeTitle">Demande IMAC</span></div><br>
<i class="homeImage"><a href="https://live.runmyprocess.com/live/xxxxxx/appli/326805?P_mode=${P_mode}"><img class="homeIcon img-thumbnail" src="https://live.runmyprocess.com/live/xxxxxx/upload/zzzzzz/imac_200.png" title="Demande IMAC" /></a></i>
</div>
</div>
</div>
</div>

Typically, first call to displayme class is working:
class="displayme_${has_right('392101')}"

But the following doesn't work:
class="displayme_${has_right('392101')=='false' && has_right('384675')=='true'}"

My request: what syntax to combinate user "in one lane", but "not in another one"...

Your advice is welcome.

thanks
Thierry

Abhilash Sambhare

unread,
Mar 10, 2017, 8:19:50 AM3/10/17
to Fujitsu RunMyProcess Developer Community
Hi Thierry,

Good Day.

Please find below syntax for your query:

displayme_${has_right('role_id')&&has_right('role_id')}

 This will return true ot false according  to the query.

Thanks & Regards,
Abhilash 
Fujitsu Runmyprocess Support


--
Fujitsu - RunMyProcess
---
You received this message because you are subscribed to the Google Groups "Fujitsu RunMyProcess Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to supportforum+unsubscribe@runmyprocess.com.
To post to this group, send email to suppor...@runmyprocess.com.
Visit this group at https://groups.google.com/a/runmyprocess.com/group/supportforum/.
To view this discussion on the web visit https://groups.google.com/a/runmyprocess.com/d/msgid/supportforum/64ca62c3-6f27-453d-a68d-caec74f5c746%40runmyprocess.com.
For more options, visit https://groups.google.com/a/runmyprocess.com/d/optout.

Abhilash Sambhare

unread,
Mar 15, 2017, 5:31:35 AM3/15/17
to Fujitsu RunMyProcess Developer Community
Hi Thierry,

Good Day.

Can you please confirm that your issue is resolved.

Thanks & Regards,
Abhilash 
Fujitsu Runmyprocess Support

issin...@gmail.com

unread,
Mar 15, 2017, 8:32:12 AM3/15/17
to Fujitsu RunMyProcess Developer Community
Hi,

sorry for the delay.

After numerous tests, your answer is quite "incomplete"...

Indeed, I notice that:
=> the class "displayme_${condition}" is converted to displayme_true or displayme_false
BUT, that means also you need matching classes implemented in one of stylesheets in your project.
In mine that's not the case, and I correct that situation with following classes in main.css involved for all my WI pages
.displayme_true {
display: inline-block;
}
.displayme_false {
display: none;
}

Furthermore, displayme_true interacts with another prior class (col-centered) in the same div.
In my special case, I move col-centered class (with display: inline-block;) to the child-element and displayme_true is lightly changed with more accurate display property (display: block;}

Finally, following uses of displayme_$... work in my code:
- displayme_${has_right('380783')}
- displayme_${has_right('391720')=='true' || has_right('380783')=='true'}
- displayme_${has_right('392101')=='false' && has_right('384675')=='false'

So, you can close the topic.

Thank you
Thierry

Reply all
Reply to author
Forward
0 new messages