aboutsummaryrefslogtreecommitdiff
path: root/src/tui/ui.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tui/ui.rs')
-rw-r--r--src/tui/ui.rs14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/tui/ui.rs b/src/tui/ui.rs
index 69ca058..2180838 100644
--- a/src/tui/ui.rs
+++ b/src/tui/ui.rs
@@ -18,6 +18,7 @@
use std::path::PathBuf;
use super::popup::{PopupArea, PopupItem};
+use crate::bibiman::bibisetup::CustomField;
use crate::bibiman::entries::EntryTableColumn;
use crate::bibiman::{CurrentArea, FormerArea};
use crate::cliargs::CLIArgs;
@@ -623,6 +624,15 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
.fg(cfg.colors.main_text_color)
.bg(cfg.colors.bar_bg_color);
+ let custom_col_title: &str = match cfg.general.custom_column {
+ CustomField::Journaltitle => "Journaltitle",
+ CustomField::Organization => "Organization",
+ CustomField::Institution => "Institution",
+ CustomField::Series => "Series",
+ CustomField::Publisher => "Publisher",
+ CustomField::Pubtype => "Pubtype",
+ };
+
let header = Row::new(vec![
Cell::from(Line::from("Res.")).bg(cfg.colors.bar_bg_color),
Cell::from(
@@ -705,7 +715,7 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
),
),
Cell::from(
- Line::from(vec![{ Span::raw("Pubtype") }, {
+ Line::from(vec![{ Span::raw(custom_col_title) }, {
if let Some(EntryTableColumn::Pubtype) =
app.bibiman.entry_table.entry_table_sorted_by_col
{
@@ -786,7 +796,7 @@ pub fn render_entrytable(app: &mut App, cfg: &BibiConfig, frame: &mut Frame, rec
Cell::from(Line::from(item.authors)),
Cell::from(Line::from(item.title)),
Cell::from(Line::from(item.year)),
- Cell::from(Line::from(item.pubtype)),
+ Cell::from(Line::from(item.custom_field_value)),
]);
// let row = item