mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-03 20:40:43 -04:00
Enhance customer appointments view with localization, improved links, and additional actions
This commit is contained in:
1 parent
f3583528ea
commit
d33e430c75
4 files changed
+42
-28
No files matched your search
@@ -1,13 +1,15 @@
|
||||
<h2>Customer Appointments</h2>
|
||||
<h2><%= l(:title_customer_appointments) %></h2>
|
||||
|
||||
<p>
|
||||
<div class="contextual">
|
||||
<%= link_to issues_calendar_path do %>
|
||||
<i class="fa-regular fa-calendar-days"></i> <%= l(:button_calendar) %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to(
|
||||
l(:button_add),
|
||||
new_project_event_path(@project)
|
||||
) %>
|
||||
<%= link_to new_customer_appointment_path do %>
|
||||
<i class="fa-regular fa-pen-to-square"></i> <%= l(:button_add) %>
|
||||
<% end %>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<table class="list">
|
||||
|
||||
@@ -15,17 +17,17 @@
|
||||
|
||||
<tr>
|
||||
|
||||
<th>Customer</th>
|
||||
<th><%= l(:label_customer) %></th>
|
||||
|
||||
<th>Vehicle</th>
|
||||
<th><%= l(:label_vehicle) %></th>
|
||||
|
||||
<th>Appointment</th>
|
||||
<th><%= l(:label_appointment) %></th>
|
||||
|
||||
<th>Assigned</th>
|
||||
<th><%= l(:label_user) %></th>
|
||||
|
||||
<th>Date</th>
|
||||
<th><%= l(:label_date) %></th>
|
||||
|
||||
<th>Status</th>
|
||||
<th><%= l(:label_status) %></th>
|
||||
|
||||
</tr>
|
||||
|
||||
@@ -39,37 +41,32 @@
|
||||
|
||||
<td>
|
||||
|
||||
<%= link_to(
|
||||
appointment.customer_name,
|
||||
customer_appointment_path(
|
||||
appointment
|
||||
)
|
||||
) %>
|
||||
<%= link_to appointment.customer unless appointment.customer.nil? %>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<%= appointment.vehicle %>
|
||||
<%= link_to appointment.vehicle unless appointment.vehicle.nil? %>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<%= appointment.subject %>
|
||||
<%= link_to appointment %>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<%= appointment.user&.name %>
|
||||
<%= link_to appointment.user unless appointment.user.nil? %>
|
||||
|
||||
</td>
|
||||
|
||||
<td>
|
||||
|
||||
<%= format_date(
|
||||
appointment.start_date
|
||||
appointment.date
|
||||
) %>
|
||||
|
||||
</td>
|
||||
|
||||
@@ -1,6 +1,19 @@
|
||||
<div class="contextual">
|
||||
<%= link_to l(:button_edit), edit_customer_appointment_path(@appointment), class: 'icon icon-edit' %>
|
||||
<%= link_to l(:button_delete), customer_appointment_path(@appointment), method: :delete, data: { confirm: l(:text_are_you_sure) }, class: 'icon icon-del' %>
|
||||
<%= link_to issues_calendar_path do %>
|
||||
<i class="fa-regular fa-calendar-days"></i> <%= l(:button_calendar) %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to customer_appointments_path do %>
|
||||
<i class="fa-solid fa-list"></i> <%= l(:button_appointments) %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to edit_customer_appointment_path(@appointment) do %>
|
||||
<i class="fa-solid fa-pen-to-square"></i> <%= l(:button_edit) %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to customer_appointment_path(@appointment), method: :delete, data: { confirm: l(:text_are_you_sure) } do %>
|
||||
<i class="fa-solid fa-trash"></i> <%= l(:button_delete) %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<h2>
|
||||
|
||||
@@ -12,10 +12,13 @@
|
||||
# Usage I18n.t(:label)
|
||||
en:
|
||||
are_you_sure: "Are you sure?"
|
||||
button_appointments: Appointments
|
||||
button_calendar: Calendar
|
||||
field_customer_name: Customer
|
||||
field_license_plate: License Plate
|
||||
field_phone: Phone
|
||||
field_vehicle: Vehicle
|
||||
label_appointment: Appointment
|
||||
label_customer_appointment: Customer Appointment
|
||||
label_customer_calendar: Customer Calendar
|
||||
label_duration: Duration
|
||||
@@ -29,4 +32,4 @@ en:
|
||||
label_upcoming_appointments: "My Upcoming Appointments"
|
||||
permission_manage_customer_appointments: Manage Customer Appointments
|
||||
permission_view_customer_appointments: View Customer Appointments
|
||||
|
||||
title_customer_appointments: Customer Appoitnments
|
||||
@@ -13,12 +13,13 @@ module RedmineQboCalendar
|
||||
|
||||
class ViewHookListener < Redmine::Hook::ViewListener
|
||||
|
||||
# Load the javascript to support the autocomplete forms
|
||||
# Load the javascript and stylesheet assets
|
||||
def view_layouts_base_html_head(context = {})
|
||||
safe_join([
|
||||
javascript_include_tag("customer_appointments", plugin: :redmine_qbo_calendar),
|
||||
javascript_include_tag("calendar", plugin: :redmine_qbo_calendar),
|
||||
stylesheet_link_tag('customer_appointments', plugin: :redmine_qbo_calendar)
|
||||
stylesheet_link_tag('customer_appointments', plugin: :redmine_qbo_calendar),
|
||||
javascript_include_tag('https://kit.fontawesome.com/4be4394b21.js', crossorigin: 'anonymous')
|
||||
])
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user