Feature #5282
closedHide custom fields elements
0%
Description
Hi All,
We have installed redmine for a customer of us. We now have to tweak it a little bit. What we want.
We have 4 user roles/groups e.g. Odontos, Ortholab, Ortholab zuid and Orthotec. They alle have their own customers for which they can make an issue.
I want that if a user from usergroup Ortholab is logged in, that they only see their own customers.
The problem is that i'm completely not Ruby on rails minded, so i dont't know how i can print the role_id. i've tried the following, but i'm always getting a Internal server error.
<%= Member.role_id >
<= Member->role_id >
<= Member=>role_id >
<= Member::role_id >
<= Member(:role_id) %>
I want to make it like this.
<script type="text/javascript">
jQuery.noConflict();
var labo = <%= Member.role_id %>;
var prefix;
if(labo == '4') {
prefix = '01-';
}
else if(labo == 5) {
prefix = '02-';
}
else if(labo == 6) {
prefix = '03-';
}
else if(labo == 7) {
prefix = '04-';
}
jQuery(document).ready(function(){
jQuery('#issue_custom_field_values_1').find('option').each(function(i){
if(jQuery(this).attr('value').substr(0,3) != prefix && jQuery(this).attr('value') != '') {
jQuery(this).remove();
}
});
});
</script>
Does someone of you know a solution?
Updated by Jean-Philippe Lang about 15 years ago
- Status changed from New to Closed
- Resolution set to Invalid
Please, no support request here.
Here we track Redmine issue, have a try in the forums.