Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fit the whole table in the viewport
  • Loading branch information
tgaeta committed Jul 16, 2024
commit a34d4b72b2c68b7915bd047a8c6dd81f065f65f4
8 changes: 8 additions & 0 deletions app/frontend/stylesheets/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,11 @@ body {
background-position: center;
background-attachment: fixed;
}

td {
font-size: 12px !important;
}

th {
font-size: 12px !important;
}
6 changes: 3 additions & 3 deletions app/views/job_applications/_job_application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
safe_url(job_application.website_link),
target: "_blank",
rel: "noopener noreferrer",
class: "px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50",
class: "px-3 py-1 rounded-md text-xs text-gray-700 bg-white border border-gray-300 hover:bg-gray-50",
title: "Visit Website" %>
<% end %>
</td>
<td class="px-5 py-5 border-b border-gray-200 bg-white text-sm">
<div class="flex justify-start items-center">
<%= link_to 'Edit', edit_job_application_path(job_application), class: 'px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 mr-2', data: { turbo_frame: "_top" }, title: "Edit Application" %>
<%= button_to 'Delete', job_application_path(job_application), method: :delete, form: { data: { turbo_confirm: 'Are you sure?' } }, class: 'px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50', data: { turbo_frame: "_top" }, title: "Delete Application" %>
<%= link_to 'Edit', edit_job_application_path(job_application), class: 'px-3 py-1 rounded-md text-xs text-gray-700 bg-white border border-gray-300 hover:bg-gray-50 mr-2', data: { turbo_frame: "_top" }, title: "Edit Application" %>
<%= button_to 'Delete', job_application_path(job_application), method: :delete, form: { data: { turbo_confirm: 'Are you sure?' } }, class: 'px-3 py-1 rounded-md text-xs text-gray-700 bg-white border border-gray-300 hover:bg-gray-50', data: { turbo_frame: "_top" }, title: "Delete Application" %>
</div>
</td>
</tr>
24 changes: 12 additions & 12 deletions app/views/job_applications/_job_applications_table.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,34 +2,34 @@
<div class="overflow-x-auto bg-white shadow-md rounded-lg">
<% if @job_applications.any? %>
<table class="min-w-full leading-normal">
<thead>
<thead class="text-xs">
<tr>
<tr>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<%= sort_link_to 'Applied', 'date_applied' %>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
<%= sort_link_to 'Date Applied', 'date_applied' %>
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<%= sort_link_to 'Company', 'company_name' %>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
<%= sort_link_to 'Company Name', 'company_name' %>
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
<%= sort_link_to 'Position', 'position_title' %>
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
Type
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
Contact Method
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
P.o.C.
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
Email
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
Website
</th>
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left text-xs font-semibold text-gray-600 uppercase tracking-wider">
<th class="px-5 py-3 border-b-2 border-gray-200 bg-gray-100 text-left font-semibold text-gray-600 tracking-wider">
Actions
</th>
</tr>
Expand Down
35 changes: 18 additions & 17 deletions app/views/job_applications/_pagination.html.erb
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
<% if @pagination_info[:total_pages] > 1 %>
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6 shadow appearance-none border rounded w-full text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<div class="text-sm text-gray-700">
Showing <span class="font-medium"><%= @pagination_info[:offset] + 1 %></span> to <span class="font-medium"><%= [@pagination_info[:offset] + @pagination_info[:length], @job_application_count].min %></span> of <span class="font-medium"><%= @job_application_count %></span> results
<div class="fixed bottom-0 left-0 w-full z-50">
<% if @pagination_info[:total_pages] > 1 %>
<div class="flex items-center justify-between border-t border-gray-200 bg-white px-4 py-3 sm:px-6 shadow appearance-none rounded w-full text-gray-700 leading-tight focus:outline-none focus:shadow-outline">
<div class="text-sm text-gray-700">
</div>
<div>
<%= will_paginate @job_applications,
renderer: CustomPaginationRenderer,
previous_label: 'Previous',
next_label: 'Next',
inner_window: 0,
outer_window: 0,
class: 'pagination',
previous_page_class: 'px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50',
next_page_class: 'px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50' %>
</div>
</div>
<div>
<%= will_paginate @job_applications,
renderer: CustomPaginationRenderer,
previous_label: 'Previous',
next_label: 'Next',
inner_window: 0,
outer_window: 0,
class: 'pagination',
previous_page_class: 'px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50',
next_page_class: 'px-3 py-1 rounded-md text-sm font-medium text-gray-700 bg-white border border-gray-300 hover:bg-gray-50' %>
</div>
</div>
<% end %>
<% end %>
</div>
2 changes: 1 addition & 1 deletion app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<%= vite_stylesheet_tag "application", data: {"turbo-track": "reload"} %>
</head>
<body class="bg-gray-100">
<div class="container mx-auto px-4 py-8">
<div class="container mx-auto px-4 py-4">
<%= render 'flash_messages' %>
<%= yield %>
</div>
Expand Down