blob: d6b642a475a5b6a28b93f2d1e8a4e7714adffc5a [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<?php
2class helpView {
3 public static function renderHelpButton($place, $topRight = false, $margin = false) {
4 $url = help::get($place);
5 if ($url === false) return;
6
7 echo ($topRight ? '<div class="help-btn--top-right'.($margin ? ' help-btn--top-right-margin': '').'">' : '').'<a href="'.security::htmlsafe($url).'" target="_blank" rel="noopener noreferrer" class="mdl-button mdl-button--colored mdl-button-js mdl-button--icon mdl-js-ripple-effect" id="help'.(int)$place.'"><i class="material-icons">help_outline</i><span class="mdl-ripple"></span></a>'.($topRight ? '</div>' : '');
8 echo '<div class="mdl-tooltip" for="help'.(int)$place.'">Ayuda</div>';
9 }
10}