Bläddra i källkod

Add a tooltip to explain why a link is not visible

Laurent Destailleur 1 år sedan
förälder
incheckning
1c99bb0344
2 ändrade filer med 5 tillägg och 1 borttagningar
  1. 4 1
      htdocs/blockedlog/admin/blockedlog_list.php
  2. 1 0
      htdocs/langs/en_US/blockedlog.lang

+ 4 - 1
htdocs/blockedlog/admin/blockedlog_list.php

@@ -540,6 +540,7 @@ if (is_array($blocks)) {
 	$nbshown = 0;
 	$MAXFORSHOWLINK = 100;
 	$object_link = '';
+	$object_link_title = '';
 
 	foreach ($blocks as &$block) {
 		//if (empty($search_showonlyerrors) || ! $checkresult[$block->id] || ($loweridinerror && $block->id >= $loweridinerror))
@@ -548,8 +549,10 @@ if (is_array($blocks)) {
 
 			if ($nbshown < $MAXFORSHOWLINK) {	// For performance and memory purpose, we get/show the link of objects only for the 100 first output
 				$object_link = $block->getObjectLink();
+				$object_link_title = '';
 			} else {
 				$object_link = $block->element.'/'.$block->fk_object;
+				$object_link_title = $langs->trans('LinkHasBeenDisabledForPerformancePurpose');
 			}
 
 			print '<tr class="oddeven">';
@@ -581,7 +584,7 @@ if (is_array($blocks)) {
 			print '</td>';
 
 			// Link to source object
-			print '<td class="tdoverflowmax150"'.(preg_match('/<a/', $object_link) ? '' : 'title="'.dol_escape_htmltag(dol_string_nohtmltag($object_link)).'"').'>';
+			print '<td class="tdoverflowmax150"'.(preg_match('/<a/', $object_link) ? '' : 'title="'.dol_escape_htmltag(dol_string_nohtmltag($object_link.' - '.$object_link_title)).'"').'>';
 			print '<!-- object_link -->';	// $object_link can be a '<a href' link or a text
 			print $object_link;
 			print '</td>';

+ 1 - 0
htdocs/langs/en_US/blockedlog.lang

@@ -33,6 +33,7 @@ RestrictYearToExport=Restrict month / year to export
 BlockedLogEnabled=System to track events into unalterable logs has been enabled
 BlockedLogDisabled=System to track events into unalterable logs has been disabled after some recording were done. We saved a special Fingerprint to track the chain as broken
 BlockedLogDisabledBis=System to track events into unalterable logs has been disabled. This is possible because no record were done yet.
+LinkHasBeenDisabledForPerformancePurpose=For performance purpose, direct link to the document is not shown after the 100th line. 
 
 ## logTypes
 logBILL_DELETE=Customer invoice logically deleted