Skip to content

Commit

Permalink
Preview website button - Fixes #1327
Browse files Browse the repository at this point in the history
  • Loading branch information
Bramjetten committed Oct 19, 2023
1 parent eae8bc6 commit 2567422
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
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

0 comments on commit 2567422

Please sign in to comment.