Commit 307d0612 authored by Doris Tam's avatar Doris Tam Committed by Robert Lyon

Bug 1823789: Add tool tip hover text in page 'Edit' mode

Added tooltips for 'Configure' and 'Delete' icons
Added tooltip for 'Move block' draggable header

behatnotneeded

Change-Id: I05a74e89634132b9c51ba481da1b6724ef643040
parent 03b8a0a6
......@@ -1109,8 +1109,11 @@ class BlockInstance {
$smarty->assign('javascript', defined('JSON'));
$smarty->assign('strnotitle', get_string('notitle', 'view'));
$smarty->assign('strmovetitletext', $title == '' ? get_string('movethisblock', 'view') : get_string('moveblock', 'view', "'$title'"));
$smarty->assign('strmovetitletexttooltip', get_string('moveblock2', 'view'));
$smarty->assign('strconfigtitletext', $title == '' ? get_string('configurethisblock1', 'view', $id) : get_string('configureblock1', 'view', "'$title'", $id));
$smarty->assign('strconfigtitletexttooltip', get_string('configureblock2', 'view'));
$smarty->assign('strremovetitletext', $title == '' ? get_string('removethisblock1', 'view', $id) : get_string('removeblock1', 'view', "'$title'", $id));
$smarty->assign('strremovetitletexttooltip', get_string('removeblock2', 'view'));
$smarty->assign('lockblocks', ($this->get_view()->get('lockblocks') && $this->get_view()->get('owner'))); // Only lock blocks for user's portfolio pages
if (!$configure && $title) {
......
......@@ -323,12 +323,15 @@ $string['moveblockup'] = "Move %s block up";
$string['movethisblockup'] = "Move this block up";
$string['moveblockright'] = "Move %s block right";
$string['movethisblockright'] = "Move this block right";
$string['moveblock2'] = 'Move block';
$string['moveblock'] = 'Move %s block';
$string['movethisblock'] = 'Move this block';
$string['Configure'] = 'Configure';
$string['configureblock2'] = 'Configure block';
$string['configureblock1'] = 'Configure %s block (ID %s)';
$string['configurethisblock1'] = 'Configure this block (ID %s)';
$string['closeconfiguration'] = 'Close configuration';
$string['removeblock2'] = 'Remove block';
$string['removeblock1'] = 'Remove %s block (ID %s)';
$string['removethisblock1'] = 'Remove this block (ID %s)';
$string['blocktitle'] = 'Block title';
......
<div class="bt-{$blocktype}-editor js-blockinstance blockinstance card card-secondary clearfix {if $configure} configure{elseif $retractable} retractable{/if}" data-id="{$id}" id="blockinstance_{$id}{if $configure}_configure{/if}">
<h3 class="card-header js-heading drag-handle {if !$title}card-header-placeholder{/if}">
<h3 class="card-header js-heading drag-handle {if !$title}card-header-placeholder{/if}" title="{$strmovetitletexttooltip}">
<span class="icon icon-arrows move-indicator" role="presentation" aria-hidden="true"></span>
<span class="blockinstance-header">
{if $configure}{$configtitle}: {str tag=Configure section=view}{else}{$title|default:"[$strnotitle]"}{/if}
......@@ -20,12 +20,12 @@
<span class="float-right btn-group btn-group-top">
{if $configurable && !$configure}
<button class="configurebutton btn btn-inverse btn-sm" name="action_configureblockinstance_id_{$id}" alt="{$strconfigtitletext}" data-id="{$id}">
<span class="icon icon-cog icon-lg" role="presentation" aria-hidden="true"></span>
<span class="icon icon-cog icon-lg" role="presentation" aria-hidden="true" title="{$strconfigtitletexttooltip}"></span>
</button>
{/if}
{if !$lockblocks}
<button class="deletebutton btn btn-inverse btn-sm" name="action_removeblockinstance_id_{$id}" alt="{$strremovetitletext}" data-id="{$id}">
<span class="icon icon-trash text-danger icon-lg" role="presentation" aria-hidden="true"></span>
<span class="icon icon-trash text-danger icon-lg" role="presentation" aria-hidden="true" title="{$strremovetitletexttooltip}"></span>
</button>
{/if}
</span>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment