Files
openproject/app/components/work_packages/split_view_component.html.erb
T
Behrokh Satarnejad 105930d4a5 [56919] Make notification center split screen resizable (#16437)
* change width of split screen

* make the content container flex

* add an input for resizer to select the resizer element with its id

* make the right side content resaizable with a grid parent

Changes

* select the split view as the resizer

* Pass resizer class as input rather than override

---------

Co-authored-by: Oliver Günther <mail@oliverguenther.de>
2024-08-15 16:43:32 +02:00

30 lines
1.1 KiB
Plaintext

<%=
component_wrapper(class: "op-work-package-split-view") do
flex_layout(h: :full) do |flex|
if @work_package.nil?
flex.with_row do
render(Primer::Beta::Blankslate.new(spacious: true)) do |component|
component.with_visual_icon(icon: :inbox)
component.with_heading(tag: :h2).with_content(
I18n.t(:error_work_package_id_not_found)
)
end
end
else
flex.with_row do
render(WorkPackages::Details::TabComponent.new(work_package: @work_package, tab: @tab, base_route: @base_route))
end
flex.with_row(flex: 1) do
helpers.angular_component_tag "opce-wp-split-view",
inputs: {
work_package_id: params[:work_package_id] || @work_package.id,
resizerClass: "op-work-package-split-view",
resizeStyle: "width",
activeTab: @tab
}
end
end
end
end
%>