Skip to content

Commit

Permalink
billable detailed template
Browse files Browse the repository at this point in the history
  • Loading branch information
Karolis Rusenas committed Aug 18, 2015
1 parent 540f238 commit 6a7f3ed
Showing 1 changed file with 112 additions and 0 deletions.
112 changes: 112 additions & 0 deletions templates/sf_billability_detailed.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
{% extends "base.html" %}

{% block title %}Salesforce Dashboard{% end %}

{% block body %}
<section class="content-header">
<h1>
Salesforce Reports
</h1>
<ol class="breadcrumb">
<li><a href="/"><i class="fa fa-dashboard"></i> Home</a></li>
<li class="active">{{ data["consultant_bilability"]["title"] }} detailed</li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-md-8">
{% if data["consultant_bilability"] != None %}
<!-- Small boxes (Stat box) -->
<div class="box">
<div class="box-header">
<h3 class="box-title"> {{ data["consultant_bilability"]["title"] }} detailed</h3>
</div>
<!-- /.box-header -->
<table id="billability" class="table table-condensed table-bordered">
<thead>
<tr>
<th>
Name
</th>

{% for header in data["consultant_bilability"]["headers"] %}
{% if header != '' %}
<th> {% raw header %}</th>
{% end %}
{% end %}
<th>
Total
</th>
</tr>

</thead>
<tbody>
{% for name, values in data["consultant_bilability"]["body"].items() %}
<tr>
<td>
{{ name }}
</td>
{% for code, aggregates in sorted(values.items()) %}
<td> {% for i, dict in enumerate(aggregates) %}
{% if dict is not None %}
<!-- HTML to write -->
<a href="#" data-toggle="tooltip" title='{{ data["consultant_bilability"]["meta"]["column_info"][i] }}'>{{ dict["label"] }}</a>
<br>
{% end %}

{% end %}
</td>
{% end %}

</tr>
{% end %}

</tbody>
</table>
</div>
{% else %}
<div class="box box-danger">
<div class="box-header with-border">
<h3 class="box-title">Report not available</h3>
<div class="box-tools pull-right">
<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div><!-- /.box-tools -->
</div><!-- /.box-header -->
<div class="box-body">
Billability data is not available. Check report ID in your configuration file or Salesforce
account details.
</div><!-- /.box-body -->
</div>
{% end %}
</div>


</div>

</section>

{% end body %}
{% block endjs %}
<!-- DATA TABES SCRIPT -->
<script src="/static/AdminLTE/plugins/datatables/js/jquery.dataTables.js" type="text/javascript"></script>
<script src="/static/AdminLTE/plugins/datatables/dataTables.bootstrap.js" type="text/javascript"></script>
<script type="text/javascript">

$(function () {
$('[data-toggle="tooltip"]').tooltip()
});

$(function () {
$('#billability').dataTable({
"bPaginate": true,
"bLengthChange": true,
"bFilter": true,
"bSort": true,
"bInfo": true,
"bAutoWidth": false
});
});
</script>

{% end endjs %}

0 comments on commit 6a7f3ed

Please sign in to comment.