Skip to content

Commit

Permalink
Merge pull request #793 from euphorie/markup-alignment-for-usability-…
Browse files Browse the repository at this point in the history
…testing

Markup alignment for usability testing
  • Loading branch information
ale-rt authored Jan 31, 2025
2 parents 1bd7ba8 + b7be3ca commit 352e76e
Show file tree
Hide file tree
Showing 16 changed files with 64 additions and 30 deletions.
3 changes: 3 additions & 0 deletions docs/changes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@ Changelog
(`#2375 <https://github.com/syslabcom/scrum/issues/2375>`_)
[reinhardt]

- Updated resources from proto and applied a number of markup fixes in a review session with Daniel
[pilz]


16.2.7 (2025-01-15)
-------------------
Expand Down
9 changes: 8 additions & 1 deletion src/euphorie/client/browser/templates/assessments.pt
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@
</metal:homescreen_navigation>
<div id="application-content"
tal:define="
sessions view/sessions;
sessions python:view.sessions.all();
show_extra_fields python:True;
"
>
Expand All @@ -118,12 +118,19 @@
<div class="portlet">
<div class="content">
<metal:assessments_list metal:define-macro="assessments_list">
<p class="pat-message info"
i18n_translate="message_you_dont_have_any_risk_assessments_yet"
tal:condition="not: sessions"
>
You don&rsquo;t have any risk assessments yet. Start by creating a new one.
</p>
<ul class="data-matrix ${python:'hd' if show_extra_fields else None}"
tal:define="
show_extra_fields show_extra_fields|python:False;
toLocalizedTime nocall: context/@@plone/toLocalizedTime;
get_archived_label nocall:view/get_archived_label|nocall:here/@@assessments/get_archived_label;
"
tal:condition="sessions"
>
<li class="row ${python:'archived' if session.is_archived else None}"
title="${python: get_archived_label(session)}"
Expand Down
20 changes: 18 additions & 2 deletions src/euphorie/client/browser/templates/certificates.pt
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,24 @@
</metal:homescreen_navigation>
<div id="application-content">
<div class="portlet">
<div class="content">
<tal:year tal:repeat="item view/certificates">
<div class="content"
tal:define="
certificates view/certificates;
"
>
<tal:cond condition="python: len(certificates) == 0">
<p class="pat-message info"
i18n_translate="message_you_dont_have_any_certificates_yet"
>
You haven&rsquo;t earned any certificates yet.
</p>
<a class="pat-inject no-label"
href="${webhelpers/base_url}/++resource++euphorie.resources/oira/help/${webhelpers/help_language}/pages/certificates.html#content"
data-pat-inject="history: record; source: #content; target: #content;"
i18n:translate="message_learn_more_about_certificates"
>Learn more about certificates.</a>
</tal:cond>
<tal:year tal:repeat="item certificates">
<tal:year tal:define="
year python:item[0];
sessions python:item[1];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,7 @@
<tal:question tal:replace="structure module/question">question</tal:question>
</article>

<p class="buttonBar"
id="nav-bar"
>
<p class="button-bar">
<a class="pat-button back"
href="${view/previous_question_url}"
i18n:translate="label_previous"
Expand Down
28 changes: 21 additions & 7 deletions src/euphorie/client/browser/templates/more_menu.pt
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@
i18n:translate="label_history"
>History</a>
</li>
<li>
<a class="pat-modal close-panel icon-chart-line ${python: not has_tree and 'disabled' or ''}"
href="${python:status_url if has_tree else None}"
title="Status"
data-pat-modal="class: medium"
i18n:attributes="title navigation_status"
i18n:translate="navigation_status"
>Status</a>
</li>
<li>
<a class="close-panel icon-trash pat-modal ${python: not can_delete and 'disabled' or ''}"
href="${python:can_delete and delete_url or None}"
Expand Down Expand Up @@ -59,13 +68,18 @@
>Duplicate</a>
</li>
<li>
<a class="pat-modal close-panel icon-chart-line ${python: not has_tree and 'disabled' or ''}"
href="${python:status_url if has_tree else None}"
title="Status"
data-pat-modal="class: medium"
i18n:attributes="title navigation_status"
i18n:translate="navigation_status"
>Status</a>
<a class="pat-modal icon-eye close-panel"
href="${here/absolute_url}/@@panel-contents-preview#document-content"
data-pat-modal="class: sheet"
i18n:translate="label_print_tool_preview"
>Preview or print the tool for preparation</a>
</li>
<li>
<a class="pat-inject close-panel icon-cancel"
href="${webhelpers/country_or_client_url}#content"
data-pat-inject="history: record"
i18n:translate="label_exit"
>Exit</a>
</li>
</ul>
</div>
Expand Down
1 change: 0 additions & 1 deletion src/euphorie/client/browser/templates/new-session.pt
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@
data-pat-autosuggest="minimum-input-length:0"
i18n:attributes="placeholder label_select_oira_tool"
>
<option value="">&nbsp;</option>
<metal:templates define-macro="templates_many">
<tal:surveys define="
surveys root/survey_templates;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
i18n:attributes="placeholder label_select_oira_tool"
>
<metal:templates define-macro="templates_many">
<option value="">&nbsp;</option>
<tal:surveys define="
surveys root/survey_templates;
">
Expand Down
1 change: 1 addition & 0 deletions src/euphorie/client/browser/templates/portlet-my-ras.pt
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
<p>
<a class="pat-modal icon-plus-circle"
href="${here/absolute_url}/@@new-session.html#document-content"
data-pat-modal="class: panel small"
>${view/label_start_session}</a>
</p>
</article>
Expand Down
2 changes: 1 addition & 1 deletion src/euphorie/client/browser/templates/report.pt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</textarea>
</label>
</fieldset>
<p class="buttonBar">
<p class="button-bar">
<button class="pat-button default"
id="report_comment_submit"
name="next"
Expand Down
2 changes: 1 addition & 1 deletion src/euphorie/client/browser/templates/start.pt
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
</article>

