|
1 | 1 | <% content_for :title, "Languages" %> |
2 | 2 |
|
3 | | -<div class="min-h-screen py-8 bg-gradient-page"> |
4 | | - <div class="max-w-7xl mx-auto px-4 overflow-x-hidden"> |
| 3 | +<div class="bg-gradient-page page-container"> |
| 4 | + <div class="content-wrapper"> |
5 | 5 |
|
6 | 6 | <!-- Header Section --> |
7 | | - <div class="mb-8"> |
8 | | - <div class="flex justify-between items-center mb-6 flex-wrap gap-4"> |
| 7 | + <div class="section-spacing"> |
| 8 | + <div class="flex-between-wrap mb-6"> |
9 | 9 | <div class="min-w-0 flex-1"> |
10 | 10 | <div class="flex items-center gap-4 mb-2"> |
11 | 11 | <div class="bg-gradient-blue text-white p-3 rounded-xl flex-shrink-0"> |
12 | | - <svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 12 | + <svg class="icon-size-md" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
13 | 13 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"/> |
14 | 14 | </svg> |
15 | 15 | </div> |
16 | | - <h1 class="text-4xl font-bold text-gray-900 m-0 min-w-0">Languages</h1> |
| 16 | + <h1 class="text-4xl font-bold text-gray-800 m-0 min-w-0">Languages</h1> |
17 | 17 | </div> |
18 | 18 | <p class="text-gray-500 m-0 text-base">Manage system languages and their file storage configurations</p> |
19 | 19 | </div> |
20 | 20 |
|
21 | | - <%= link_to new_language_path, class: "bg-gradient-blue shadow-blue text-white px-7 py-3.5 rounded-xl no-underline font-semibold text-sm inline-flex items-center gap-2 transition-all duration-200 hover:-translate-y-0.5 hover:shadow-blue-lg", data: {turbo: false } do %> |
22 | | - <svg class="w-4.5 h-4.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 21 | + <%= link_to new_language_path, class: "bg-gradient-blue text-white py-3.5 px-7 rounded-xl no-underline font-semibold text-sm inline-flex items-center gap-2 shadow-blue transition-all hover:-translate-y-0.5", data: {turbo: false } do %> |
| 22 | + <svg class="icon-size" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
23 | 23 | <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M12 4v16m8-8H4"></path> |
24 | 24 | </svg> |
25 | 25 | <span>Add New Language</span> |
26 | 26 | <% end %> |
27 | 27 | </div> |
28 | 28 | </div> |
29 | 29 |
|
30 | | - <!-- Table Card --> |
31 | | - <div class="bg-white rounded-2xl shadow-md overflow-hidden"> |
32 | | - <div class="overflow-x-auto"> |
| 30 | + <!-- Languages Table Card --> |
| 31 | + <div class="card-elevated overflow-hidden"> |
| 32 | + <div class="table-container overflow-x-auto"> |
33 | 33 | <table class="w-full border-collapse"> |
34 | 34 | <thead> |
35 | | - <tr class="bg-gradient-gray border-b-2 border-gray-200"> |
36 | | - <th class="px-6 py-5 text-left text-xs font-bold text-gray-600 uppercase tracking-wider">Name</th> |
37 | | - <th class="px-6 py-5 text-left text-xs font-bold text-gray-600 uppercase tracking-wider">File Share Folder</th> |
38 | | - <th class="px-6 py-5 text-right text-xs font-bold text-gray-600 uppercase tracking-wider">Actions</th> |
| 35 | + <tr class="table-header"> |
| 36 | + <th class="table-cell text-left">Name</th> |
| 37 | + <th class="table-cell text-left">File Share Folder</th> |
| 38 | + <th class="table-cell text-right">Actions</th> |
39 | 39 | </tr> |
40 | 40 | </thead> |
41 | 41 | <tbody> |
42 | 42 | <% if @languages.any? %> |
43 | 43 | <% @languages.each_with_index do |language, index| %> |
44 | | - <tr class="border-b border-gray-100 transition-all duration-200 hover:bg-gray-50 group"> |
45 | | - <td class="px-6 py-5"> |
| 44 | + <tr class="border-b border-gray-100 transition-all hover:bg-gray-50"> |
| 45 | + <td class="table-cell"> |
46 | 46 | <div class="flex items-center gap-3"> |
47 | 47 | <div> |
48 | 48 | <div class="font-semibold text-gray-900 text-sm"><%= language.name.capitalize %></div> |
49 | 49 | </div> |
50 | 50 | </div> |
51 | 51 | </td> |
52 | | - <td class="px-6 py-5"> |
53 | | - <span class="bg-gray-100 text-gray-600 px-3 py-1 rounded-full text-xs font-medium font-mono"> |
| 52 | + <td class="table-cell"> |
| 53 | + <span class="bg-gray-100 text-gray-600 py-1 px-3 rounded-full text-xs font-medium font-mono"> |
54 | 54 | <%= language.file_storage_prefix.present? ? language.file_storage_prefix : 'Not configured' %> |
55 | 55 | </span> |
56 | 56 | </td> |
57 | | - <td class="px-6 py-5 text-right"> |
58 | | - <%= link_to edit_language_path(language), class: "bg-gray-500 text-white px-4 py-2 rounded-md no-underline text-xs font-semibold inline-flex items-center gap-1.5 transition-all duration-200 hover:bg-gray-600 hover:-translate-y-px" do %> |
59 | | - <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
60 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path> |
61 | | - </svg> |
62 | | - <span>Edit</span> |
63 | | - <% end %> |
| 57 | + <td class="table-cell text-right"> |
| 58 | + <div class="flex gap-2 justify-end"> |
| 59 | + <%= link_to edit_language_path(language), class: "btn-edit" do %> |
| 60 | + <svg class="w-3.5 h-3.5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
| 61 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M11 5H6a2 2 0 00-2 2v11a2 2 0 002 2h11a2 2 0 002-2v-5m-1.414-9.414a2 2 0 112.828 2.828L11.828 15H9v-2.828l8.586-8.586z"></path> |
| 62 | + </svg> |
| 63 | + <span>Edit</span> |
| 64 | + <% end %> |
| 65 | + </div> |
64 | 66 | </td> |
65 | 67 | </tr> |
66 | 68 | <% end %> |
67 | 69 | <% else %> |
68 | 70 | <tr> |
69 | | - <td colspan="3" class="px-6 py-12 text-center"> |
| 71 | + <td colspan="3" class="empty-state"> |
70 | 72 | <div class="text-gray-400"> |
71 | 73 | <svg class="w-12 h-12 mx-auto mb-4 text-gray-300" fill="none" stroke="currentColor" viewBox="0 0 24 24"> |
72 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M3 7v10a2 2 0 002 2h14a2 2 0 002-2V9a2 2 0 00-2-2H5a2 2 0 00-2-2z"></path> |
73 | | - <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M8 21l4-4 4 4"></path> |
| 74 | + <path stroke-linecap="round" stroke-linejoin="round" stroke-width="1" d="M3 5h12M9 3v2m1.048 9.5A18.022 18.022 0 016.412 9m6.088 9h7M11 21l5-10 5 10M12.751 5C11.783 10.77 8.07 15.61 3 18.129"/> |
74 | 75 | </svg> |
75 | 76 | <p class="text-base font-medium text-gray-500 m-0">No languages configured yet</p> |
76 | | - <p class="text-sm text-gray-400 mt-2 mb-0">Get started by adding your first language configuration.</p> |
| 77 | + <p class="text-sm text-gray-400 mt-2 m-0">Get started by adding your first language configuration.</p> |
77 | 78 | </div> |
78 | 79 | </td> |
79 | 80 | </tr> |
|
0 commit comments