mirror of
https://github.com/rickbarrette/redmine_qbo_calendar.git
synced 2026-10-04 04:40:43 -04:00
121 lines
3.9 KiB
ERB
121 lines
3.9 KiB
ERB
<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' %>
|
|
</div>
|
|
|
|
<h2>
|
|
<% if @appointment.start_date %>
|
|
<div class="calendar-badge">
|
|
<div class="month"><%= @appointment.start_date.strftime('%b').upcase %></div>
|
|
<div class="day"><%= @appointment.start_date.day %></div>
|
|
</div>
|
|
<% end %>
|
|
|
|
<span class="appointment-title"><%= @appointment.subject %></span>
|
|
|
|
<span class="appointment-dates">
|
|
(<%= format_date(@appointment.start_date) %>
|
|
<% if @appointment.end_date && @appointment.start_date != @appointment.end_date %>
|
|
- <%= format_date(@appointment.end_date) %>
|
|
<% end %>)
|
|
</span>
|
|
</h2>
|
|
|
|
<style>
|
|
.calendar-badge {
|
|
display: inline-block;
|
|
width: 38px;
|
|
border: 1px solid #b8c0c8;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
text-align: center;
|
|
vertical-align: middle;
|
|
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
|
|
margin-right: 8px;
|
|
line-height: 1;
|
|
background: #fff;
|
|
}
|
|
|
|
.calendar-badge .month {
|
|
background-color: #c22b2b; /* Redmine primary red tone */
|
|
color: #ffffff;
|
|
font-size: 9px;
|
|
font-weight: bold;
|
|
padding: 3px 0 2px 0;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.5px;
|
|
}
|
|
|
|
.calendar-badge .day {
|
|
color: #333333;
|
|
font-size: 16px;
|
|
font-weight: bold;
|
|
padding: 4px 0 3px 0;
|
|
}
|
|
|
|
.appointment-title {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.appointment-dates {
|
|
font-size: 70%;
|
|
color: #666;
|
|
margin-left: 8px;
|
|
font-weight: normal;
|
|
vertical-align: middle;
|
|
}
|
|
</style>
|
|
|
|
<div class="issue details">
|
|
<div class="attributes">
|
|
<div class="splitcontent">
|
|
<div class="splitcontentleft">
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:label_customer, default: 'Customer') %>:</div>
|
|
<div class="value"><%= link_to_if @appointment.customer, @appointment.customer&.name, @appointment.customer %></div>
|
|
</div>
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:label_vehicle, default: 'Vehicle') %>:</div>
|
|
<div class="value"><%= link_to_if @appointment.vehicle, @appointment.vehicle&.name, @appointment.vehicle %></div>
|
|
</div>
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:label_primary_phone, default: 'Primary phone') %>:</div>
|
|
<div class="value"><%= @appointment.customer&.primary_phone %></div>
|
|
</div>
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:label_estimate, default: 'Estimate') %>:</div>
|
|
<div class="value"><%= link_to_if @appointment.estimate, @appointment.estimate&.name, @appointment.estimate %></div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="splitcontentright">
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:field_status) %>:</div>
|
|
<div class="value"><%= @appointment.status %></div>
|
|
</div>
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:field_user) %>:</div>
|
|
<div class="value"><%= link_to_user(@appointment.user) %></div>
|
|
</div>
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:label_duration, default: 'Duration') %>:</div>
|
|
<div class="value"><%= @appointment.duration %> <%= l(:label_day_plural, default: 'days') %></div>
|
|
</div>
|
|
<div class="attribute">
|
|
<div class="label"><%= l(:field_estimated_hours) %>:</div>
|
|
<div class="value"><%= @appointment.estimated_hours %></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<% if @appointment.description.present? %>
|
|
<hr />
|
|
<div class="description">
|
|
<p><strong><%= l(:field_description) %></strong></p>
|
|
<div class="wiki">
|
|
<%= textilizable(@appointment, :description) %>
|
|
</div>
|
|
</div>
|
|
<% end %>
|
|
</div> |