diff --git a/assets/modern/pages.rcss b/assets/modern/pages.rcss index fc5f35d..aaf024b 100644 --- a/assets/modern/pages.rcss +++ b/assets/modern/pages.rcss @@ -428,3 +428,26 @@ body .pg-btn.pg-go:disabled {opacity:1;background-color:var(--p-a3);border-color .pg-root .pg-btn[disabled],.pg-ov .pg-btn[disabled] {opacity:1;background-color:var(--p-n2);border-color:var(--p-div);color:var(--p-n5);} body .pg-btn.pg-go[disabled] {opacity:1;background-color:var(--p-a3);border-color:var(--p-a3);color:var(--p-n1);} .pg-seg button[disabled],.pg-tabs button[disabled] {opacity:1;color:var(--p-n5);} + +/* --- the transfer market's dialogs --- */ +.tm-dialog-body {display:flex;flex-direction:column;gap:27dp;} +.pg-ov .tm-select {width:300dp;height:68dp;padding:0 27dp;border:2dp var(--p-div);border-radius:36dp;background-color:var(--p-n1);font-family:Modern;font-size:30dp;color:var(--p-text);} +.pg-ov .tm-select.wide {width:100%;} +.pg-ov .tm-range {display:block;flex:1;height:54dp;} +.tm-premiums {display:flex;flex-wrap:wrap;margin-top:12dp;} +.tm-premium {width:50%;height:62dp;padding-right:27dp;gap:14dp;font-size:28dp;} +.tm-premium span {display:block;} +.pg-ov .tm-small,.pg-root .tm-small {height:52dp;min-width:86dp;padding:0 20dp;font-size:27dp;} +.pg-ov .tm-small.round {width:52dp;min-width:52dp;padding:0;} +.tm-poach-clubs {display:flex;flex-wrap:wrap;gap:14dp;max-height:1000dp;overflow-y:auto;} +.pg-ov .tm-poach-club,.pg-ov .tm-poach-club:hover {flex-direction:row;align-items:center;gap:18dp;width:472dp;height:110dp;padding:0 27dp;font-family:Modern;font-size:30dp;} +.tm-poach-club span {display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;} +.tm-inline {display:flex;align-items:center;justify-content:flex-end;gap:12dp;} +.tm-inline span {display:block;} +.pg-kv strong .tm-inline {display:flex;align-items:center;justify-content:flex-end;gap:12dp;} +.pg-kv strong .tm-inline span {display:block;color:var(--p-text);} +.pg-kv strong .tm-inline .pg-pos {color:var(--p-n9);} +.pg-kv strong .tm-inline .pg-pos.STU {color:var(--p-n1);} +.pg-dlg .pg-empty {flex:none;} +/* an empty note is a block: bare text inside a flex box would not be drawn */ +.pg-empty {display:block;padding:72dp 54dp;} diff --git a/src/modern/ui/transfer_screens.inc b/src/modern/ui/transfer_screens.inc index acb7d94..aa3d85b 100644 --- a/src/modern/ui/transfer_screens.inc +++ b/src/modern/ui/transfer_screens.inc @@ -341,369 +341,187 @@ std::string App::render_transfer() { return out + "" + render_transfer_dialog(); } +// The dialogs of the transfer market: notes on the dimmed book. The ids of the fields and +// buttons are what the controls look up. std::string App::render_transfer_dialog() { if (transfer_dialog_.empty()) return {}; const auto snapshot = engine_mode_ ? Snapshot{} : snap(); const auto actor = engine_mode_ ? engine_data_.at("desktop").at("meta").at("scope").at("teamId").get() : transfer_ui_club(snapshot); - std::string title, body, actions; - double height = 500; - const auto button = [&](const char *action, const std::string &caption, - const std::string &attrs = "") { - return btn(action, esc(caption), "transfer-dialog-button", attrs); + std::string title, sub, body, actions; + double width = 460; + const auto button = [&](const char *action, const std::string &caption, const std::string &attrs = "", bool primary = false) { + return pg_button(action, esc(caption), primary ? "primary" : "", attrs); }; - const auto close = [&](const std::string &caption = "Abbruch") { - return button("transfer-close", caption, "id=\"transfer-close\""); + const auto close = [&](const std::string &caption = "Abbruch", bool primary = false) { return button("transfer-close", caption, "id=\"transfer-close\"", primary); }; + const auto portrait = [&](const Json &r, double size) { + return r.contains("photo") && r.at("photo").is_string() && !r.at("photo").get().empty() + ? "" + img(r.at("photo").get(), size, size, true, true, 400) + "" + : engine_mode_ ? "" + img("asset:player/generic/photo", size, size, true, true, 400) + "" : std::string(); }; + const auto fact = [](const std::string &label, const std::string &value) { return "
" + esc(label) + "" + value + "
"; }; if (transfer_dialog_ == "offer") { - height = 1210.5; + width = 600; const auto &d = transfer_draft_; const auto &r = d.at("row"); const auto kind = d.at("kind").get(); const bool loan = kind == "loan" || kind == "lend", mine = r.at("own"); - const std::map kinds{{"buy", "Kaufen"}, - {"loan", "Ausleihen"}, - {"sell", "Verkaufen"}, - {"lend", "Verleihen"}}; - title = - (d.at("poached") == true ? std::string("Abwerben") : kinds.at(kind)) + - " · " + r.at("name").get(); + const std::map kinds{{"buy", "Kaufen"}, {"loan", "Ausleihen"}, {"sell", "Verkaufen"}, {"lend", "Verleihen"}}; + title = (d.at("poached") == true ? std::string("Abwerben") : kinds.at(kind)) + " · " + r.at("name").get(); + const auto *club = world_->find("clubs", r.at("club")); const auto flag = ui_nation_flag_svg(transfer_ui_text(r.at("nation"), "")); - const auto flag_image = - flag.empty() - ? std::string("—") - : picture(renderer_.diagram("transfer-offer-flag", flag, 180), 60, - 40); - body = "
" + - flag_image + "
" + - esc(r.at("name").get()) + "" + - transfer_ui_role(r.at("position")) + " · " + - transfer_ui_number(r.at("age")) + " Jahre · Stärke " + - transfer_ui_number(r.at("strength")) + - "
" + - (world_->find("clubs",r.at("club"))?label(world_->find("clubs",r.at("club")),58):esc(r.value("club_name",std::string("—")))) + - "
" + - std::string(engine_mode_ ? "Ablöseforderung" : loan ? "Fiktive Leihgebühr" : "Ungefährer Marktwert") + - "" + esc(transfer_money(d.at("demand_fee").get())) + - "
" + - std::string(engine_mode_ ? "Gehaltsreferenz / Monat" : mine ? "Aktuelles Monatsgehalt" : "Gehaltswunsch") + - "" + - (d.at("demand_salary").is_number_integer() - ? esc(transfer_money(d.at("demand_salary").get())) - : "—") + - "

Dein " - "Angebot

"; + body = "
" + portrait(r, 162) + "
" + + fact("Verein", club ? esc(world_->name(*club)) : esc(r.value("club_name", std::string("—")))) + + fact("Position · Alter · Stärke", "" + pg_pos(transfer_ui_role(r.at("position"))) + (flag.empty() ? std::string() : picture(renderer_.diagram("transfer-offer-flag", flag, 180), 45, 30)) + "" + transfer_ui_number(r.at("age")) + " Jahre · " + transfer_ui_number(r.at("strength")) + "") + + fact(engine_mode_ ? "Ablöseforderung" : loan ? "Fiktive Leihgebühr" : "Ungefährer Marktwert", esc(transfer_money(d.at("demand_fee").get()))) + + fact(engine_mode_ ? "Gehaltsreferenz / Monat" : mine ? "Aktuelles Monatsgehalt" : "Gehaltswunsch", d.at("demand_salary").is_number_integer() ? esc(transfer_money(d.at("demand_salary").get())) : std::string("—")) + + "
" + pg_kicker("Dein Angebot"); for (int i = 0; i < 3; ++i) { const auto field = i == 0 ? "fee" : i == 1 ? "salary" : "months"; - const std::string caption = i == 0 ? (loan ? "Leihgebühr" : "Ablöse") - : i == 1 ? "Monatsgehalt" - : "Vertragsdauer"; - body += "
" + caption + ""; + const std::string caption = i == 0 ? (loan ? "Leihgebühr" : "Ablöse") : i == 1 ? "Monatsgehalt" : "Vertragsdauer"; + body += "
" + caption + ""; if (i < 2) - body += btn("transfer-amount", - esc(std::to_string(d.at(field).get())), - "transfer-amount-input amount-trigger", - "id=\"transfer-" + std::string(field) + "\" data-field=\"" + - field + "\" aria-label=\"" + caption + "\""); + body += pg_button("transfer-amount", "" + esc(number(d.at(field).get())) + " €", "amount-trigger", "id=\"transfer-" + std::string(field) + "\" data-field=\"" + field + "\" aria-label=\"" + caption + "\""); else { - body += ""; for (int months : {12, 24, 36, 48}) - if (!loan || months <= 24) - body += ""; + if (!loan || months <= 24) body += ""; body += ""; } body += "
"; } - body += "

