Commit c7c48f31 authored by Robert Lyon's avatar Robert Lyon
Browse files

Adding the id to alt/title text for blocks (Bug #1428456)



So we can tell them apart with behat

Change-Id: I6af2a13c141b5d67674a1f0c3fbde32f3ed4f7a4
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent ca2b15bb
......@@ -853,8 +853,8 @@ class BlockInstance {
$configtitle = $title == '' ? call_static_method($blocktypeclass, 'get_title') : $title;
$smarty = smarty_core();
$smarty->assign('id', $this->get('id'));
$id = $this->get('id');
$smarty->assign('id', $id);
$smarty->assign('viewid', $this->get('view'));
$smarty->assign('title', $title);
$smarty->assign('row', $this->get('row'));
......@@ -869,8 +869,8 @@ 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('strconfigtitletext', $title == '' ? get_string('configurethisblock', 'view') : get_string('configureblock', 'view', "'$title'"));
$smarty->assign('strremovetitletext', $title == '' ? get_string('removethisblock', 'view') : get_string('removeblock', 'view', "'$title'"));
$smarty->assign('strconfigtitletext', $title == '' ? get_string('configurethisblock1', 'view', $id) : get_string('configureblock1', 'view', "'$title'", $id));
$smarty->assign('strremovetitletext', $title == '' ? get_string('removethisblock1', 'view', $id) : get_string('removeblock1', 'view', "'$title'", $id));
if (!$configure && $title) {
$configdata = $this->get('configdata');
......
......@@ -273,11 +273,11 @@ $string['movethisblockright'] = "Move this block right";
$string['moveblock'] = 'Move %s block';
$string['movethisblock'] = 'Move this block';
$string['Configure'] = 'Configure';
$string['configureblock'] = 'Configure %s block';
$string['configurethisblock'] = 'Configure this block';
$string['configureblock1'] = 'Configure %s block (ID %s)';
$string['configurethisblock1'] = 'Configure this block (ID %s)';
$string['closeconfiguration'] = 'Close configuration';
$string['removeblock'] = 'Remove %s block';
$string['removethisblock'] = 'Remove this block';
$string['removeblock1'] = 'Remove %s block (ID %s)';
$string['removethisblock1'] = 'Remove this block (ID %s)';
$string['blocktitle'] = 'Block title';
$string['changemyviewlayout'] = 'Change my page layout';
......
......@@ -4,8 +4,8 @@
{if $retractable && !$configure}
<img src="{theme_image_url filename=retractable}" alt="{str tag='retractable' section='view'}" title="{str tag='retractable' section='view'}" class="retractablebtn">
{/if}
{if $configurable && !$configure} <input type="image" src="{theme_image_url filename=btn_configure}" class="configurebutton" name="action_configureblockinstance_id_{$id}" alt="{$strconfigtitletext}">{/if}
{if $configure}<input type="image" src="{theme_image_url filename=btn_close}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{str tag=Close}">{else}<input type="image" src="{theme_image_url filename=btn_deleteremove}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{$strremovetitletext}">{/if}
{if $configurable && !$configure} <input type="image" src="{theme_image_url filename=btn_configure}" class="configurebutton" name="action_configureblockinstance_id_{$id}" alt="{$strconfigtitletext}" title="{$strconfigtitletext}">{/if}
{if $configure}<input type="image" src="{theme_image_url filename=btn_close}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{str tag=Close}">{else}<input type="image" src="{theme_image_url filename=btn_deleteremove}" class="deletebutton" name="action_removeblockinstance_id_{$id}" alt="{$strremovetitletext}" title="{$strremovetitletext}">{/if}
</div>
<div class="blockinstance-header">
<h2 class="title">{if $configure}{$configtitle}: {str tag=Configure section=view}{else}{$title|default:"[$strnotitle]"}{/if}</h2>
......
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