File tree Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Expand file tree Collapse file tree 2 files changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -44,6 +44,11 @@ public function desktop(): never
44
44
}
45
45
$ display = $ _GET ['display ' ] ?? 'list ' ;
46
46
47
+ if (Config::disablejavascript () && ($ display === 'graph ' || $ display === 'map ' )) {
48
+ http_response_code (403 );
49
+ $ this ->showtemplate ('forbidden ' , ['message ' => 'only list mode is available as javscript is disabled ' ]);
50
+ }
51
+
47
52
$ pagelist = $ this ->pagemanager ->pagelist ();
48
53
49
54
Original file line number Diff line number Diff line change 68
68
<i class="fa fa-search" title="There is active search"></i>
69
69
<?php endif ?>
70
70
<span>
71
- <a href="?display=list" <?= $ display === 'list ' ? 'class="selected" ' : '' ?> ><i class="fa fa-th-list"></i></a>
72
- <a href="?display=graph" <?= $ display === 'graph ' ? 'class="selected" ' : '' ?> ><i class="fa fa-sitemap"></i></a>
73
- <a href="?display=map" <?= $ display === 'map ' ? 'class="selected" ' : '' ?> ><i class="fa fa-globe"></i></a>
71
+ <?php if (!Wcms \Config::disablejavascript ()) : ?>
72
+ <a href="?display=list" <?= $ display === 'list ' ? 'class="selected" ' : '' ?> ><i class="fa fa-th-list"></i></a>
73
+ <a href="?display=graph" <?= $ display === 'graph ' ? 'class="selected" ' : '' ?> ><i class="fa fa-sitemap"></i></a>
74
+ <a href="?display=map" <?= $ display === 'map ' ? 'class="selected" ' : '' ?> ><i class="fa fa-globe"></i></a>
75
+ <?php endif ?>
74
76
</span>
75
77
</h2>
76
78
You can’t perform that action at this time.
0 commit comments