diff --git a/app/src/Model/Table/MostlyStaticPagesTable.php b/app/src/Model/Table/MostlyStaticPagesTable.php index 36704cab..473729d4 100644 --- a/app/src/Model/Table/MostlyStaticPagesTable.php +++ b/app/src/Model/Table/MostlyStaticPagesTable.php @@ -327,7 +327,7 @@ public function validationDefault(Validator $validator): Validator { $validator->notEmptyString('context'); $validator->add('body', [ - 'filter' => ['rule' => ['validateInput'], + 'filter' => ['rule' => ['validateInput',['type' => 'html']], 'provider' => 'table'] ]); $validator->allowEmptyString('body'); diff --git a/app/templates/MostlyStaticPages/fields-nav.inc b/app/templates/MostlyStaticPages/fields-nav.inc new file mode 100644 index 00000000..5145147b --- /dev/null +++ b/app/templates/MostlyStaticPages/fields-nav.inc @@ -0,0 +1,36 @@ + 'arrow_outward', + 'order' => 'Default', + 'label' => __d('operation', 'view'), + 'url' => $vv_base_url . '/' . $vv_obj->name, + 'class' => '' + ]; +} diff --git a/app/templates/Standard/add-edit-view.php b/app/templates/Standard/add-edit-view.php index f2a32d54..a4dceac6 100644 --- a/app/templates/Standard/add-edit-view.php +++ b/app/templates/Standard/add-edit-view.php @@ -108,7 +108,12 @@ foreach(($topLinks ?? []) as $t) { $perm = false; - if(!empty($t['link']['controller'])) { + if(!empty($t['url'])) { + // We are passing in a plain URL. Pass it along directly. + // For the moment (v5.1+), this is only used to create a toplink to a Mostly Static Page. + $perm = true; + $t['link'] = $t['url']; + } elseif(!empty($t['link']['controller'])) { // We're linking into a related model, which may or may not be in a plugin $linkModel = \Cake\Utility\Inflector::camelize($t['link']['controller']); diff --git a/app/templates/element/menuPanel.php b/app/templates/element/menuPanel.php index 3988d8cb..f88fede5 100644 --- a/app/templates/element/menuPanel.php +++ b/app/templates/element/menuPanel.php @@ -490,6 +490,20 @@ email + article + + room_service Self Service Permissions diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 59f461b8..7c6af684 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -2177,6 +2177,14 @@ ul.petition-attrs-subset li { .petition-attrs-subset-label { color: var(--cmg-color-txt-soft); } +/* MOSTLY STATIC PAGES */ +body.pages.logged-out #top-bar, +body.pages.logged-out #breadcrumbs { + display: none; +} +body.pages.logged-out .page-title-container { + margin: 0; +} /* GENERAL */ .hidden, .invisible, diff --git a/app/webroot/js/comanage/components/mvea/mvea-item.js b/app/webroot/js/comanage/components/mvea/mvea-item.js index 985740b3..39114b6c 100644 --- a/app/webroot/js/comanage/components/mvea/mvea-item.js +++ b/app/webroot/js/comanage/components/mvea/mvea-item.js @@ -202,7 +202,7 @@ export default {
+ Url->build( + ['plugin' => null, + 'controller' => 'mostly_static_pages', + 'action' => 'index', + '?' => [ + 'co_id' => $vv_cur_co->id + ]] + ); + ?> +