Skip to content

Commit

Permalink
Reports require CSS for printing
Browse files Browse the repository at this point in the history
  • Loading branch information
garmoncheg committed Jan 19, 2012
1 parent 502ba1f commit fb8bc17
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 8 deletions.
1 change: 1 addition & 0 deletions src/adlibre_tms/templates/blue_theme/site_base.html
Expand Up @@ -7,6 +7,7 @@
{% compress css %} {% compress css %}
<link href="{{ STATIC_URL }}tms/css/site_tabs.css" rel="stylesheet" type="text/css" /> <link href="{{ STATIC_URL }}tms/css/site_tabs.css" rel="stylesheet" type="text/css" />
<link href="{{ STATIC_URL }}uni_form/uni-form.css" rel="stylesheet" type="text/css" /> <link href="{{ STATIC_URL }}uni_form/uni-form.css" rel="stylesheet" type="text/css" />
<link href="{{ STATIC_URL }}tms/css/reports_print.css" rel="stylesheet" type="text/css" media="print" />
{% endcompress %} {% endcompress %}
{% block extra_head %}{% endblock %} {% block extra_head %}{% endblock %}
{% endblock %} {% endblock %}
Expand Down
Expand Up @@ -64,9 +64,9 @@ <h4>{% trans "Consultant:" %} {{ key }}</h4>
<td>{{ obj.duration_minutes|floatformat }}</td> <td>{{ obj.duration_minutes|floatformat }}</td>
<td> <td>
{% if obj.is_billable %} {% if obj.is_billable %}
<span class="checked">{% trans "Checked" %}</span> <span class="checked">{% trans "Yes" %}</span>
{% else %} {% else %}
<span class="unchecked">{% trans "Unchecked" %}</span> <span class="unchecked">{% trans "No" %}</span>
{% endif %} {% endif %}
</td> </td>
<td>{{ obj.job.pk }}</td> <td>{{ obj.job.pk }}</td>
Expand Down
Expand Up @@ -66,9 +66,9 @@ <h5>{% trans "Consultant:" %} {{ queryset.0.employee.user.username }}</h5>
<td>{{ obj.payment_method }}</td> <td>{{ obj.payment_method }}</td>
<td> <td>
{% if obj.is_receipted %} {% if obj.is_receipted %}
<span class="checked">{% trans "Checked" %}</span> <span class="checked">{% trans "Yes" %}</span>
{% else %} {% else %}
<span class="unchecked">{% trans "Unchecked" %}</span> <span class="unchecked">{% trans "No" %}</span>
{% endif %} {% endif %}
</td> </td>
<td>{{ obj.currency }}</td> <td>{{ obj.currency }}</td>
Expand Down
Expand Up @@ -65,9 +65,9 @@ <h5>{% trans "Customer:" %} {{ queryset.0.customer.customer_code }}</h5>
<td>{{ obj.payment_method }}</td> <td>{{ obj.payment_method }}</td>
<td> <td>
{% if obj.is_receipted %} {% if obj.is_receipted %}
<span class="checked">{% trans "Checked" %}</span> <span class="checked">{% trans "Yes" %}</span>
{% else %} {% else %}
<span class="unchecked">{% trans "Unchecked" %}</span> <span class="unchecked">{% trans "No" %}</span>
{% endif %} {% endif %}
</td> </td>
<td>{{ obj.currency }}</td> <td>{{ obj.currency }}</td>
Expand Down
Expand Up @@ -67,9 +67,9 @@ <h5>{% trans "Job:" %} {{ queryset.0.service_code }}</h5>
<td>{{ obj.duration_minutes|floatformat }}</td> <td>{{ obj.duration_minutes|floatformat }}</td>
<td> <td>
{% if obj.is_billable %} {% if obj.is_billable %}
<span class="checked">{% trans "Checked" %}</span> <span class="checked">{% trans "Yes" %}</span>
{% else %} {% else %}
<span class="unchecked">{% trans "Unchecked" %}</span> <span class="unchecked">{% trans "No" %}</span>
{% endif %} {% endif %}
</td> </td>
<td>{{ obj.comment }}</td> <td>{{ obj.comment }}</td>
Expand Down
45 changes: 45 additions & 0 deletions www/media/blue_theme/tms/css/reports_print.css
@@ -0,0 +1,45 @@

/* reset body styles */
body {
margin: 0;
padding: 0;
line-height: 1.4em;
word-spacing: 1px;
letter-spacing: 0.2px;
font: 12px Arial, Helvetica,"Lucida Grande", serif;
color: #000;
}

/* Remove unneeded elements */
#control-panel,
#header,
#footer {
display:none;
}

/* restyling report table */
table {
border: 1px solid black;
width: 100%;
}
table tr
{
border-bottom: 1px solid black;
}

/* restyling report total tables */
table.report_job_totals,
table.report_project_totals,
table.report_customer_totals {
font: 16px Arial, Helvetica,"Lucida Grande", serif;
border: none;
}

/* restyling report headers */
h3 {
font: 24px Arial, Helvetica,"Lucida Grande", serif;
}

h4 {
font: 24px Arial, Helvetica,"Lucida Grande", serif;
}

0 comments on commit fb8bc17

Please sign in to comment.