Skip to content

Instantly share code, notes, and snippets.

@codespore
Created June 22, 2012 10:45
Show Gist options
  • Select an option

  • Save codespore/2972016 to your computer and use it in GitHub Desktop.

Select an option

Save codespore/2972016 to your computer and use it in GitHub Desktop.
Work Order Printout
<a href="javascript: void(0)" onclick="popup('<%= ticket_manager_request_url(:id=>@request.request_no) %>')">
Print Service Request Ticket
</a>
<script type="text/javascript">
<!--
function popup(url)
{
var width = 900;
var height = 500;
var left = (screen.width - width)/2;
var top = (screen.height - height)/2;
var params = 'width='+width+', height='+height;
params += ', top='+top+', left='+left;
params += ', directories=no';
params += ', location=no';
params += ', menubar=no';
params += ', resizable=no';
params += ', scrollbars=yes';
params += ', status=no';
params += ', toolbar=no';
newwin=window.open(url,'<%= @current_account.community_name %> - Service Request #<%= @request.request_no %>', params);
if (window.focus) {newwin.focus()}
return false;
}
// -->
</script>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title><%= @current_account.community_name %> - Service Request #<%= @request.request_no %></title>
<link rel="stylesheet" href="/stylesheets/print_service_request.css" type="text/css" media="print">
<style type="text/css">
<!--
body {
font-family: Arial;
background: #f2f2f2;
}
.header {
width: 100%; position: fixed; top: 0; left: 0; background: #333; z-index: 99; height: 40px;
}
img {
border:0;
}
#page {
width:790px;
position: relative;
margin: 50px auto;
padding:30px;
border: 1px solid #ccc;
background: #fff;
}
#logo {
float:left;
margin:0;
}
#address {
position: relative;
width: 300px;
}
table {
width:100%;
}
td {
padding:5px;
}
tr.odd {
background: #e1ffe1;
}
#back a {
color: #bbb;
text-decoration: none;
}
#back a:hover {
color: #fff;
text-decoration: none;
}
#notice {
padding: 10px 10px 10px 10px;
width: 831px;
margin: 50px auto;
border: 1px solid #dcdd9d;
margin-bottom: 0px;
background: #fdfeb4;
}
#error {
padding: 10px 10px 10px 10px;
width: 831px;
margin: 50px auto;
border: 1px solid #910000;
margin-bottom: 0px;
background: #da0404;
}
-->
</style>
</head>
<body>
<div class="header">
<div style="width: 852px; padding: 10px 0; margin: 0 auto; color: #fff;">
<div style="float: left;">
Service Request #<%= @request.request_no %>
</div>
<div style="float: right;" id="back">
<A HREF="javascript:window.print()">Click to Print This Ticket</A>
</div>
</div>
</div>
<div id="page">
<%= @current_account.community_name %><br />
<h2 style="margin-top: 0;">SERVICE REQUEST (<%= @request.request_type.upcase %>)</h2>
<div id="address">
<%= @request.user.profile.fullname %><br>
<%= @request.user.getParcelListing %><br>
<%= @request.email %><br>
Tel: <%= @request.contact_no %>
</div>
<div style="position: absolute; right: 30px; top: 30px;">
REQUEST NO: <h2 style="margin-top: 0; margin-bottom: 10px;">#<%= @request.request_no %></h2>
<%= simple_datetime(@request.created_at) %>
</div>
<div id="content" style="font-size: 14px;">
<p style="width: 370px;">
<strong>REQUEST DETAILS</strong>
</p>
<table border="1" cellspacing="0">
<tr>
<td style="background: #eee; width: 150px; vertical-align: top;"><strong>Subject</strong></td>
<td style="vertical-align: top;"><%= @request.title %></td>
</tr>
<tr>
<td style="background: #eee; width: 150px; vertical-align: top;"><strong>Description</strong></td>
<td style="vertical-align: top;"><%= @request.request_conversations.first.description %></td>
</tr>
</table>
<div style="position: relative;">
<p style="width: 370px;">
<strong>FOR MANAGEMENT USE</strong>
</p>
<table border="1" cellspacing="0" style="width: 400px;">
<tr>
<td style="background: #eee; width: 150px;"><strong>DEPARTMENT</strong></td>
<td></td>
</tr>
<tr>
<td style="background: #eee; width: 150px;"><strong>PERSON IN-CHARGE</strong></td>
<td></td>
</tr>
</table>
<br><br><br><br><br>
<table border="0" cellspacing="0" style="width: 400px;">
<tr>
<td style="border-bottom: 1px solid #000; width: 180px;"></td>
<td style="border-bottom: 0px; width: 50px;"></td>
<td style="border-bottom: 1px solid #000; width: 180px;"></td>
</tr>
<tr>
<td>Authorized By</td>
<td style="width: 50px;"></td>
<td>Person In-Charge</td>
</tr>
</table>
<br><br><br>
<table border="1" cellspacing="0" style="width: 340px; position: absolute; right: 0; top: 30px;">
<tr>
<td style="width: 30px; font-size: 20px; padding: 0; text-align: center;"><strong>X</strong></td>
<td style="width: 140px;">OPEN</td>
<td style="width: 30px;"><strong></strong></td>
<td style="width: 140px;">IN PROGRESS</td>
</tr>
<tr>
<td colspan="2">COMPLETION DATE</td>
<td colspan="2"></td>
</tr>
</table>
</div>
<hr>
<p>
<small>This communication is for the exclusive use of the building management personnel and committee of <%= @current_account.community_name %> and may contain proprietary, confidential or privileged information. If you are not the intended recipient any use, copying, disclosure, dissemination or distribution is strictly prohibited.
<br /><br />
<center>
&copy; <%= @current_account.community_name %>. Powered by Highrise.my
</small></center>
</p>
</div><!--end content-->
</div><!--end page-->
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment