-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Karolis Rusenas
committed
Aug 18, 2015
1 parent
540f238
commit 6a7f3ed
Showing
1 changed file
with
112 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 %} |