Skip to content

Instantly share code, notes, and snippets.

@psyomn
Created October 4, 2014 22:44
Show Gist options
  • Select an option

  • Save psyomn/8d1c2a21ce419ca815f4 to your computer and use it in GitHub Desktop.

Select an option

Save psyomn/8d1c2a21ce419ca815f4 to your computer and use it in GitHub Desktop.
Template example for wlog
<html>
<head>
<style type="text/css">
#issue {
border:1px #000000 solid;
margin:10px;
padding:10px;
border-radius:0 10px 0 10px;
}
#issue #title {
background-color:#ADADAD;
padding:5px;
}
.soft {
color:#9B9B9B;
}
</style>
</head>
<body>
<h1> Invoice #<%= @invoice.id %></h1>
<h2> The best invoice ever </h2>
<p> Billing from <%= @invoice.from.strftime("%d %B") %> to <%= @invoice.to.strftime("%d %B") %> </p>
<h3> Summary of Work </h2>
<p> <%= @invoice.description.gsub("\n", '<br/>') %> <p>
<h3> Breakdown </h3>
<% @issues.each do |iss| %>
<div id="issue">
<div id="title"> [<%= iss.id %>] <%= iss.description %> </div>
<ul>
<% iss.log_entries.each do |le| %>
<li> <%= le.description %> <span class="soft"> [<%= le.created_at.strftime("%b %d %Y") %>] </span> </li>
<% end %>
</ul>
</div>
<% end %>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment