diff --git a/app/Console/Commands/ImportHtmlTemplates.php b/app/Console/Commands/ImportHtmlTemplates.php
index 2009896..1ec6a59 100644
--- a/app/Console/Commands/ImportHtmlTemplates.php
+++ b/app/Console/Commands/ImportHtmlTemplates.php
@@ -323,6 +323,11 @@ class ImportHtmlTemplates extends Command
if (str_starts_with($path, 'assets/')) {
$sourcePath = public_path('html/' . $path);
+ // Eğer html/assets altında yoksa, ana assets klasörüne bak
+ if (!File::exists($sourcePath)) {
+ $sourcePath = public_path($path);
+ }
+
if (File::exists($sourcePath)) {
// Dosya adını ve klasörünü belirle
$fileName = basename($path);
@@ -344,7 +349,7 @@ class ImportHtmlTemplates extends Command
}
// Dosya bulunamadıysa eski usul devam et
- return '/html/' . $path;
+ return '/' . $path;
}
return $path;
@@ -361,13 +366,13 @@ class ImportHtmlTemplates extends Command
// CSS içindeki url('assets/...') kısımlarını yakalamak için daha genel bir yaklaşım
// Ancak processNode zaten img taglerini hallettiği için burası sadece kalanlar için.
- $html = str_replace('src="assets/', 'src="/html/assets/', $html);
- $html = str_replace('href="assets/', 'href="/html/assets/', $html);
- $html = str_replace("src='assets/", "src='/html/assets/", $html);
- $html = str_replace("href='assets/", "href='/html/assets/", $html);
- $html = str_replace('url(assets/', 'url(/html/assets/', $html);
- $html = str_replace('url("assets/', 'url("/html/assets/', $html);
- $html = str_replace("url('assets/", "url('/html/assets/", $html);
+ $html = str_replace('src="assets/', 'src="/assets/', $html);
+ $html = str_replace('href="assets/', 'href="/assets/', $html);
+ $html = str_replace("src='assets/", "src='/assets/", $html);
+ $html = str_replace("href='assets/", "href='/assets/", $html);
+ $html = str_replace('url(assets/', 'url(/assets/', $html);
+ $html = str_replace('url("assets/', 'url("/assets/', $html);
+ $html = str_replace("url('assets/", "url('/assets/", $html);
return $html;
}
diff --git a/app/Services/TemplateService.php b/app/Services/TemplateService.php
index 650e38a..b703149 100644
--- a/app/Services/TemplateService.php
+++ b/app/Services/TemplateService.php
@@ -641,6 +641,11 @@ class TemplateService
if (str_starts_with($value, 'templates/')) {
return asset('storage/' . $value);
}
+
+ // Support for old assets/ path (if import not run)
+ if (str_starts_with($value, 'assets/')) {
+ return asset($value);
+ }
// If it's already using asset() or Storage::url(), assume it's already formatted
// Otherwise, prepend storage/ if it looks like a storage path
diff --git a/lang/en/section-templates.php b/lang/en/section-templates.php
index 58b847d..fbc3233 100644
--- a/lang/en/section-templates.php
+++ b/lang/en/section-templates.php
@@ -26,6 +26,7 @@ return [
'column_deleted_at' => 'Deleted At',
// Actions
+ 'action_preview' => 'Preview',
'create' => 'New Section Template',
'edit' => 'Edit Section Template',
'view' => 'View Section Template',
@@ -39,4 +40,3 @@ return [
'deleted_successfully' => 'Section template deleted successfully.',
'restored_successfully' => 'Section template restored successfully.',
];
-
diff --git a/lang/tr/section-templates.php b/lang/tr/section-templates.php
index acc6a24..d609a1e 100644
--- a/lang/tr/section-templates.php
+++ b/lang/tr/section-templates.php
@@ -26,6 +26,7 @@ return [
'column_deleted_at' => 'Silinme',
// Actions
+ 'action_preview' => 'Önizleme',
'create' => 'Yeni Section Şablonu',
'edit' => 'Section Şablonunu Düzenle',
'view' => 'Section Şablonunu Görüntüle',
@@ -39,4 +40,3 @@ return [
'deleted_successfully' => 'Section şablonu başarıyla silindi.',
'restored_successfully' => 'Section şablonu başarıyla geri yüklendi.',
];
-