From c7e5d33fa9c637f8c8b7e790e35d2717ce314be9 Mon Sep 17 00:00:00 2001 From: Arlen Johnson Date: Tue, 13 Jan 2026 18:37:33 -0500 Subject: [PATCH] Styling for Historic Petition attributes (CFM-29) --- .../locales/en_US/historic_petition_viewer.po | 39 ++++++ .../cell/HistoricPetitionViewers/display.php | 117 +++++++----------- app/resources/locales/en_US/information.po | 3 + app/templates/Petitions/petition.inc | 2 +- app/webroot/css/co-base.css | 25 ++-- app/webroot/css/co-responsive.css | 8 +- 6 files changed, 107 insertions(+), 87 deletions(-) create mode 100644 app/plugins/HistoricPetitionViewer/resources/locales/en_US/historic_petition_viewer.po diff --git a/app/plugins/HistoricPetitionViewer/resources/locales/en_US/historic_petition_viewer.po b/app/plugins/HistoricPetitionViewer/resources/locales/en_US/historic_petition_viewer.po new file mode 100644 index 000000000..fb56d820b --- /dev/null +++ b/app/plugins/HistoricPetitionViewer/resources/locales/en_US/historic_petition_viewer.po @@ -0,0 +1,39 @@ +# COmanage Registry Localizations (historic_petition_viewer domain) +# +# Portions licensed to the University Corporation for Advanced Internet +# Development, Inc. ("UCAID") under one or more contributor license agreements. +# See the NOTICE file distributed with this work for additional information +# regarding copyright ownership. +# +# UCAID licenses this file to you under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with the +# License. You may obtain a copy of the License at: +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# @link https://www.internet2.edu/comanage COmanage Project +# @package registry-plugins +# @since COmanage Registry v5.2.0 +# @license Apache License, Version 2.0 (http://www.apache.org/licenses/LICENSE-2.0) + + +msgid "attributes" +msgstr "Attributes" + +msgid "attributes.none" +msgstr "No historic attributes recorded for this petition." + +msgid "historic.petition" +msgstr "Historic Petition #{0}" + +msgid "metadata" +msgstr "Metadata" + +msgid "metadata.none" +msgstr "No historic metadata recorded for this petition." diff --git a/app/plugins/HistoricPetitionViewer/templates/cell/HistoricPetitionViewers/display.php b/app/plugins/HistoricPetitionViewer/templates/cell/HistoricPetitionViewers/display.php index 570801358..1469c63ba 100644 --- a/app/plugins/HistoricPetitionViewer/templates/cell/HistoricPetitionViewers/display.php +++ b/app/plugins/HistoricPetitionViewer/templates/cell/HistoricPetitionViewers/display.php @@ -25,21 +25,17 @@ return ucwords($label); }; -// Do not alter font coloring; keep defaults -// Each row: label 1/3, value 2/3; both left-aligned; 1em padding inside each cell. $renderLi = static function (string $label, $value) { if ($value === null || $value === '') return; $out = is_scalar($value) ? (string)$value : json_encode($value); ?> -
  • -
    -
    - -
    -
    - -
    -
    +
  • +

    + +

    +
    + +
  • -
    -

    #

    -
    diff --git a/app/resources/locales/en_US/information.po b/app/resources/locales/en_US/information.po index 9d2120a65..88e0f06e5 100644 --- a/app/resources/locales/en_US/information.po +++ b/app/resources/locales/en_US/information.po @@ -69,6 +69,9 @@ msgstr "Page {{page}} of {{pages}}, Viewing {{start}}-{{end}} of {{count}}" msgid "enrollment.steps" msgstr "Enrollment Steps" +msgid "enrollment.steps.plugin" +msgstr "Plugin: {0}" + msgid "ExternalIdentities.source" msgstr "This External Identity was created from {0}." diff --git a/app/templates/Petitions/petition.inc b/app/templates/Petitions/petition.inc index 7acdbda8e..b5602fc44 100644 --- a/app/templates/Petitions/petition.inc +++ b/app/templates/Petitions/petition.inc @@ -323,7 +323,7 @@ if (!empty($vv_obj?->petitioner_person?->id)) {
    -

    plugin ?>

    +

    plugin) ?>

    cell($step->plugin, [$vv_obj->id], ['vv_obj' => $vv_obj, 'vv_step' => $step, 'viewVars' => $this->viewVars]) ?>
    diff --git a/app/webroot/css/co-base.css b/app/webroot/css/co-base.css index 3e0815171..680eb01cb 100644 --- a/app/webroot/css/co-base.css +++ b/app/webroot/css/co-base.css @@ -2227,26 +2227,37 @@ ul#view_Petitions.form-list li.env-source-key-value-newgroup { margin-right: 1em; } .petition-attrs { - padding: 0; + padding: 1.5rem; box-shadow: inset 0 0 0.5rem 0 rgba(0,0,0,0.1); + border-top: 1px solid var(--cmg-color-bg-006); + word-break: break-word; } .petition-attrs h3 { - padding: 1rem 1rem 0; - margin: 0; + padding: 0 0 0.25rem; + margin: 1.5rem 0 0.5rem; font-size: 1.2em; font-weight: 600; - border-top: 1px solid var(--cmg-color-bg-006); + border-bottom: 1px solid var(--cmg-color-bg-005); } -.petition-attrs h4 { +.petition-attrs h3.ef-step-plugin-title { + margin: 0; + border-bottom: none; +} +.petition-attrs h4.petition-attr-label { font-size: 0.9em; margin: 0 0 0.25em; } .petition-attrs > ul { - padding: 0 0 1rem; + padding: 0; border-top: none; + margin-top: 1.5rem; +} +.petition-attrs h3 + ul { + margin-top: 1rem; } .petition-attrs > ul > li { - padding: 0.5rem 1rem; + padding: 0; + margin-bottom: 1.5rem; border: none; background-color: unset; } diff --git a/app/webroot/css/co-responsive.css b/app/webroot/css/co-responsive.css index cc5aa9ad2..3bdb5eb5c 100644 --- a/app/webroot/css/co-responsive.css +++ b/app/webroot/css/co-responsive.css @@ -106,6 +106,7 @@ .petition-attrs > ul { columns: 2; column-rule: 1px solid var(--cmg-color-bg-005); + gap: 2.5rem; } .petition-attrs > ul > li { break-inside: avoid; @@ -373,7 +374,7 @@ gap: 2rem; align-items: center; text-align: left; - margin: 1rem 0 0.5rem; + margin: 2rem 0 0.5rem; } /* GENERAL */ .table-container { @@ -671,11 +672,6 @@ border: 1px solid var(--cmg-color-bg-006); border-radius: 1em; } - /* PETITIONS */ - .petition-key-value { - display: grid; - grid-template-columns: 1fr 1fr; - } } /* EXTRA LARGE */