Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: expand/collapse user permission module #6835

Closed
2 tasks
dolibarr95 opened this issue May 11, 2017 · 5 comments
Closed
2 tasks

Feature Request: expand/collapse user permission module #6835

dolibarr95 opened this issue May 11, 2017 · 5 comments
Labels
Feature request This is a feature request Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open

Comments

@dolibarr95
Copy link
Contributor

dolibarr95 commented May 11, 2017

Feature Request

Hi

I think it could be nice if in the page :

  • dolibarr/user/perms.php?id=45

All the lines of a module are hidden by default. And display if the user click on the module name.
Actually the page perms.php can be very long (depends of number of modules installed).

Suggested implementation

Add a toggle() jquery to the table.

Suggested steps

  • give a attribute name to each lines (that's contains rights information of a module ) of the table and set "display:none;" style to theses lines.
    The name could be something like this : ID_LINE where ID is the id of the module.
  • ad an onclik .toggle() event to each lines (that's contains name of the module) of the table.
    It could be something like this : $( "tr[name=250_LINE]" ).toggle()

Tks

@dolibarr95
Copy link
Contributor Author

dolibarr95 commented May 11, 2017

at line 327 of the perms.php file :

$style = '';
		if (isset($obj->module) && ($oldmod <> $obj->module))
		{
			$oldmod = $obj->module;
			$var = !$var;

			// Rupture detectee, on recupere objMod
			$objMod=$modules[$obj->module];
			$picto=($objMod->picto?$objMod->picto:'generic');
			
        	if ($caneditperms && (empty($objMod->rights_admin_allowed) || empty($object->admin)))
        	{
        		// On affiche ligne pour modifier droits
        		print '<tr '. $bc[$var].' onclick="$( \'tr[name='.$obj->module.'_LINE]\' ).toggle();" style="cursor:pointer">';
        		print '<td class="maxwidthonsmartphone tdoverflowonsmartphone">'.img_object('',$picto).' '.$objMod->getName();
        		print '<a name="'.$objMod->getName().'"></a></td>';
        		print '<td align="center" class="nowrap">';
        		print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("All")).'" alt="'.dol_escape_htmltag($langs->trans("All")).'" href="perms.php?id='.$object->id.'&amp;action=addrights&amp;entity='.$entity.'&amp;module='.$obj->module.'">'.$langs->trans("All")."</a>";
        		print '/';
        		print '<a class="reposition" title="'.dol_escape_htmltag($langs->trans("None")).'" alt="'.dol_escape_htmltag($langs->trans("None")).'" href="perms.php?id='.$object->id.'&amp;action=delrights&amp;entity='.$entity.'&amp;module='.$obj->module.'">'.$langs->trans("None")."</a>";
        		print '</td>';
        		print '<td colspan="2">&nbsp;</td>';
        		print '</tr>'."\n";
				$style = 'style="display:none;"';
        	}
        }

		print '<tr '. $bc[$var].' name="'.$obj->module.'_LINE" '.$style.'>';

@jfefe
Copy link
Contributor

jfefe commented Jun 6, 2017

See #3186

@dolibarr95
Copy link
Contributor Author

Hello :-)

I think it's not the same demand.
Here I just want to show / hide rows to only display the name of the module.
It's doesn't change the input boxes, form ...
Eg :
when hide

Module 1
Module 2
Module 2

Eg :
when show

Module 1
Module 2
can write
can read
can sing...
Module 3

Just because this page is very long to scroll.

Tks

@eldy eldy added hacktoberfest This is a good issue to try make your first PR if you don't know very well the project good-first-issue This is a good issue to make your first PR labels Apr 17, 2018
@eldy eldy added the Feature request This is a feature request label Jul 16, 2019
@eldy eldy removed hacktoberfest This is a good issue to try make your first PR if you don't know very well the project good-first-issue This is a good issue to make your first PR labels Oct 2, 2021
@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Oct 2, 2022
@atm-maxime
Copy link
Member

To keep

@github-actions github-actions bot removed the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Oct 6, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2023

This issue is stale because it has been open 1 year with no activity. If this is a bug, please comment to confirm it is still present on latest stable version. if this is a feature request, please comment to notify the request is still relevant and not yet covered by latest stable version. This issue may be closed automatically by stale bot in 10 days (you should still be able to re-open it if required).

@github-actions github-actions bot added the Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open label Oct 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature request This is a feature request Issue Stale (automatic label) This issue is stale because it has been open 1 year with no activity. Remove this label to keep open
Projects
None yet
Development

No branches or pull requests

4 participants