Mannschaftsprämien für " - "diesen Vertrag

"; + body += "
" + pg_kicker("Mannschaftsprämien für diesen Vertrag") + "
"; for (int i = 0; i < 7; ++i) - body += - "
" + - std::string(transfer_ui_bonuses[size_t(i)]) + "" + - btn("transfer-bonus", transfer_ui_number(engine_mode_&&i>=3?Json(d.at("bonuses")[size_t(i)].get()*5):d.at("bonuses")[size_t(i)]), - "amount-trigger", - "id=\"transfer-bonus-" + std::to_string(i) + "\" data-index=\"" + - std::to_string(i) + "\"") + - "
"; - body += "

" + - std::string(engine_mode_ ? "Über das Angebot wird nach deiner Bestätigung entschieden. Die Konditionen werden erst beim Absenden verbindlich." : mine ? "Der Spieler wird zum " + - std::string(loan ? "Verleihen" : "Verkauf") + - " auf dem Markt vorgemerkt." - : "Das Angebot wird vorgemerkt; die Entscheidung " - "des Spielers folgt später.") + - "

"; - actions = - button("transfer-team-info", "Team-Info", "id=\"transfer-team-info\"") + - button("transfer-player-info", "Spieler-Info", - "id=\"transfer-player-info\"") + - close() + - button("transfer-submit", "Angebot", - "id=\"transfer-submit\" " + - std::string(d.value("can_submit", true) ? "" : "disabled")); + body += "
" + std::string(transfer_ui_bonuses[size_t(i)]) + "" + + btn("transfer-bonus", "" + transfer_ui_number(engine_mode_ && i >= 3 ? Json(d.at("bonuses")[size_t(i)].get() * 5) : d.at("bonuses")[size_t(i)]) + "", "pg-btn tm-small amount-trigger", + "id=\"transfer-bonus-" + std::to_string(i) + "\" data-index=\"" + std::to_string(i) + "\"") + "
"; + body += "" + + std::string(engine_mode_ ? "Über das Angebot wird nach deiner Bestätigung entschieden. Die Konditionen werden erst beim Absenden verbindlich." + : mine ? "Der Spieler wird zum " + std::string(loan ? "Verleihen" : "Verkauf") + " auf dem Markt vorgemerkt." : "Das Angebot wird vorgemerkt; die Entscheidung des Spielers folgt später.") + ""; + actions = button("transfer-team-info", "Team-Info", "id=\"transfer-team-info\"") + button("transfer-player-info", "Spieler-Info", "id=\"transfer-player-info\"") + "" + close() + + button("transfer-submit", "Angebot", "id=\"transfer-submit\" " + std::string(d.value("can_submit", true) ? "" : "disabled"), true); } else if (transfer_dialog_ == "search") { - height = 899; + width = 520; title = "Spieler suchen"; const auto &d = transfer_search_draft_; - body = "

Art

"; - const std::array, 4> ranges{ - {{"age_min", "Alter von"}, - {"age_max", "Alter bis"}, - {"strength_min", "Stärke von"}, - {"strength_max", "Stärke bis"}}}; + body = "
" + pg_kicker("Art") + "
"; + const std::array, 4> ranges{{{"age_min", "Alter von"}, {"age_max", "Alter bis"}, {"strength_min", "Stärke von"}, {"strength_max", "Stärke bis"}}}; for (int i = 0; i < 4; ++i) { const auto [key, caption] = ranges[size_t(i)]; - body += "
" + caption + - "" + - transfer_ui_number(d.at(key)) + "
"; + body += "
" + caption + "" + transfer_ui_number(d.at(key)) + "
"; } - body += "

Typ · " - "darauf achten

"; + body += "
Preisvorstellung bis" + + pg_button("transfer-search-budget", "" + esc(number(d.at("price_max").get())) + " €", "amount-trigger", "id=\"transfer-search-budget\" aria-label=\"Maximale Ablösesumme\"") + + "
" + pg_kicker("Typ · darauf achten") + "
"; for (int i = 0; i < 2; ++i) { const auto field = i ? "foot" : "type"; - const std::array names = - i ? std::array{"Beliebig", "Links", "Beidfüßig", - "Rechts"} - : std::array{"Beliebig", "Defensiv", - "Ausgeglichen", "Offensiv"}; - body += "
" + std::string(i ? "Spielseite" : "Spielweise") + - ""; - for (int n = 0; n < 4; ++n) - body += ""; + for (int n = 0; n < 4; ++n) body += ""; body += "
"; } - body += - "
Preisvorstellung bis" + - btn("transfer-search-budget", - esc(std::to_string(d.at("price_max").get())), - "amount-trigger", - "id=\"transfer-search-budget\" aria-label=\"Maximale " - "Ablösesumme\"") + - "
"; - actions = close() + - button("transfer-search-reset", "Zurücksetzen", - "id=\"transfer-search-reset\"") + - button("transfer-search-apply", "Suchen", - "id=\"transfer-search-apply\""); + body += ""; + actions = close() + button("transfer-search-reset", "Zurücksetzen", "id=\"transfer-search-reset\"") + button("transfer-search-apply", "Suchen", "id=\"transfer-search-apply\"", true); } else if (transfer_dialog_ == "player-info") { - height = 822; + width = 620; const auto &r = transfer_draft_.at("row"); title = r.at("name").get(); - body = "
" + - (r.at("photo").is_string() - ? img(r.at("photo"), 440, 550, true, true, 650) - : engine_mode_ ? img("asset:player/generic/photo",440,550,true,false,650) : "—") + - "
"; - const std::vector> facts{ - {"Verein", r.at("club_name")}, - {"Position", transfer_ui_role(r.at("position"))}, - {"Alter", transfer_ui_number(r.at("age")) + " Jahre"}, - {"Kondition", transfer_ui_number(r.at("condition"))}, - {"Technik", transfer_ui_number(r.at("technique"))}, - {"Form", transfer_ui_number(r.at("form"))}, - {"Stärke", transfer_ui_number(r.at("strength"))}, - {"Fuß", r.at("foot").is_number_integer() - ? std::array{"—", "Links", "Beidfüßig", - "Rechts"}[size_t( - r.at("foot").get())] - : "—"}, - {"Typ", r.at("type").is_number_integer() - ? std::array{"—", "Defensiv", "Ausgeglichen", - "Offensiv"}[size_t(r.at("type").get())] - : "—"}}; - for (size_t i = 0; i < facts.size(); ++i) - body += "
" + - esc(facts[i].first) + "" + esc(facts[i].second) + - "
"; - body += "
"; - actions = button("transfer-offer-back", "Zurück zum Angebot", - "id=\"transfer-offer-back\""); + sub = esc(r.at("club_name").get()); + const auto foot = r.at("foot").is_number_integer() ? std::array{"—", "Links", "Beidfüßig", "Rechts"}[size_t(r.at("foot").get())] : "—"; + const auto type = r.at("type").is_number_integer() ? std::array{"—", "Defensiv", "Ausgeglichen", "Offensiv"}[size_t(r.at("type").get())] : "—"; + body = "
" + portrait(r, 300) + "
" + + pg_stat("Alter", transfer_ui_number(r.at("age"))) + pg_stat("Stärke", transfer_ui_number(r.at("strength"))) + "
" + pg_stat("Kondition", transfer_ui_number(r.at("condition"))) + + pg_stat("Technik", transfer_ui_number(r.at("technique"))) + pg_stat("Form", transfer_ui_number(r.at("form"))) + "
" + fact("Position", "" + pg_pos(transfer_ui_role(r.at("position"))) + "") + fact("Fuß", foot) + fact("Typ", type) + + "
"; + actions = button("transfer-offer-back", "Zurück zum Angebot", "id=\"transfer-offer-back\"", true); } else if (transfer_dialog_ == "team-info") { - height = 800; + width = 420; title = "Team-Info"; - const auto values = engine_mode_ ? engine_transfer_value_.at("strengths") : demo_transfer_strengths( - snapshot.state, *world_, actor, demo_lineup_active(snapshot.state)); - body = "

" + - label(world_->find("clubs", actor), 58) + - "

MannschaftsteilAktiveTeam
"; + const auto values = engine_mode_ ? engine_transfer_value_.at("strengths") : demo_transfer_strengths(snapshot.state, *world_, actor, demo_lineup_active(snapshot.state)); + body = "
" + label(world_->find("clubs", actor), 58) + "
" + pg_th("Mannschaftsteil", 0) + pg_th("Aktive", 90, "r") + + pg_th("Team", 90, "r") + "
"; for (int i = 0; i < 4; ++i) - body += - "
" + - std::string(std::array{"Tor", "Abwehr", "Mittelfeld", - "Sturm"}[size_t(i)]) + - "" + transfer_ui_number(values.at("active")[size_t(i)]) + - "" + transfer_ui_number(values.at("team")[size_t(i)]) + - "
"; - body += "
"; - actions = button("transfer-offer-back", "Zurück zum Angebot", - "id=\"transfer-offer-back\""); + body += "
" + pg_td(std::array{"Tor", "Abwehr", "Mittelfeld", "Sturm"}[size_t(i)], 0) + pg_td("" + transfer_ui_number(values.at("active")[size_t(i)]) + "", 90, "r") + + pg_td(transfer_ui_number(values.at("team")[size_t(i)]), 90, "r") + "
"; + body += "
"; + actions = button("transfer-offer-back", "Zurück zum Angebot", "id=\"transfer-offer-back\"", true); } else if (transfer_dialog_ == "poach-clubs") { - height = 1141; + width = 900; title = "Spieler abwerben"; + sub = "Verein wählen, danach einen Spieler aus dessen Beispielkader."; const auto leagues = world_->leagues(); - if (transfer_poach_league_.empty() && !leagues.empty()) - transfer_poach_league_ = leagues[0]->at("id").get(); + if (transfer_poach_league_.empty() && !leagues.empty()) transfer_poach_league_ = leagues[0]->at("id").get(); const auto *league = world_->find("competitions", transfer_poach_league_); const auto country = league ? league->value("nation", "") : ""; - body = "

Verein wählen, danach einen " - "Spieler aus dessen Beispielkader.

"; - const auto clubs = world_->clubs(transfer_poach_league_); - for (size_t i = 0; i < clubs.size(); ++i) - body += btn( - "transfer-poach-club", label(clubs[i], 52), "", - "id=\"transfer-poach-club-" + - esc(clubs[i]->at("id").get()) + "\" data-club=\"" + - esc(clubs[i]->at("id").get()) + "\" style=\"" + - rect((i % 4) * 527, (i / 4) * 140, 511, 124) + "\" " + - std::string(clubs[i]->at("id") == actor ? "disabled" : "")); - body += "
"; + body += ""; + body += "
"; + for (const auto *club : world_->clubs(transfer_poach_league_)) + body += btn("transfer-poach-club", crest(club, 64) + "" + esc(world_->name(*club)) + "", "pg-card tm-poach-club", + "id=\"transfer-poach-club-" + esc(club->at("id").get()) + "\" data-club=\"" + esc(club->at("id").get()) + "\" " + std::string(club->at("id") == actor ? "disabled" : "")); + body += "
"; actions = close(); } else if (transfer_dialog_ == "poach-roster") { - height = 1400; + width = 720; const auto *club = world_->find("clubs", transfer_poach_club_); title = "Abwerben · " + std::string(club ? world_->name(*club) : "—"); - const auto rows = demo_transfer_roster(snapshot.state, *world_, actor, - transfer_poach_club_); - body = "
SpielerPos.AlterStärkeMarktwert
"; + const auto rows = demo_transfer_roster(snapshot.state, *world_, actor, transfer_poach_club_); + body = "
" + pg_th("Spieler", 0) + pg_th("Pos.", 70) + pg_th("Alter", 70, "r") + pg_th("Stärke", 80, "r") + pg_th("Marktwert", 170, "r") + + "
"; if (rows.value("ok", false)) for (const auto &r : rows.at("rows")) - body += - "
" + - btn("transfer-poach-player", esc(r.at("name").get()), - "", - "id=\"transfer-poach-player-" + - esc(r.at("id").get()) + "\" data-player=\"" + - esc(r.at("id").get()) + "\"") + - "" + transfer_ui_role(r.at("position")) + "" + - transfer_ui_number(r.at("age")) + "" + - transfer_ui_number(r.at("strength")) + "" + - esc(transfer_money((r.at("fee").get() * 3 + 1) / 2)) + - "
"; - body += "
"; - actions = button("transfer-poach-back", "Zurück zu Vereinen", - "id=\"transfer-poach-back\"") + - close(); + body += "
" + pg_td(btn("transfer-poach-player", "" + esc(r.at("name").get()) + "", "pg-link", "id=\"transfer-poach-player-" + esc(r.at("id").get()) + "\" data-player=\"" + + esc(r.at("id").get()) + "\""), 0, "", true) + pg_td(pg_pos(transfer_ui_role(r.at("position"))), 70, "", true) + pg_td(transfer_ui_number(r.at("age")), 70, "r") + pg_td("" + transfer_ui_number(r.at("strength")) + "", 80, "r") + + pg_td(esc(transfer_money((r.at("fee").get() * 3 + 1) / 2)), 170, "r") + "
"; + body += "
"; + actions = button("transfer-poach-back", "Zurück zu Vereinen", "id=\"transfer-poach-back\"") + close(); } else if (transfer_dialog_ == "orders") { + width = 680; title = "Vorgemerkte Transferaufträge"; - const auto rows = - transfer_data().at("orders"); - height = rows.empty() ? 430 : std::min(1450., 352. + rows.size() * 74.); - body = "
"; - if (rows.empty()) - body += "

Noch keine Transferaufträge vorgemerkt.

"; + const auto rows = transfer_data().at("orders"); + if (rows.empty()) body = "
Noch keine Transferaufträge vorgemerkt.
"; else { - body += "
SpielerArtBetragLaufzeit
"; - const std::map kinds{{"buy", "Kaufen"}, - {"loan", "Ausleihen"}, - {"sell", "Verkaufen"}, - {"lend", "Verleihen"}}; + body = "
" + pg_th("Spieler", 0) + pg_th("Art", 110) + pg_th("Betrag", 170, "r") + pg_th("Laufzeit", 120, "r") + pg_th("", 60) + + "
"; + const std::map kinds{{"buy", "Kaufen"}, {"loan", "Ausleihen"}, {"sell", "Verkaufen"}, {"lend", "Verleihen"}}; for (size_t i = 0; i < rows.size(); ++i) { const auto &o = rows[i]; - body += - "
" + - esc(o.at("name").get()) + "" + - esc(engine_mode_ ? "Gebot" : o.at("poached") == true ? "Abwerben" : kinds.at(o.at("kind"))) + - "" + esc(transfer_money(o.at("fee").get())) + - "" + std::to_string(o.at("months").get()) + - " Monate" + - btn("transfer-order-delete", "×", "", - "id=\"transfer-order-delete-" + std::to_string(i) + - "\" data-index=\"" + std::to_string(i) + - "\" aria-label=\"Auftrag zurücknehmen\" " + std::string(engine_mode_?"disabled title=\"Noch nicht angebunden\"":"")) + - "
"; + body += "
" + pg_td("" + esc(o.at("name").get()) + "", 0) + pg_td(esc(engine_mode_ ? "Gebot" : o.at("poached") == true ? "Abwerben" : kinds.at(o.at("kind"))), 110) + + pg_td(esc(transfer_money(o.at("fee").get())), 170, "r") + pg_td(std::to_string(o.at("months").get()) + " Monate", 120, "r") + + pg_td(btn("transfer-order-delete", "×", "pg-btn round tm-small", "id=\"transfer-order-delete-" + std::to_string(i) + "\" data-index=\"" + std::to_string(i) + "\" aria-label=\"Auftrag zurücknehmen\" " + + std::string(engine_mode_ ? "disabled title=\"Noch nicht angebunden\"" : "")), 60, "r", true) + "
"; } + body += "
"; } - body += "
"; - actions = close("Zurück"); + actions = close("Schließen", true); } else { - title = transfer_dialog_ == "booked" ? (engine_mode_ ? "Transferauftrag" : "Auftrag vorgemerkt") - : "Transferliste voll"; - body = "

" + esc(transfer_notice_) + "

"; - actions = close("Verstanden"); + title = transfer_dialog_ == "booked" ? (engine_mode_ ? "Transferauftrag" : "Auftrag vorgemerkt") : "Transferliste voll"; + body = "

" + esc(transfer_notice_) + "

"; + actions = close("Verstanden", true); } - return "

" + - esc(title) + - "

" + body + - "
"; + return "

" + esc(title) + "

" + (sub.empty() ? std::string() : "" + sub + "") + "
" + body + "
"; }