File tree Expand file tree Collapse file tree 5 files changed +24
-18
lines changed Expand file tree Collapse file tree 5 files changed +24
-18
lines changed Original file line number Diff line number Diff line change 33 "description" : " Kirby Section to display recently modified content pages" ,
44 "license" : " MIT" ,
55 "type" : " kirby-plugin" ,
6- "version" : " 5.0.1 " ,
6+ "version" : " 5.0.2 " ,
77 "authors" : [
88 {
99 "name" : " Bruno Meilick" ,
3737 "getkirby/cms" : " <5.0.0"
3838 },
3939 "scripts" : {
40- "fix" : " php-cs-fixer fix" ,
41- "test" : [
42- " mkdir -p tests/logs" ,
43- " @putenv XDEBUG_MODE=coverage" ,
44- " phpunit --configuration ./phpunit.xml"
45- ],
4640 "dist" : [
4741 " composer install --no-dev --optimize-autoloader" ,
4842 " git rm -rf --cached .; git add .;"
Original file line number Diff line number Diff line change 4747 'sections ' => [
4848 'recentlymodified ' => [
4949 'props ' => [
50- 'headline ' => function (string $ headline = ' Recently Modified ' ) {
51- return t ($ headline ) ;
50+ 'label ' => function (? string $ text = null ): ? string {
51+ return $ text ? t ($ text , $ text ) : null ;
5252 },
53- 'query ' => function (?string $ query = null ) {
53+ 'headline ' => function (?string $ text = null ): ?string {
54+ return $ text ? t ($ text , $ text ) : null ;
55+ },
56+ 'query ' => function (?string $ query = null ): array {
5457 $ query = $ query ?? option ('bnomei.recently-modified.query ' );
5558 $ parentId = is_a ($ this ->model (), \Kirby \Cms \Page::class) ? $ this ->model ()->id () : '' ;
5659 $ pages = site ()->recentlyModified ($ query , $ parentId );
Original file line number Diff line number Diff line change 11<template >
22 <section class =" k-section k-links-section" >
33 <header class =" k-section-header" >
4- <h2 class =" k-headline" >{{ headline }}</h2 >
4+ <h2 class =" k-label k-section-label" >
5+ <span class =" k-label-text" >{{ this.labelOrHeadline }}</span >
6+ </h2 >
57 </header >
68 <k-collection
79 :items =" links"
1416export default {
1517 data () {
1618 return {
17- headline: " Recently Modified" ,
19+ label: undefined ,
20+ headline: undefined ,
1821 layout: " list" ,
1922 links: []
2023 }
2124 },
2225 created () {
2326 this .load ().then (response => {
24- this .headline = response .headline ;
27+ this .label = response .label ? .length > 0 ? response .label : undefined ;
28+ this .headline = response .headline ? .length > 0 ? response .headline : undefined ;
2529 this .links = response .query ; // resolved query = list
2630 });
31+ },
32+ computed: {
33+ labelOrHeadline () {
34+ return this .label ?? this .headline ?? " Recently Modified" ;
35+ }
2736 }
2837};
2938< / script>
Original file line number Diff line number Diff line change 11<?php return array (
22 'root ' => array (
33 'name ' => 'bnomei/kirby3-recently-modified ' ,
4- 'pretty_version ' => '5.0.1 ' ,
5- 'version ' => '5.0.1 .0 ' ,
4+ 'pretty_version ' => '5.0.2 ' ,
5+ 'version ' => '5.0.2 .0 ' ,
66 'reference ' => null ,
77 'type ' => 'kirby-plugin ' ,
88 'install_path ' => __DIR__ . '/../../ ' ,
1111 ),
1212 'versions ' => array (
1313 'bnomei/kirby3-recently-modified ' => array (
14- 'pretty_version ' => '5.0.1 ' ,
15- 'version ' => '5.0.1 .0 ' ,
14+ 'pretty_version ' => '5.0.2 ' ,
15+ 'version ' => '5.0.2 .0 ' ,
1616 'reference ' => null ,
1717 'type ' => 'kirby-plugin ' ,
1818 'install_path ' => __DIR__ . '/../../ ' ,
You can’t perform that action at this time.
0 commit comments