mirror of
https://github.com/pcvolkmer/osc-variant.git
synced 2025-04-20 20:26:50 +00:00
Styled name and revision in content listing
This commit is contained in:
parent
11b233b642
commit
014fca2169
@ -22,6 +22,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use console::style;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::model::{Listable, Ordner, Sortable};
|
use crate::model::{Listable, Ordner, Sortable};
|
||||||
@ -59,7 +60,8 @@ impl Listable for DataCatalogue {
|
|||||||
fn to_listed_string(&self) -> String {
|
fn to_listed_string(&self) -> String {
|
||||||
format!(
|
format!(
|
||||||
"Datenkatalog '{}' in Revision '{}'",
|
"Datenkatalog '{}' in Revision '{}'",
|
||||||
self.name, self.revision
|
style(&self.name).yellow(),
|
||||||
|
style(&self.revision).yellow()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use console::style;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::model::{
|
use crate::model::{
|
||||||
@ -179,7 +180,11 @@ impl FormEntryContainer for DataForm {
|
|||||||
|
|
||||||
impl Listable for DataForm {
|
impl Listable for DataForm {
|
||||||
fn to_listed_string(&self) -> String {
|
fn to_listed_string(&self) -> String {
|
||||||
format!("Formular '{}' in Revision '{}'", self.name, self.revision)
|
format!(
|
||||||
|
"Formular '{}' in Revision '{}'",
|
||||||
|
style(&self.name).yellow(),
|
||||||
|
style(&self.revision).yellow()
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -55,7 +55,7 @@ impl OnkostarEditor {
|
|||||||
|
|
||||||
pub fn print_list(&self) {
|
pub fn print_list(&self) {
|
||||||
println!(
|
println!(
|
||||||
"Die Datei wurde am {} mit {} in Version {} erstellt.\n\nFolgende Inhalte sind gespeichert\n",
|
"Die Datei wurde am {} mit {} in Version {} erstellt.\n\nFolgende Inhalte sind gespeichert",
|
||||||
style(&self.info_xml.datum_xml).yellow(),
|
style(&self.info_xml.datum_xml).yellow(),
|
||||||
style(&self.info_xml.name).yellow(),
|
style(&self.info_xml.name).yellow(),
|
||||||
style(&self.info_xml.version).yellow()
|
style(&self.info_xml.version).yellow()
|
||||||
|
@ -22,6 +22,7 @@
|
|||||||
* SOFTWARE.
|
* SOFTWARE.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use console::style;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use crate::model::{Listable, Ordner, Sortable};
|
use crate::model::{Listable, Ordner, Sortable};
|
||||||
@ -56,7 +57,8 @@ impl Listable for PropertyCatalogue {
|
|||||||
fn to_listed_string(&self) -> String {
|
fn to_listed_string(&self) -> String {
|
||||||
format!(
|
format!(
|
||||||
"Merkmalskatalog '{}' in Revision '{}'",
|
"Merkmalskatalog '{}' in Revision '{}'",
|
||||||
self.name, self.revision
|
style(&self.name).yellow(),
|
||||||
|
style(&self.revision).yellow()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -194,14 +194,15 @@ impl Listable for Unterformular {
|
|||||||
if self.hat_unterformulare {
|
if self.hat_unterformulare {
|
||||||
return format!(
|
return format!(
|
||||||
"Unterformular '{}' in Revision '{}' {}",
|
"Unterformular '{}' in Revision '{}' {}",
|
||||||
self.name,
|
style(&self.name).yellow(),
|
||||||
self.revision,
|
style(&self.revision).yellow(),
|
||||||
style("Unterformular mit Markierung 'hat Unterformulare'!").red()
|
style("Unterformular mit Markierung 'hat Unterformulare'!").red()
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
format!(
|
format!(
|
||||||
"Unterformular '{}' in Revision '{}'",
|
"Unterformular '{}' in Revision '{}'",
|
||||||
self.name, self.revision
|
style(&self.name).yellow(),
|
||||||
|
style(&self.revision).yellow()
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user