Commit 4e0e7bee authored by Ben Bradshaw's avatar Ben Bradshaw
Browse files

[2994] Adding more descriptive ALT tags to block control images

parent d537594d
......@@ -449,12 +449,20 @@ class BlockInstance {
$content = '';
}
$blocktitle = $this->get('title');
if (trim($blocktitle) == "") {
$blocktitle = "this";
}
else {
$blocktitle = "'".$blocktitle."'";
}
if (!defined('JSON') && !$jsreply) {
if ($this->get('canmoveleft')) {
$movecontrols[] = array(
'column' => $this->get('column') - 1,
'order' => $this->get('order'),
'title' => get_string('moveblockleft', 'view'),
'title' => get_string('moveblockleft', 'view', $blocktitle),
'arrow' => '←',
'dir' => 'left',
);
......@@ -463,7 +471,7 @@ class BlockInstance {
$movecontrols[] = array(
'column' => $this->get('column'),
'order' => $this->get('order') + 1,
'title' => get_string('moveblockdown', 'view'),
'title' => get_string('moveblockdown', 'view', $blocktitle),
'arrow' => '↓',
'dir' => 'down',
);
......@@ -472,7 +480,7 @@ class BlockInstance {
$movecontrols[] = array(
'column' => $this->get('column'),
'order' => $this->get('order') - 1,
'title' => get_string('moveblockup', 'view'),
'title' => get_string('moveblockup', 'view', $blocktitle),
'arrow' => '↑',
'dir' => 'up',
);
......@@ -481,7 +489,7 @@ class BlockInstance {
$movecontrols[] = array(
'column' => $this->get('column') + 1,
'order' => $this->get('order'),
'title' => get_string('moveblockright', 'view'),
'title' => get_string('moveblockright', 'view', $blocktitle),
'arrow' => '→',
'dir' => 'right',
);
......@@ -503,6 +511,7 @@ class BlockInstance {
$smarty->assign('content', $content);
$smarty->assign('javascript', defined('JSON'));
$smarty->assign('strnotitle', get_string('notitle', 'view'));
$smarty->assign('blocktitle', array($blocktitle));
return array('html' => $smarty->fetch('view/blocktypecontainerediting.tpl'), 'javascript' => $js);
}
......
......@@ -202,14 +202,13 @@ $string['addnewblockhere'] = 'Add new block here';
$string['add'] = 'Add';
$string['addcolumn'] = 'Add Column';
$string['removecolumn'] = 'Remove this column';
$string['moveblockleft'] = 'Move this block left';
$string['moveblockdown'] = 'Move this block down';
$string['moveblockup'] = 'Move this block up';
$string['moveblockright'] = 'Move this block right';
$string['moveblockleft'] = "Move %s block left";
$string['moveblockdown'] = "Move %s block down";
$string['moveblockup'] = "Move %s block up";
$string['moveblockright'] = "Move %s block right";
$string['Configure'] = 'Configure';
$string['configureblock'] = 'Configure block';
$string['configurethisblock'] = 'Configure this block';
$string['removeblock'] = 'Remove this block';
$string['configureblock'] = 'Configure %s block';
$string['removeblock'] = 'Remove %s block';
$string['blocktitle'] = 'Block Title';
$string['changemyviewlayout'] = 'Change My View Layout';
......
......@@ -7,8 +7,8 @@
{assign var=direction value=$item.dir}
<input type="image" src="{theme_url filename=images/move-block-$direction.png}" class="submit movebutton" name="action_moveblockinstance_id_{$id}_column_{$item.column}_order_{$item.order}" alt="{$item.arrow}" title="{$item.title}">
{/foreach}
{if $configurable && !$configure} <input type="image" src="{theme_url filename=images/configure-block.png}" class="submit configurebutton" name="action_configureblockinstance_id_{$id}" alt="&bull;" title="{str tag='configurethisblock' section='view'}">{/if}
<input type="image" src="{theme_url filename=images/remove-block.png}" class="cancel deletebutton" name="action_removeblockinstance_id_{$id}" alt="X" title="{str tag='removeblock' section='view'}">
{if $configurable && !$configure} <input type="image" src="{theme_url filename=images/configure-block.png}" class="submit configurebutton" name="action_configureblockinstance_id_{$id}" alt="&bull;" title="{str tag='configureblock' section='view' args=$blocktitle}">{/if}
<input type="image" src="{theme_url filename=images/remove-block.png}" class="cancel deletebutton" name="action_removeblockinstance_id_{$id}" alt="X" title="{str tag='removeblock' section='view' args=$blocktitle}">
</div>
<div class="blockinstance-content">
{$content}
......
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