Merge branch 'wip-mdl-35873' of git://github.com/rajeshtaneja/moodle

This commit is contained in:
Sam Hemelryk
2013-01-16 18:22:04 +13:00
2 changed files with 18 additions and 6 deletions
+12 -6
View File
@@ -1031,29 +1031,34 @@ class block_manager {
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 @@ class block_manager {
$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;