Skip to content

Commit

Permalink
MDL-38301 usability: Fixed wrong icon size
Browse files Browse the repository at this point in the history
  • Loading branch information
Frederic Massart committed Feb 15, 2013
1 parent 6319737 commit 982f4bc
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 11 deletions.
3 changes: 2 additions & 1 deletion enrol/cohort/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ public function get_action_icons(stdClass $instance) {

if (has_capability('enrol/cohort:config', $context)) {
$editlink = new moodle_url("/enrol/cohort/edit.php", array('courseid'=>$instance->courseid, 'id'=>$instance->id));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('i/edit', get_string('edit'), 'core', array('class'=>'icon')));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('t/edit', get_string('edit'), 'core',
array('class' => 'smallicon')));
}

return $icons;
Expand Down
3 changes: 2 additions & 1 deletion enrol/manual/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,8 @@ public function get_action_icons(stdClass $instance) {
}
if (has_capability('enrol/manual:config', $context)) {
$editlink = new moodle_url("/enrol/manual/edit.php", array('courseid'=>$instance->courseid));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('i/edit', get_string('edit'), 'core', array('class'=>'icon')));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('t/edit', get_string('edit'), 'core',
array('class' => 'iconsmall')));
}

return $icons;
Expand Down
3 changes: 2 additions & 1 deletion enrol/paypal/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,8 @@ public function get_action_icons(stdClass $instance) {

if (has_capability('enrol/paypal:config', $context)) {
$editlink = new moodle_url("/enrol/paypal/edit.php", array('courseid'=>$instance->courseid, 'id'=>$instance->id));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('i/edit', get_string('edit'), 'core', array('class'=>'icon')));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('t/edit', get_string('edit'), 'core',
array('class' => 'smallicon')));
}

return $icons;
Expand Down
3 changes: 2 additions & 1 deletion enrol/self/lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ public function get_action_icons(stdClass $instance) {

if (has_capability('enrol/self:config', $context)) {
$editlink = new moodle_url("/enrol/self/edit.php", array('courseid'=>$instance->courseid, 'id'=>$instance->id));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('i/edit', get_string('edit'), 'core', array('class'=>'icon')));
$icons[] = $OUTPUT->action_icon($editlink, new pix_icon('t/edit', get_string('edit'), 'core',
array('class' => 'smallicon')));
}

return $icons;
Expand Down
17 changes: 10 additions & 7 deletions group/groupings.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,17 +83,20 @@
}
$line[2] = $DB->count_records('course_modules', array('course'=>$course->id, 'groupingid'=>$grouping->id));

$buttons = "<a title=\"$stredit\" href=\"grouping.php?id=$grouping->id\"><img".
" src=\"" . $OUTPUT->pix_url('t/edit') . "\" class=\"iconsmall\" alt=\"$stredit\" /></a> ";
$url = new moodle_url('/group/grouping.php', array('id' => $grouping->id));
$buttons = html_writer::link($url, $OUTPUT->pix_icon('t/edit', $stredit, 'core',
array('class' => 'iconsmall')), array('title' => $stredit));
if (empty($grouping->idnumber) || $canchangeidnumber) {
// It's only possible to delete groups without an idnumber unless the user has the changeidnumber capability
$buttons .= "<a title=\"$strdelete\" href=\"grouping.php?id=$grouping->id&amp;delete=1\"><img".
" src=\"" . $OUTPUT->pix_url('t/delete') . "\" class=\"iconsmall\" alt=\"$strdelete\" /></a> ";
// It's only possible to delete groups without an idnumber unless the user has the changeidnumber capability.
$url = new moodle_url('/group/grouping.php', array('id' => $grouping->id, 'delete' => 1));
$buttons .= html_writer::link($url, $OUTPUT->pix_icon('t/delete', $strdelete, 'core',
array('class' => 'iconsmall')), array('title' => $strdelete));
} else {
$buttons .= $OUTPUT->spacer();
}
$buttons .= "<a title=\"$strmanagegrping\" href=\"assign.php?id=$grouping->id\"><img".
" src=\"" . $OUTPUT->pix_url('i/group') . "\" class=\"icon\" alt=\"$strmanagegrping\" /></a> ";
$url = new moodle_url('/group/assign.php', array('id' => $grouping->id));
$buttons .= html_writer::link($url, $OUTPUT->pix_icon('t/groups', $strmanagegrping, 'core',
array('class' => 'iconsmall')), array('title' => $strmanagegrping));

$line[3] = $buttons;
$data[] = $line;
Expand Down
2 changes: 2 additions & 0 deletions theme/base/style/core.css
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,9 @@ a.skip:active {position: static;display: block;}
.dir-rtl .mform .helplink img { margin: 0 .45em 0 0; padding: 0;}
.mform legend .helplink img { margin-right: .2em; }
.dir-rtl .mform legend .helplink img { margin: 0 .45em 0 .2em; }
.urlselect label,
.singleselect label { margin-right: .3em; }
.dir-rtl .urlselect label,
.dir-rtl .singleselect label { margin-left: .3em; margin-right: 0; }

input#id_externalurl {direction:ltr;}
Expand Down

0 comments on commit 982f4bc

Please sign in to comment.