<article class="pat-rich">
<h1>${context/Title}</h1>
<h1>${python: view.session.title or context.title}</h1>
<section tal:condition="context/Description">
<p>${context/Description}</p>
</section>
Expand Down
4 changes: 2 additions & 2 deletions src/euphorie/client/browser/templates/webhelpers.pt
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
>

<!-- Existing Measures -->
<fieldset class="pat-checklist pat-clone ${python:'pat-inject pat-autosubmit pat-subform' if (webhelpers.integrated_action_plan or webhelpers.use_training_module) else None}"
<fieldset class="measures-in-place pat-checklist pat-clone ${python:'pat-inject pat-autosubmit pat-subform' if (webhelpers.integrated_action_plan or webhelpers.use_training_module) else None}"
id="risk_identification_form"
disabled="${python:'disabled' if not webhelpers.can_edit_session else None}"
data-pat-clone="template: #in-place-measure-template; trigger-element: #add-in-place-measure-button; remove-behaviour: none"
Expand Down Expand Up @@ -268,7 +268,7 @@
<div class="button-bar cloning"
tal:condition="python:view.show_existing_measures"
>
<button class="add-clone small pat-button icon-plus-circle"
<button class="add-clone pat-button icon-plus-circle"
id="add-in-place-measure-button"
title="${view/button_add_extra}"
type="button"
Expand Down
8 changes: 3 additions & 5 deletions src/euphorie/client/tests/test_functional_country.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ def test_surveys_filtered_by_language(self):
self.portal.client["nl"].absolute_url() + "/@@portlet-available-tools"
)
self.assertEqual(
browser.getControl(name="survey").options, ["", "branche/vragenlijst"]
browser.getControl(name="survey").options, ["branche/vragenlijst"]
)

# Still Dutch
browser.open(
self.portal.client["nl"].absolute_url() + "/@@portlet-available-tools"
)
self.assertEqual(
browser.getControl(name="survey").options, ["", "branche/vragenlijst"]
browser.getControl(name="survey").options, ["branche/vragenlijst"]
)

# Now, switch to English
Expand All @@ -53,9 +53,7 @@ def test_surveys_filtered_by_language(self):
browser.open(
self.portal.client["nl"].absolute_url() + "/@@portlet-available-tools"
)
self.assertEqual(
browser.getControl(name="survey").options, ["", "sector/survey"]
)
self.assertEqual(browser.getControl(name="survey").options, ["sector/survey"])

def test_must_select_valid_survey(self):
self.loginAsPortalOwner()
Expand Down
2 changes: 1 addition & 1 deletion src/euphorie/content/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@
),
"answer_no_integrated_ap": _(
"label_not_sufficient_integrated_ap",
default="No, more measures are required <strong>(to be added below)</strong>", # noqa: E501
default="No, more measures are required (to be added below)", # noqa: E501
),
"answer_na": _("label_not_applicable", default="Not applicable"),
"custom_intro_extra": _(
Expand Down
3 changes: 1 addition & 2 deletions src/euphorie/deployment/locales/de/LC_MESSAGES/euphorie.po
Original file line number Diff line number Diff line change
Expand Up @@ -4826,8 +4826,7 @@ msgstr "Nein, weitere Maßnahmen sind notwendig"
#: euphorie/content/utils.py:160
msgid "label_not_sufficient_integrated_ap"
msgstr ""
"Nein, weitere Maßnahmen sind notwendig <strong>(weiter unten einzutragen)</"
"strong>"
"Nein, weitere Maßnahmen sind notwendig (weiter unten einzutragen)"

#. Default: "Notes"
#: euphorie/client/browser/templates/training-slides.pt:245
Expand Down
4 changes: 2 additions & 2 deletions src/euphorie/deployment/locales/fr/LC_MESSAGES/euphorie.po
Original file line number Diff line number Diff line change
Expand Up @@ -5004,8 +5004,8 @@ msgstr "Non, des mesures sont à ajouter au plan d’actions"
#: euphorie/content/utils.py:160
msgid "label_not_sufficient_integrated_ap"
msgstr ""
"Non, des mesures sont à ajouter au plan d’actions <strong>(à compléter ci-"
"dessous)</strong>"
"Non, des mesures sont à ajouter au plan d’actions (à compléter ci-"
"dessous)"

#. Default: "Notes"
#: euphorie/client/browser/templates/training-slides.pt:245
Expand Down
2 changes: 1 addition & 1 deletion src/euphorie/deployment/locales/sk/LC_MESSAGES/euphorie.po
Original file line number Diff line number Diff line change
Expand Up @@ -4872,7 +4872,7 @@ msgstr "Nie, sú potrebné ďalšie opatrenia"
#: euphorie/content/utils.py:160
msgid "label_not_sufficient_integrated_ap"
msgstr ""
"Nie, sú potrebné ďalšie opatrenia <strong>(pridajte ich ďalej)</strong>"
"Nie, sú potrebné ďalšie opatrenia (pridajte ich ďalej)"

#. Default: "Notes"
#: euphorie/client/browser/templates/training-slides.pt:245
Expand Down

0 comments on commit 352e76e

Please sign in to comment.