merge details into main box, drop collapsable part
This commit is contained in:
parent
9fdce50cbb
commit
d8300e91cb
@ -196,6 +196,9 @@ var AppointmentDescription = {
|
|||||||
return m(".cte-description", [
|
return m(".cte-description", [
|
||||||
m("h1", item.base.caption),
|
m("h1", item.base.caption),
|
||||||
m("h2", note_parts.join(" | ")),
|
m("h2", note_parts.join(" | ")),
|
||||||
|
format_information(item),
|
||||||
|
m(AppointmentLocation,{item, settings}),
|
||||||
|
m(AppointmentLink, {item, settings}),
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -322,51 +325,6 @@ var AppointmentLink = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function AppointmentDetails() {
|
|
||||||
let collapsed = true;
|
|
||||||
|
|
||||||
function toggle() {
|
|
||||||
collapsed = !collapsed;
|
|
||||||
}
|
|
||||||
|
|
||||||
return {
|
|
||||||
view: function(vnode) {
|
|
||||||
const {item, settings} = vnode.attrs;
|
|
||||||
|
|
||||||
const show_details = item.base.information /* || item.base.address?.meetingAt || item.base.address?.street */ || item.base.link;
|
|
||||||
|
|
||||||
if (!show_details) {
|
|
||||||
return m("[");
|
|
||||||
}
|
|
||||||
return m(
|
|
||||||
".cte-details-collapser",
|
|
||||||
{
|
|
||||||
class: collapsed ? "collapsed" : "",
|
|
||||||
},
|
|
||||||
[
|
|
||||||
m(".cte-details", [
|
|
||||||
m(".cte-information-group", [
|
|
||||||
m("h3.cte-information-label", "Beschreibung"),
|
|
||||||
m(".cte-information", [
|
|
||||||
format_information(item),
|
|
||||||
m(AppointmentLocation,{item, settings}),
|
|
||||||
m(AppointmentLink, {item, settings}),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
]),
|
|
||||||
m(
|
|
||||||
"button.toggle-collapse",
|
|
||||||
{onclick: toggle},
|
|
||||||
collapsed ? "Details anzeigen" : "Details verbergen",
|
|
||||||
" ",
|
|
||||||
fa_solid_icon(settings, collapsed ? "chevron-down" : "chevron-up"),
|
|
||||||
),
|
|
||||||
],
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
var Appointment = {
|
var Appointment = {
|
||||||
view: function(vnode) {
|
view: function(vnode) {
|
||||||
const {item, settings} = vnode.attrs;
|
const {item, settings} = vnode.attrs;
|
||||||
@ -379,7 +337,6 @@ var Appointment = {
|
|||||||
m(AppointmentDescription, {item, settings}),
|
m(AppointmentDescription, {item, settings}),
|
||||||
]),
|
]),
|
||||||
]),
|
]),
|
||||||
m(AppointmentDetails, {item, settings}),
|
|
||||||
])
|
])
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user