rename template

This commit is contained in:
Pete Matsyburka committed 2026-09-23 10:59:54 +03:00
1 parent 9678cd1286
commit ca009252ac
8 files changed
+159 -34

No files matched your search

+14 -1
View File
@@ -2,8 +2,21 @@
<div class="relative flex items-start justify-between w-full space-x-0">
<div>
<div id="template_title" class="flex">
<% name_html = capture do %><% template.name.split(/(_)/).each do |item| %><%= item %><wbr><% end %><% end %>
<h1 class="text-3xl md:text-[2em] font-semibold" style="overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2;">
<% template.name.split(/(_)/).each do |item| %><%= item %><wbr><% end %>
<% if turbo_native_app? && !template.archived_at? && can?(:update, template) %>
<form-prompt>
<native-action data-placement="title" data-label="<%= t('name') %>">
<%= form_for template, url: template_path(template), method: :put, html: { class: 'hidden' } do |f| %>
<%= f.label :name, t('name') %>
<%= f.hidden_field :name %>
<% end %>
</native-action>
<%= name_html %>
</form-prompt>
<% else %>
<%= name_html %>
<% end %>
<% if template.archived_at? %>
<span class="ml-1 badge badge-outline badge-lg align-middle hidden md:inline-flex"><%= t('archived') %></span>
<% end %>