Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Preview website button - Fixes #1327 #1331

Merged
merged 1 commit into from
Oct 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<div class="text-left truncate"><%= navigation_item.menu_title %></div>

<% if navigation_item.url_kind? %>
<%= link_to navigation_item.url, target: :blank, class: "h-7 flex items-center pl-1 text-gray-400 hover:text-gray-700" do %>
<%= link_to navigation_item.url, class: "h-7 flex items-center pl-1 text-gray-400 hover:text-gray-700" do %>
<%= heroicon("external-link", style: :mini, class: "w-4 h-4") %>
<% end %>
<% end %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/spina/admin/pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<% if @page.draft? %>
<span class="text-gray-400 ml-2 text-sm">(<%= Spina::Page.human_attribute_name(:draft) %>)</span>
<% end %>
<%= link_to @page.materialized_path(locale: @locale), class: 'px-3 py-2 flex items-center text-gray-400 hover:text-gray-700', target: :blank, data: {turbo: false} do %>
<%= link_to @page.materialized_path(locale: @locale), class: 'px-3 py-2 flex items-center text-gray-400 hover:text-gray-700', data: {turbo: false} do %>
<%= heroicon("external-link", style: :mini, class: "w-4 h-4") %>
<% end %>
<% end %>
Expand Down
7 changes: 7 additions & 0 deletions app/views/spina/admin/pages/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,4 +1,11 @@
<%= render Spina::UserInterface::HeaderComponent.new do |header| %>
<% header.with_after_breadcrumbs do %>
<%= link_to "/", class: 'px-3 py-1.5 flex items-center text-gray-400 hover:text-gray-700', data: {turbo: false} do %>
<%= heroicon("external-link", style: :mini, class: "w-4 h-4") %>
<span class="text-sm ml-1"><%=t "spina.preview_website" %></span>
<% end %>
<% end %>

<% header.with_actions do %>
<% if @resource %>
<%= link_to spina.edit_admin_resource_path(@resource), class: 'btn btn-default' do %>
Expand Down