From 54cea88486b81cb39e0238494028c28f0e3f7ab2 Mon Sep 17 00:00:00 2001 From: Paul-Christian Volkmer Date: Sun, 3 Sep 2023 13:58:28 +0200 Subject: [PATCH] Inline additional information about subform mark --- src/model/unterformular.rs | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/src/model/unterformular.rs b/src/model/unterformular.rs index d83cfce..0d8fd1c 100644 --- a/src/model/unterformular.rs +++ b/src/model/unterformular.rs @@ -202,26 +202,19 @@ impl FormEntryContainer for Unterformular { impl Listable for Unterformular { fn to_listed_string(&self) -> String { - if self.hat_unterformulare { - return format!( - "Unterformular ({}) '{}' in Revision '{}' {}", - match self.is_system_library_content() { - true => style("S").yellow(), - _ => style("u"), - }, - style(&self.name).yellow(), - style(&self.revision).yellow(), - style("Unterformular mit Markierung 'hat Unterformulare'!").red() - ); - } format!( - "Unterformular ({}) '{}' in Revision '{}'", + "Unterformular ({}) '{}' in Revision '{}' {}", match self.is_system_library_content() { true => style("S").yellow(), _ => style("u"), }, style(&self.name).yellow(), - style(&self.revision).yellow() + style(&self.revision).yellow(), + if self.hat_unterformulare { + style("Unterformular mit Markierung 'hat Unterformulare'!").red() + } else { + style("") + } ) } }