MDL-36775 usability: New icons for calendar events

This commit is contained in:
Barbara Ramiro
2012-11-23 14:11:07 +08:00
committed by Frederic Massart
parent 020e338dee
commit 5326675e20
10 changed files with 77 additions and 8 deletions
+8 -8
View File
@@ -322,13 +322,13 @@ function calendar_get_mini($courses, $groups, $users, $cal_month = false, $cal_y
$popupalt = $event->modulename;
$component = $event->modulename;
} else if ($event->courseid == SITEID) { // Site event
$popupicon = 'c/site';
$popupicon = 'i/siteevent';
} else if ($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) { // Course event
$popupicon = 'c/course';
$popupicon = 'i/courseevent';
} else if ($event->groupid) { // Group event
$popupicon = 'c/group';
$popupicon = 'i/groupevent';
} else if ($event->userid) { // User event
$popupicon = 'c/user';
$popupicon = 'i/userevent';
}
$dayhref->set_anchor('event_'.$event->id);
@@ -614,7 +614,7 @@ function calendar_add_event_metadata($event) {
} else if($event->courseid == SITEID) { // Site event
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('c/site') . '" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('i/siteevent') . '" alt="'.get_string('globalevent', 'calendar').'" style="vertical-align: middle;" />';
$event->cssclass = 'calendar_event_global';
} else if($event->courseid != 0 && $event->courseid != SITEID && $event->groupid == 0) { // Course event
calendar_get_course_cached($coursecache, $event->courseid);
@@ -622,14 +622,14 @@ function calendar_add_event_metadata($event) {
$context = context_course::instance($event->courseid);
$fullname = format_string($coursecache[$event->courseid]->fullname, true, array('context' => $context));
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('c/course') . '" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('i/courseevent') . '" alt="'.get_string('courseevent', 'calendar').'" style="vertical-align: middle;" />';
$event->courselink = '<a href="'.$CFG->wwwroot.'/course/view.php?id='.$event->courseid.'">'.$fullname.'</a>';
$event->cssclass = 'calendar_event_course';
} else if ($event->groupid) { // Group event
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('c/group') . '" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('i/groupevent') . '" alt="'.get_string('groupevent', 'calendar').'" style="vertical-align: middle;" />';
$event->cssclass = 'calendar_event_group';
} else if($event->userid) { // User event
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('c/user') . '" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
$event->icon = '<img height="16" width="16" src="'.$OUTPUT->pix_url('i/userevent') . '" alt="'.get_string('userevent', 'calendar').'" style="vertical-align: middle;" />';
$event->cssclass = 'calendar_event_user';
}
return $event;
Binary file not shown.

After

Width:  |  Height:  |  Size: 230 B

+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="16px" height="16px" viewBox="-1 0 16 16" style="overflow:visible;enable-background:new -1 0 16 16;"
xml:space="preserve">
<defs>
</defs>
<path style="fill:#999999;" d="M13,0H2C1.5,0,1,0.5,1,1v2h1.5C3.3,3,4,3.7,4,4.5S3.3,6,2.5,6H1v1h1.5C3.3,7,4,7.7,4,8.5
S3.3,10,2.5,10H1v1h1.5C3.3,11,4,11.7,4,12.5S3.3,14,2.5,14H1v1c0,0.5,0.5,1,1,1h11c0.5,0,1-0.5,1-1V1C14,0.5,13.5,0,13,0z M12,6H5
V3h7V6z M3,12.5C3,12.8,2.8,13,2.5,13h-2C0.2,13,0,12.8,0,12.5l0,0C0,12.2,0.2,12,0.5,12h2C2.8,12,3,12.2,3,12.5L3,12.5z M3,8.5
C3,8.8,2.8,9,2.5,9h-2C0.2,9,0,8.8,0,8.5v0C0,8.2,0.2,8,0.5,8h2C2.8,8,3,8.2,3,8.5L3,8.5z M3,4.5C3,4.8,2.8,5,2.5,5h-2
C0.2,5,0,4.8,0,4.5l0,0C0,4.2,0.2,4,0.5,4h2C2.8,4,3,4.2,3,4.5L3,4.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

+16
View File
@@ -0,0 +1,16 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" style="overflow:visible;enable-background:new 0 0 16 16;"
xml:space="preserve" preserveAspectRatio="xMinYMid meet">
<defs>
</defs>
<path style="fill:#999999;" d="M3,16H0v-4l3.2-1.7C3.6,10,3.8,9.5,3.4,9C3.4,9,2,7.2,2,5.2C2,2.3,3.8,0,6,0c0.4,0,0.7,0.1,1.1,0.2
c-1.2,1.1-2,3-2,5c0,1.7,0.6,2.7,1,3.5c0.6,0.9,0.1,1-0.3,1.3C5.6,10.1,3,11.4,3,11.4V16z M16,11.9l-3.1-1.6
C12.4,10,12.3,9.4,12.6,9c0,0,1.4-1.8,1.4-3.8C14,2.3,12.2,0,10,0S6,2.3,6,5.2C6,7.2,7.5,9,7.5,9c0.3,0.4,0.2,1-0.3,1.3L4,12v4h12
V11.9z"/>
</svg>

After

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

+17
View File
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" style="overflow:visible;enable-background:new 0 0 16 16;"
xml:space="preserve">
<defs>
</defs>
<path style="fill:#999999;" d="M14,1h-2v1.5C12,3.3,11.3,4,10.5,4S9,3.3,9,2.5V1H6v1.5C6,3.3,5.3,4,4.5,4S3,3.3,3,2.5V1H1
C0.4,1,0,1.4,0,2v13c0,0.6,0.4,1,1,1h13c0.6,0,1-0.4,1-1V2C15,1.4,14.6,1,14,1z M4,14H2v-2h2V14z M4,11H2V9h2V11z M4,8H2V6h2V8z
M7,14H5v-2h2V14z M7,11H5V9h2V11z M7,8H5V6h2V8z M10,14H8v-2h2V14z M10,11H8V9h2V11z M10,8H8V6h2V8z M13,14h-2v-2h2V14z M13,11h-2
V9h2V11z M13,8h-2V6h2V8z M5,2.5C5,2.8,4.8,3,4.5,3l0,0C4.2,3,4,2.8,4,2.5v-2C4,0.2,4.2,0,4.5,0l0,0C4.8,0,5,0.2,5,0.5V2.5z M11,2.5
C11,2.8,10.8,3,10.5,3l0,0C10.2,3,10,2.8,10,2.5v-2C10,0.2,10.2,0,10.5,0l0,0C10.8,0,11,0.2,11,0.5V2.5z"/>
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 264 B

+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 15.1.0, SVG Export Plug-In -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
<!ENTITY ns_flows "http://ns.adobe.com/Flows/1.0/">
]>
<svg version="1.1"
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:a="http://ns.adobe.com/AdobeSVGViewerExtensions/3.0/"
x="0px" y="0px" width="16px" height="16px" viewBox="0 0 16 16" style="overflow:visible;enable-background:new 0 0 16 16;"
xml:space="preserve" preserveAspectRatio="xMinYMid meet">
<defs>
</defs>
<path style="fill:#999999;" d="M5.2,10.3L0,13.1V16h16v-3l-5.2-2.7C10.3,10,10.2,9.4,10.6,9c0,0,1.4-1.8,1.4-3.8C12,2.3,10.2,0,8,0
S4,2.3,4,5.2C4,7.2,5.4,9,5.4,9C5.8,9.5,5.7,10,5.2,10.3z"/>
</svg>

After

Width:  |  Height:  |  Size: 827 B

+5
View File
@@ -8,6 +8,10 @@ required changes:
deprecation:
* i/roles: Use t/assignroles instead
* c/course: Use i/courseevent instead
* c/group: Use i/groupevent instead
* c/site: Use i/siteevent instead
* c/user: Use i/userevent instead
optional changes:
* new optional boolean parameter $withlinks for public function login_info() in lib/outputrenderers.php (MDL-31365)
@@ -20,6 +24,7 @@ optional changes:
* new icon t/cohorts (sized 12x12), to prevent the use of i/cohorts which is 16x16.
* new icons t/sort_asc, t/sort_desc to use for ordering in table headers.
* new class 'iconsort' for icons used for ordering in table headers.
* new icons i/courseevent, i/groupevent, i/siteevent and i/userevent (16x16) instead of c/* for calendar events.
=== 2.3 ===