File tree Expand file tree Collapse file tree 3 files changed +27
-33
lines changed
ps17/views/templates/admin
ps8/views/templates/admin
ps9/views/templates/admin Expand file tree Collapse file tree 3 files changed +27
-33
lines changed Original file line number Diff line number Diff line change 4444 #content .nobootstrap div .bootstrap .panel {
4545 display: none;
4646 }
47- #content .nobootstrap .page - head h4 .page - subtitle {
48- display: none;
49- }
5047< / style>
5148
5249< script>
53- // Enhance page title with subtitle and module version
54- const pageTitle = document .querySelector (' #content.nobootstrap .page-head h2 .page-title ' );
55- const pageSubtitle = document . querySelector ( ' #content.nobootstrap .page-head h4.page-subtitle ' ) ;
50+ // Enhance page subtitle with module version
51+ const pageSubtitles = document .querySelectorAll (' #content.nobootstrap .page-head .page-subtitle, #content.bootstrap .page-head .page-subtitle ' );
52+ const moduleVersion = window ? . store ? . context ? . moduleVersion ? ' v ' + window . store . context . moduleVersion : ' ' ;
5653
57- if (pageTitle) {
58- pageTitle.textContent = pageTitle.textContent
59- + (pageSubtitle ? ' ' + pageSubtitle.textContent : ' ' )
60- + (window?.store?.context?.moduleVersion ? ' v' + window.store.context.moduleVersion : ' ' )
61- }
54+ pageSubtitles? .forEach ((pageSubtitle ) => {
55+ if (pageSubtitle) {
56+ pageSubtitle.textContent = pageSubtitle.textContent
57+ + moduleVersion;
58+ }
59+ } );
6260< / script>
Original file line number Diff line number Diff line change 4444 #content .nobootstrap div .bootstrap .panel {
4545 display: none;
4646 }
47- #content .nobootstrap .page - head h4 .page - subtitle {
48- display: none;
49- }
5047< / style>
5148
5249< script>
53- // Enhance page title with subtitle and module version
54- const pageTitle = document .querySelector (' #content .page-head .page-title ' );
55- const pageSubtitle = document . querySelector ( ' #content .page-head .page-subtitle ' ) ;
50+ // Enhance page subtitle with module version
51+ const pageSubtitles = document .querySelectorAll (' #content.nobootstrap .page-head .page-subtitle, #content.bootstrap .page-head .page-subtitle ' );
52+ const moduleVersion = window ? . store ? . context ? . moduleVersion ? ' v ' + window . store . context . moduleVersion : ' ' ;
5653
57- if (pageTitle) {
58- pageTitle.textContent = pageTitle.textContent
59- + (pageSubtitle ? ' ' + pageSubtitle.textContent : ' ' )
60- + (window?.store?.context?.moduleVersion ? ' v' + window.store.context.moduleVersion : ' ' )
61- }
54+ pageSubtitles? .forEach ((pageSubtitle ) => {
55+ if (pageSubtitle) {
56+ pageSubtitle.textContent = pageSubtitle.textContent
57+ + moduleVersion;
58+ }
59+ } );
6260< / script>
Original file line number Diff line number Diff line change 4444 #content .nobootstrap div .bootstrap .panel {
4545 display: none;
4646 }
47- #content .nobootstrap .page - head h4 .page - subtitle {
48- display: none;
49- }
5047< / style>
5148
5249< script>
53- // Enhance page title with subtitle and module version
54- const pageTitle = document .querySelector (' #content .page-head .page-title ' );
55- const pageSubtitle = document . querySelector ( ' #content .page-head .page-subtitle ' ) ;
50+ // Enhance page subtitle with module version
51+ const pageSubtitles = document .querySelectorAll (' #content.nobootstrap .page-head .page-subtitle, #content.bootstrap .page-head .page-subtitle ' );
52+ const moduleVersion = window ? . store ? . context ? . moduleVersion ? ' v ' + window . store . context . moduleVersion : ' ' ;
5653
57- if (pageTitle) {
58- pageTitle.textContent = pageTitle.textContent
59- + (pageSubtitle ? ' ' + pageSubtitle.textContent : ' ' )
60- + (window?.store?.context?.moduleVersion ? ' v' + window.store.context.moduleVersion : ' ' )
61- }
54+ pageSubtitles? .forEach ((pageSubtitle ) => {
55+ if (pageSubtitle) {
56+ pageSubtitle.textContent = pageSubtitle.textContent
57+ + moduleVersion;
58+ }
59+ } );
6260< / script>
You can’t perform that action at this time.
0 commit comments