Merge branch 'MDL-73908-master' of https://github.com/bmbrands/moodle

This commit is contained in:
Jun Pataleta 2022-03-10 17:15:34 +08:00
commit 972b5a2d3f
9 changed files with 50 additions and 39 deletions

View File

@ -60,7 +60,8 @@ class recentlyaccesseditems_item_exporter extends \core\external\exporter {
get_fast_modinfo($this->data->courseid)->cms[$this->data->cmid]->get_icon_url(),
get_string('pluginname', $this->data->modname),
['title' => get_string('pluginname', $this->data->modname), 'class' => 'icon']
)
),
'purpose' => plugin_supports('mod', $this->data->modname, FEATURE_MOD_PURPOSE, MOD_PURPOSE_OTHER)
);
}
@ -113,6 +114,9 @@ class recentlyaccesseditems_item_exporter extends \core\external\exporter {
),
'icon' => array(
'type' => PARAM_RAW,
),
'purpose' => array(
'type' => PARAM_TEXT,
)
);
}

View File

@ -45,7 +45,7 @@
<a class="card dashboard-card mb-1 py-2 coursename" href="{{{viewurl}}}">
<div class="card-body course-info-container">
<div class="d-flex text-truncate">
<div class="d-flex align-self-center">
<div class="d-flex align-self-center activityiconcontainer {{purpose}}">
{{{icon}}}
</div>
<div class="w-100 line-height-3 text-truncate ml-2">
@ -56,4 +56,4 @@
</div>
</a>
{{/items}}
</div>
</div>

View File

@ -16,11 +16,6 @@
#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;

View File

@ -53,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="activityiconcontainer {{purpose}} courseicon align-self-top align-self-center mx-3 mb-1 mb-sm-0 text-nowrap">
<div class="activityiconcontainer small {{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">

View File

@ -40,19 +40,25 @@
{{> core/overlay_loading}}
{{#events}}
<div{{!
}} class="event"{{!
}} class="event d-flex border-bottom pt-2 pb-3"{{!
}} data-eventtype-{{normalisedeventtype}}="1"{{!
}} data-region="event-item"{{!
}}>
<span>{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}</span>
<a{{!
}} data-type="event"{{!
}} data-action="view-event"{{!
}} data-event-id="{{id}}"{{!
}} href="{{viewurl}}"{{!
}}>{{{name}}}</a>
<div class="date">{{{formattedtime}}}</div>
<hr>
<div class="activityiconcontainer small {{{purpose}}} courseicon mr-3">
{{#icon}}{{#pix}} {{key}}, {{component}}, {{alttext}} {{/pix}}{{/icon}}
</div>
<div class="overflow-auto">
<h6 class="d-flex mb-1">
<a{{!
}} class="text-truncate"{{!
}} data-type="event"{{!
}} data-action="view-event"{{!
}} data-event-id="{{id}}"{{!
}} href="{{viewurl}}"{{!
}}>{{{name}}}</a>
</h6>
<div class="date small">{{{formattedtime}}}</div>
</div>
</div>
{{/events}}
{{^events}}

View File

@ -234,14 +234,12 @@ $card-gutter : $card-deck-margin * 2;
}
}
@media (min-width: 1200px) {
#block-region-side-pre {
.dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0;
.dashboard-card {
width: calc(100% - #{$card-gutter}) !important;
}
#block-region-side-pre {
.dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0;
.dashboard-card {
width: calc(100% - #{$card-gutter}) !important;
}
}
}

View File

@ -140,6 +140,10 @@ $iconsizes: map-merge((
height: 24px;
width: 24px;
}
&.small {
width: $activity-iconcontainer-width - 10px;
height: $activity-iconcontainer-height - 10px;
}
}
@each $type, $value in $activity-icon-colors {

View File

@ -12359,6 +12359,9 @@ body.dragging .dragging {
margin: 0;
height: 24px;
width: 24px; }
.activityiconcontainer.small {
width: 40px;
height: 40px; }
.activityiconcontainer.administration {
background-color: #5d63f6; }
@ -13061,12 +13064,11 @@ body.dragging .dragging {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(33.33% - 0.5rem); } }
@media (min-width: 1200px) {
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0; }
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(100% - 0.5rem) !important; } }
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0; }
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(100% - 0.5rem) !important; }
.block_recentlyaccessedcourses .paging-bar-container {
margin-top: -2.4rem;

View File

@ -12359,6 +12359,9 @@ body.dragging .dragging {
margin: 0;
height: 24px;
width: 24px; }
.activityiconcontainer.small {
width: 40px;
height: 40px; }
.activityiconcontainer.administration {
background-color: #5d63f6; }
@ -13061,12 +13064,11 @@ body.dragging .dragging {
.dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(33.33% - 0.5rem); } }
@media (min-width: 1200px) {
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0; }
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(100% - 0.5rem) !important; } }
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) {
margin-left: 0;
margin-right: 0; }
#block-region-side-pre .dashboard-card-deck:not(.fixed-width-cards) .dashboard-card {
width: calc(100% - 0.5rem) !important; }
.block_recentlyaccessedcourses .paging-bar-container {
margin-top: -2.4rem;