Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-35873 Blocks: Made alt-text on block control icons more descriptive

  • Loading branch information...
commit c5a078b25e090352afd09c5d55ddeb296ed1e708 1 parent d8613ef
@rajeshtaneja rajeshtaneja authored samhemelryk committed
Showing with 18 additions and 6 deletions.
  1. +6 −0 lang/en/block.php
  2. +12 −6 lib/blocklib.php
View
6 lang/en/block.php
@@ -26,9 +26,11 @@
$string['addtodock'] = 'Move this to the dock';
$string['anypagematchingtheabove'] = 'Any page matching the above';
$string['appearsinsubcontexts'] = 'Appears in sub-contexts';
+$string['assignrolesinblock'] = 'Assign roles in {$a} block';
$string['blocksettings'] = 'Block settings';
$string['bracketfirst'] = '{$a} (first)';
$string['bracketlast'] = '{$a} (last)';
+$string['configureblock'] = 'Configure {$a} block';
$string['contexts'] = 'Page contexts';
$string['contexts_help'] = 'Contexts are more specific types of pages where this block can be displayed within the original block location. You will have different options here depending on the original block location and your current location. For example, you can restrict a block to only appearing on forum pages in a course by adding the block to the course (making it appear on all sub-pages), then going into a forum and editing the block settings again to restrict display to just forum pages.';
$string['createdat'] = 'Original block location';
@@ -38,15 +40,19 @@
$string['defaultweight'] = 'Default weight';
$string['defaultweight_help'] = 'The default weight allows you to choose roughly where you want the block to appear in the chosen region, either at the top or the bottom. The final location is calculated from all the blocks in that region (for example, only one block can actually be at the top). This value can be overridden on specific pages if required.';
$string['deletecheck'] = 'Delete {$a} block?';
+$string['deleteblock'] = 'Delete {$a} block';
$string['deleteblockcheck'] = 'Are you sure that you want to delete this block titled {$a}?';
+$string['hideblock'] = 'Hide {$a} block';
$string['hidedockpanel'] = 'Hide the dock panel';
$string['hidepanel'] = 'Hide panel';
+$string['moveblock'] = 'Move {$a} block';
$string['moveblockhere'] = 'Move block here';
$string['movingthisblockcancel'] = 'Moving this block ({$a})';
$string['onthispage'] = 'On this page';
$string['pagetypes'] = 'Page types';
$string['pagetypewarning'] = 'The previously specified page type is no longer selectable. Please choose the most appropriate page type below.';
$string['region'] = 'Region';
+$string['showblock'] = 'Show {$a} block';
$string['showoncontextandsubs'] = 'Display on \'{$a}\' and any pages within it';
$string['showoncontextonly'] = 'Display on \'{$a}\' only';
$string['showonentiresite'] = 'Display throughout the entire site';
View
18 lib/blocklib.php
@@ -1031,29 +1031,34 @@ public function edit_controls($block) {
if ($this->page->user_can_edit_blocks()) {
// Move icon.
$controls[] = array('url' => $actionurl . '&bui_moveid=' . $block->instance->id,
- 'icon' => 't/move', 'caption' => get_string('move'), 'class' => 'editing_move');
+ 'icon' => 't/move', 'caption' => get_string('moveblock', 'block', $block->title),
+ 'class' => 'editing_move');
}
if ($this->page->user_can_edit_blocks() || $block->user_can_edit()) {
// Edit config icon - always show - needed for positioning UI.
$controls[] = array('url' => $actionurl . '&bui_editid=' . $block->instance->id,
- 'icon' => 't/edit', 'caption' => get_string('configuration'), 'class' => 'editing_edit');
+ 'icon' => 't/edit', 'caption' => get_string('configureblock', 'block', $block->title),
+ 'class' => 'editing_edit');
}
if ($this->user_can_delete_block($block)) {
// Delete icon.
$controls[] = array('url' => $actionurl . '&bui_deleteid=' . $block->instance->id,
- 'icon' => 't/delete', 'caption' => get_string('delete'), 'class' => 'editing_delete');
+ 'icon' => 't/delete', 'caption' => get_string('deleteblock', 'block', $block->title),
+ 'class' => 'editing_delete');
}
if ($this->page->user_can_edit_blocks() && $block->instance_can_be_hidden()) {
// Show/hide icon.
if ($block->instance->visible) {
$controls[] = array('url' => $actionurl . '&bui_hideid=' . $block->instance->id,
- 'icon' => 't/hide', 'caption' => get_string('hide'), 'class' => 'editing_hide');
+ 'icon' => 't/hide', 'caption' => get_string('hideblock', 'block', $block->title),
+ 'class' => 'editing_hide');
} else {
$controls[] = array('url' => $actionurl . '&bui_showid=' . $block->instance->id,
- 'icon' => 't/show', 'caption' => get_string('show'), 'class' => 'editing_show');
+ 'icon' => 't/show', 'caption' => get_string('showblock', 'block', $block->title),
+ 'class' => 'editing_show');
}
}
@@ -1067,7 +1072,8 @@ public function edit_controls($block) {
$controls[] = array('url' => $CFG->wwwroot . '/' . $CFG->admin .
'/roles/assign.php?contextid=' . $block->context->id . '&returnurl=' . urlencode($return),
- 'icon' => 't/assignroles', 'caption' => get_string('assignroles', 'role'), 'class' => 'editing_roles');
+ 'icon' => 't/assignroles', 'caption' => get_string('assignrolesinblock', 'block', $block->title),
+ 'class' => 'editing_roles');
}
return $controls;
Please sign in to comment.
Something went wrong with that request. Please try again.