-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathadmin-tooltip-changes.patch
More file actions
148 lines (146 loc) · 10.2 KB
/
admin-tooltip-changes.patch
File metadata and controls
148 lines (146 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
diff --git a/laravel-backend/resources/views/admin/categories/index.blade.php b/laravel-backend/resources/views/admin/categories/index.blade.php
index 36fe00d..dd5c073 100644
--- a/laravel-backend/resources/views/admin/categories/index.blade.php
+++ b/laravel-backend/resources/views/admin/categories/index.blade.php
@@ -242,7 +242,7 @@
<td class="pl-4 align-middle">
<div class="category-name-cell">
<div class="d-flex flex-wrap align-items-center" style="gap:8px;">
- <span class="font-weight-bold" style="color:var(--dark-navy);">{{ $category->name }}</span>
+ <span class="font-weight-bold admin-truncate" style="color:var(--dark-navy);max-width:240px;" title="{{ $category->name }}" tabindex="0">{{ $category->name }}</span>
<span class="lnu-badge" style="background:#eff4fb;color:var(--navy);">
{{ $category->isRoot() ? 'Root' : 'Subcategory' }}
</span>
@@ -264,7 +264,7 @@
<span class="lnu-badge" style="background:#eaf2ff;color:var(--navy);">Good</span>
@endif
</td>
- <td class="align-middle text-muted">{{ $category->parent?->name ?? '--' }}</td>
+ <td class="align-middle text-muted"><span class="admin-truncate" style="max-width:180px;" title="{{ $category->parent?->name ?? '--' }}" tabindex="0">{{ $category->parent?->name ?? '--' }}</span></td>
<td class="align-middle text-center">{{ number_format($category->listings_count) }}</td>
<td class="align-middle text-center text-muted">{{ $category->sort_order }}</td>
<td class="align-middle text-center">
diff --git a/laravel-backend/resources/views/admin/layouts/app.blade.php b/laravel-backend/resources/views/admin/layouts/app.blade.php
index b2dd9a7..4c96d0e 100644
--- a/laravel-backend/resources/views/admin/layouts/app.blade.php
+++ b/laravel-backend/resources/views/admin/layouts/app.blade.php
@@ -977,6 +977,24 @@
line-height: 1.55;
}
+ .admin-truncate {
+ display: inline-block;
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ vertical-align: bottom;
+ }
+
+ .admin-truncate-block {
+ display: block;
+ }
+
+ [title].admin-truncate,
+ [title].admin-truncate-block {
+ cursor: help;
+ }
+
.admin-table-tools {
display: flex;
flex-wrap: wrap;
diff --git a/laravel-backend/resources/views/admin/listings/index.blade.php b/laravel-backend/resources/views/admin/listings/index.blade.php
index fcfff9e..dcc4c38 100644
--- a/laravel-backend/resources/views/admin/listings/index.blade.php
+++ b/laravel-backend/resources/views/admin/listings/index.blade.php
@@ -151,6 +151,7 @@
.thumb-preview{position:absolute;left:64px;top:50%;width:140px;height:140px;border-radius:20px;object-fit:cover;border:1px solid rgba(13,27,110,.12);background:#fff;box-shadow:0 18px 32px rgba(13,27,110,.16);opacity:0;pointer-events:none;transform:translateY(-50%) scale(.98);transition:opacity .2s ease,transform .2s ease;z-index:5}
.thumb-wrap:hover .thumb-preview{opacity:1;transform:translateY(-50%) scale(1)}
.listing-title,.seller-name,.price-value{color:var(--dark-navy);font-weight:700}
+ .listing-title,.seller-name,.listing-meta-text{display:block;max-width:220px}
.trait-pill,.status-pill,.type-pill{display:inline-flex;align-items:center;justify-content:center;padding:7px 12px;border-radius:999px;font-size:.76rem;font-weight:800;letter-spacing:.04em;text-transform:uppercase;white-space:nowrap}
.trait-pill{background:#eef3ff;color:var(--navy)}
.type-pill{background:#fff4db;color:#9a6700}
@@ -424,27 +425,31 @@
@endif
</div>
<div>
- <div class="listing-title">{{ $listing->title }}</div>
+ <div class="listing-title admin-truncate" title="{{ $listing->title }}" tabindex="0">{{ $listing->title }}</div>
<div class="listing-meta">
<span class="type-pill">{{ $isServiceListing ? 'Service' : 'Good' }}</span><br>
- {{ $rootCategory?->name ?? 'Uncategorized' }}@if ($subcategory) / {{ $subcategory->name }} @endif<br>
+ <span
+ class="listing-meta-text admin-truncate"
+ title="{{ ($rootCategory?->name ?? 'Uncategorized').($subcategory ? ' / '.$subcategory->name : '') }}"
+ tabindex="0"
+ >{{ $rootCategory?->name ?? 'Uncategorized' }}@if ($subcategory) / {{ $subcategory->name }} @endif</span><br>
ID #{{ $listing->id }}
</div>
</div>
</div>
</td>
<td>
- <div class="seller-name">{{ $listing->user?->fullName() ?? 'Unknown seller' }}</div>
- <div class="listing-meta">{{ $listing->user?->email ?? 'No email' }}<br>{{ $listing->user?->student_id ?? 'No student ID' }}</div>
+ <div class="seller-name admin-truncate" title="{{ $listing->user?->fullName() ?? 'Unknown seller' }}" tabindex="0">{{ $listing->user?->fullName() ?? 'Unknown seller' }}</div>
+ <div class="listing-meta"><span class="listing-meta-text admin-truncate" title="{{ $listing->user?->email ?? 'No email' }}" tabindex="0">{{ $listing->user?->email ?? 'No email' }}</span><br>{{ $listing->user?->student_id ?? 'No student ID' }}</div>
</td>
<td>
<div class="price-value">PHP {{ number_format((float) $listing->price, 2) }}</div>
<div class="listing-meta">{{ $listing->is_negotiable ? 'Negotiable' : 'Fixed price' }}</div>
</td>
<td>
- <span class="trait-pill">{{ $conditionOrServiceType }}</span>
+ <span class="trait-pill admin-truncate" style="max-width:220px;" title="{{ $conditionOrServiceType }}" tabindex="0">{{ $conditionOrServiceType }}</span>
@if ($isServiceListing && $hasServiceModeField && $serviceModeText)
- <div class="listing-meta" style="margin-top:6px;">{{ $serviceModeText }}</div>
+ <div class="listing-meta" style="margin-top:6px;"><span class="listing-meta-text admin-truncate" title="{{ $serviceModeText }}" tabindex="0">{{ $serviceModeText }}</span></div>
@endif
</td>
<td><span class="status-pill {{ $statusKey }}">{{ $statusText }}</span></td>
diff --git a/laravel-backend/resources/views/admin/reports/index.blade.php b/laravel-backend/resources/views/admin/reports/index.blade.php
index c5c6596..372e575 100644
--- a/laravel-backend/resources/views/admin/reports/index.blade.php
+++ b/laravel-backend/resources/views/admin/reports/index.blade.php
@@ -680,6 +680,14 @@
line-height: 1.45;
}
+ .reports-subject-name {
+ max-width: 180px;
+ }
+
+ .reports-reporter-name {
+ max-width: 180px;
+ }
+
.btn-view {
display: inline-flex;
align-items: center;
@@ -1250,7 +1258,11 @@
{{ strtoupper(substr($report['subject_name'] ?? 'U', 0, 1)) }}
</div>
<div>
- <div class="user-cell-name" style="max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;">
+ <div
+ class="user-cell-name admin-truncate admin-truncate-block reports-subject-name"
+ title="{{ $report['subject_name'] ?? '--' }}"
+ tabindex="0"
+ >
{{ $report['subject_name'] ?? '--' }}
</div>
@if ($report['type'] === 'listing' && ! empty($report['subject_price']))
@@ -1264,7 +1276,13 @@
<td>
<div class="user-cell">
<div class="mini-avatar">{{ strtoupper(substr($report['reporter_name'] ?? '?', 0, 1)) }}</div>
- <div class="user-cell-name">{{ $report['reporter_name'] ?? 'Unknown' }}</div>
+ <div
+ class="user-cell-name admin-truncate admin-truncate-block reports-reporter-name"
+ title="{{ $report['reporter_name'] ?? 'Unknown' }}"
+ tabindex="0"
+ >
+ {{ $report['reporter_name'] ?? 'Unknown' }}
+ </div>
</div>
</td>
<td>