Skip to content

Commit

Permalink
Merge branch 'MDL-72581-master' of https://github.com/junpataleta/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
sarjona committed Dec 28, 2021
2 parents bcd0641 + f3324d2 commit 7e55962
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 18 deletions.
5 changes: 5 additions & 0 deletions blocks/timeline/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@
#block-region-side-pre .block_timeline h6.event-action a.btn {
width: auto;
}
/* Override the width/height of the .activityiconcontainer class in the timeline block. */
.block_timeline .activityiconcontainer {
width: 40px;
height: 40px;
}

.block_timeline .timeline-action-button {
margin-left: auto;
Expand Down
5 changes: 3 additions & 2 deletions blocks/timeline/templates/event-list-item.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@
"component": "mod_assign",
"alttext": "Assignment icon"
},
"overdue": false
"overdue": false,
"purpose": "assessment"
}
}}
<div class="list-group-item timeline-event-list-item flex-column pt-2 pb-0 border-0 {{#courseview}}px-0{{/courseview}}{{^courseview}}px-2{{/courseview}}"
Expand All @@ -52,7 +53,7 @@
<small class="text-right text-nowrap align-self-center ml-1">
{{#userdate}} {{timesort}}, {{#str}} strftimetime24, core_langconfig {{/str}} {{/userdate}}
</small>
<div class="icon-size-4 align-self-top align-self-center mx-2 text-nowrap">
<div class="activityiconcontainer {{purpose}} courseicon align-self-top align-self-center mx-3 mb-1 mb-sm-0 text-nowrap">
{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
</div>
<div class="event-name-container flex-grow-1 line-height-3 nowrap text-truncate">
Expand Down
9 changes: 9 additions & 0 deletions calendar/classes/external/event_exporter_base.php
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,9 @@ protected static function define_other_properties() {
'type' => event_action_exporter::read_properties_definition(),
'optional' => true,
],
'purpose' => [
'type' => PARAM_TEXT
],
];
}

Expand Down Expand Up @@ -328,6 +331,12 @@ protected function get_other_values(renderer_base $output) {
}
$values['normalisedeventtypetext'] = $stringexists ? get_string($identifier, 'calendar') : '';

$purpose = 'none';
if ($moduleproxy) {
$purpose = plugin_supports('mod', $moduleproxy->get('modname'), FEATURE_MOD_PURPOSE, 'none');
}
$values['purpose'] = $purpose;

$values['icon'] = $iconexporter->export($output);

$subscriptionexporter = new event_subscription_exporter($event);
Expand Down
6 changes: 4 additions & 2 deletions theme/boost/scss/moodle/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ $iconsizes: map-merge((
background-color: $gray-100;
border-radius: 4px;
padding: 0.7rem;
.activityicon {
.activityicon,
.icon {
margin: 0;
height: 24px;
width: 24px;
Expand All @@ -145,7 +146,8 @@ $iconsizes: map-merge((
@each $type, $value in $activity-icon-colors {
.activityiconcontainer.#{$type} {
background-color: $value;
.activityicon {
.activityicon,
.icon {
filter: brightness(0) invert(1);
}
}
Expand Down
21 changes: 14 additions & 7 deletions theme/boost/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -12349,39 +12349,46 @@ body.dragging .dragging {
background-color: #f8f9fa;
border-radius: 4px;
padding: 0.7rem; }
.activityiconcontainer .activityicon {
.activityiconcontainer .activityicon,
.activityiconcontainer .icon {
margin: 0;
height: 24px;
width: 24px; }

.activityiconcontainer.administration {
background-color: #5d63f6; }
.activityiconcontainer.administration .activityicon {
.activityiconcontainer.administration .activityicon,
.activityiconcontainer.administration .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.assessment {
background-color: #eb66a2; }
.activityiconcontainer.assessment .activityicon {
.activityiconcontainer.assessment .activityicon,
.activityiconcontainer.assessment .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.collaboration {
background-color: #f7634d; }
.activityiconcontainer.collaboration .activityicon {
.activityiconcontainer.collaboration .activityicon,
.activityiconcontainer.collaboration .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.communication {
background-color: #11a676; }
.activityiconcontainer.communication .activityicon {
.activityiconcontainer.communication .activityicon,
.activityiconcontainer.communication .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.content {
background-color: #399be2; }
.activityiconcontainer.content .activityicon {
.activityiconcontainer.content .activityicon,
.activityiconcontainer.content .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.interface {
background-color: #a378ff; }
.activityiconcontainer.interface .activityicon {
.activityiconcontainer.interface .activityicon,
.activityiconcontainer.interface .icon {
filter: brightness(0) invert(1); }

:root {
Expand Down
21 changes: 14 additions & 7 deletions theme/classic/style/moodle.css
Original file line number Diff line number Diff line change
Expand Up @@ -12349,39 +12349,46 @@ body.dragging .dragging {
background-color: #f8f9fa;
border-radius: 4px;
padding: 0.7rem; }
.activityiconcontainer .activityicon {
.activityiconcontainer .activityicon,
.activityiconcontainer .icon {
margin: 0;
height: 24px;
width: 24px; }

.activityiconcontainer.administration {
background-color: #5d63f6; }
.activityiconcontainer.administration .activityicon {
.activityiconcontainer.administration .activityicon,
.activityiconcontainer.administration .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.assessment {
background-color: #eb66a2; }
.activityiconcontainer.assessment .activityicon {
.activityiconcontainer.assessment .activityicon,
.activityiconcontainer.assessment .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.collaboration {
background-color: #f7634d; }
.activityiconcontainer.collaboration .activityicon {
.activityiconcontainer.collaboration .activityicon,
.activityiconcontainer.collaboration .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.communication {
background-color: #11a676; }
.activityiconcontainer.communication .activityicon {
.activityiconcontainer.communication .activityicon,
.activityiconcontainer.communication .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.content {
background-color: #399be2; }
.activityiconcontainer.content .activityicon {
.activityiconcontainer.content .activityicon,
.activityiconcontainer.content .icon {
filter: brightness(0) invert(1); }

.activityiconcontainer.interface {
background-color: #a378ff; }
.activityiconcontainer.interface .activityicon {
.activityiconcontainer.interface .activityicon,
.activityiconcontainer.interface .icon {
filter: brightness(0) invert(1); }

:root {
Expand Down

0 comments on commit 7e55962

Please sign in to comment.