<% if defined?(show_caption_credits) && show_caption_credits %>
<% if image.caption&.present? %>
-
+
<%= image.caption %>
<% end %>
diff --git a/app/views/spaces/_back_to_search_button.html.erb b/app/views/spaces/_back_to_search_button.html.erb
new file mode 100644
index 00000000..05936ff3
--- /dev/null
+++ b/app/views/spaces/_back_to_search_button.html.erb
@@ -0,0 +1,25 @@
+
+ <%= link_to spaces_path,
+ data: {
+ "turbo-frame": "spaces-open-here", # This updates the spaces-open-here frame
+ "turbo-action": "advance" # And updates browser history
+ },
+ class:"
+ show-only-if-inside-space-open-in-sidebar
+ inline-block
+ unstyled-link
+ rounded-xl
+ bg-white
+ hover:bg-lnu-pink focus:bg-lnu-pink
+ hover:text-white focus:text-white
+ hover:fill-white focus:fill-white
+ shadow-xl" do %>
+
+ <%= inline_svg "search" %> Tilbake til søket
+
+
+ <%= inline_svg "x" %> Lukk
+
+<% end %>
+
+
diff --git a/app/views/spaces/index.html.erb b/app/views/spaces/index.html.erb
index 0661bffb..cbc88f14 100644
--- a/app/views/spaces/index.html.erb
+++ b/app/views/spaces/index.html.erb
@@ -9,7 +9,9 @@
<%= render 'spaces/index/filters' %>
diff --git a/app/views/spaces/index/_map.html.erb b/app/views/spaces/index/_map.html.erb
index 7e6a512e..6dd71529 100644
--- a/app/views/spaces/index/_map.html.erb
+++ b/app/views/spaces/index/_map.html.erb
@@ -1,4 +1,4 @@
-
+
diff --git a/app/views/spaces/index/_space_listing.html.erb b/app/views/spaces/index/_space_listing.html.erb
index d7202f12..8474cdfd 100644
--- a/app/views/spaces/index/_space_listing.html.erb
+++ b/app/views/spaces/index/_space_listing.html.erb
@@ -2,7 +2,12 @@
Partial for rendering a space listing in the search results.
%>
-<%= link_to space_path(space), class: "unstyled-link space-listing" do %>
+<%= link_to space_path(space),
+ class: "unstyled-link space-listing",
+ data: {
+ "turbo-frame": "spaces-open-here", # This updates the spaces-open-here frame
+ "turbo-action": "advance" # And updates browser history
+ } do %>
diff --git a/app/views/spaces/show.html.erb b/app/views/spaces/show.html.erb
index f2510e8e..1b688aca 100644
--- a/app/views/spaces/show.html.erb
+++ b/app/views/spaces/show.html.erb
@@ -5,59 +5,64 @@
Styled in part by content.scss
%>
-
- <%= render partial: "spaces/show/image_header" %>
+<%= turbo_frame_tag "spaces-open-here", target: "_top" do %>
+ <%= render 'back_to_search_button' %>
+
+ <%= render partial: "spaces/show/image_header" %>
-
- <%= render partial: 'spaces/show/basics' %>
+
-
+ <%= render partial: 'spaces/show/basics' %>
- <%= inline_editable :how_to_book do %>
- <%= render_space_and_group_field @space, :how_to_book %>
- <% end %>
- <%= render 'space_contacts/index' %>
+
-
+ <%= inline_editable :how_to_book do %>
+ <%= render_space_and_group_field @space, :how_to_book %>
+ <% end %>
+ <%= render 'space_contacts/index' %>
- <%= render partial: 'spaces/show/facilities' %>
-
+
- <%= inline_editable :who_can_use do %>
- <%= render_space_and_group_field @space, :who_can_use %>
- <% end %>
-
+ <%= render partial: 'spaces/show/facilities' %>
+
- <%= inline_editable :pricing do %>
- <%= render_space_and_group_field @space, :pricing %>
- <% end %>
-
+ <%= inline_editable :who_can_use do %>
+ <%= render_space_and_group_field @space, :who_can_use %>
+ <% end %>
+
- <%= render partial: 'spaces/show/where' %>
-
+ <%= inline_editable :pricing do %>
+ <%= render_space_and_group_field @space, :pricing %>
+ <% end %>
+
- <%= inline_editable :more_info do %>
- <%= render_space_and_group_field @space, :more_info %>
- <% end %>
-
+ <%= render partial: 'spaces/show/where' %>
+
- <%= inline_editable :terms do %>
- <%= render_space_and_group_field @space, :terms %>
- <% end %>
-
+ <%= inline_editable :more_info do %>
+ <%= render_space_and_group_field @space, :more_info %>
+ <% end %>
+
- <%= render partial: 'spaces/show/reviews' %>
+ <%= inline_editable :terms do %>
+ <%= render_space_and_group_field @space, :terms %>
+ <% end %>
+
- <% if current_user&.admin? %>
-
-
- Admin:
-
- <%= link_to t("space_show.show_changelog"), admin_history_path(@space) %>
-
-
- <% end %>
+ <%= render partial: 'spaces/show/reviews' %>
+
+ <% if current_user&.admin? %>
+
+
+ Admin:
+
+ <%= link_to t("space_show.show_changelog"), admin_history_path(@space) %>
+
+
+ <% end %>
-
-
+
+
+<% end %>
diff --git a/app/views/spaces/show/_image_header.html.erb b/app/views/spaces/show/_image_header.html.erb
index 80bd4bb1..1918a1e4 100644
--- a/app/views/spaces/show/_image_header.html.erb
+++ b/app/views/spaces/show/_image_header.html.erb
@@ -8,12 +8,12 @@
link_to_fullscreen: true,
show_caption_credits: true
} %>
-
+
<%= render partial: 'spaces/show/image_header_upload_button' %>
-
+
<%= render partial: 'spaces/show/image_header_edit_button' %>
diff --git a/tailwind.config.js b/tailwind.config.js
index f9d39934..b9311ddb 100644
--- a/tailwind.config.js
+++ b/tailwind.config.js
@@ -32,7 +32,8 @@ module.exports = {
},
extend: {
screens: {
- 'xs': '360px'
+ 'xs': '360px',
+ '3xl': '1792px'
},
cursor: {
zoom: 'zoom-in'