Skip to content

Commit

Permalink
A temporary icon for roles (needs work!)
Browse files Browse the repository at this point in the history
  • Loading branch information
moodler committed Sep 6, 2006
1 parent 26663a2 commit 6d0bd10
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion blocks/admin/block_admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ function load_content_for_course() {
/// always need a role assignment link
if (has_capability('moodle/role:assign', $context)) {
$this->content->items[]='<a href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$context->id.'">'.get_string('assignroles', 'role').'</a>';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/users.gif" alt="" />';
$this->content->icons[]='<img src="'.$CFG->pixpath.'/i/roles.gif" alt="" />';
}

if ($course->metacourse) {
Expand Down
5 changes: 3 additions & 2 deletions blocks/moodleblock.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -325,6 +325,7 @@ function _add_edit_controls($options) {
$this->str->hide = get_string('hide');
$this->str->show = get_string('show');
$this->str->configure = get_string('configuration');
$this->str->assignroles = get_string('assignroles', 'role');
}

$movebuttons = '<div class="commands">';
Expand All @@ -348,8 +349,8 @@ function _add_edit_controls($options) {
$script = $page->url_get_full(array('instanceid' => $this->instance->id, 'sesskey' => $USER->sesskey));

// place holder for roles button
$movebuttons .= '<a class="icon roles" title="'. $title .'" href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$blockcontext->id.'">' .
'<img src="'.$CFG->pixpath.'/i/users.gif" alt="'.get_string('roles').'" /></a>';
$movebuttons .= '<a class="icon roles" title="'. $this->str->assignroles .'" href="'.$CFG->wwwroot.'/admin/roles/assign.php?contextid='.$blockcontext->id.'">' .
'<img src="'.$CFG->pixpath.'/i/roles.gif" alt="'.$this->str->assignroles.'" /></a>';

$movebuttons .= '<a class="icon hide" title="'. $title .'" href="'.$script.'&amp;blockaction=toggle">' .
'<img src="'. $CFG->pixpath.$icon .'" alt="'.$title.'" /></a>';
Expand Down
Binary file added pix/i/roles.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 6d0bd10

Please sign in to comment.