aboutsummaryrefslogtreecommitdiffstats
path: root/python/Dawn/templates
diff options
context:
space:
mode:
Diffstat (limited to 'python/Dawn/templates')
-rw-r--r--python/Dawn/templates/base.html36
-rw-r--r--python/Dawn/templates/blotter.html88
-rw-r--r--python/Dawn/templates/cds_blotter.html74
-rw-r--r--python/Dawn/templates/counterparties.html90
4 files changed, 153 insertions, 135 deletions
diff --git a/python/Dawn/templates/base.html b/python/Dawn/templates/base.html
new file mode 100644
index 00000000..329d7d73
--- /dev/null
+++ b/python/Dawn/templates/base.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html lang="en">
+ <head>
+ <meta charset="utf-8">
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
+ <link rel="stylesheet" href="../static/dawn.css">
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
+ <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js" integrity="sha512-K1qjQ+NcF2TYO/eI3M6v8EiNYZfA95pQumfvcVrTHtwQVDG+aHRqLi/ETn2uB+1JqwYqVG3LIvdm9lj6imS/pQ==" crossorigin="anonymous"></script>
+ </head>
+ <body>
+ <nav class="navbar navbar-default navbar-fixed-top">
+ <div class="container">
+ <ul class="nav navbar-nav">
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Blotter <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li><a href="../blotter">Bonds</a></li>
+ <li><a href="../cdsblotter">CDS</a></li>
+ </ul>
+ </li>
+ <li class="dropdown">
+ <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">Book <span class="caret"></span></a>
+ <ul class="dropdown-menu">
+ <li><a href="../trades">Bonds</a></li>
+ <li><a href="../cdstrades">CDS</a></li>
+ </ul>
+ </li>
+ <li><a href="../counterparties">Counterparties</a></li>
+ </ul>
+ </div>
+ </nav>
+ <main>
+ {% block content %}{% endblock %}
+ </main>
+ </body>
+</html>
diff --git a/python/Dawn/templates/blotter.html b/python/Dawn/templates/blotter.html
index 619c4109..96d28f79 100644
--- a/python/Dawn/templates/blotter.html
+++ b/python/Dawn/templates/blotter.html
@@ -1,47 +1,41 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
- </head>
- <body style="max-width:1500px; margin:0 auto">
- <table class="table table-striped">
- <thead>
- <tr>
- <td>Deal ID</td>
- <td>Trade Date</td>
- <td>Settle Date</td>
- <td>Buy/Sell</td>
- <td>Identifier</td>
- <td>Description</td>
- <td>Notional</td>
- <td>Price</td>
- <td>Counterparty</td>
- <td>Strategy</td>
- <td>Asset Class</td>
- <td>Acc Int</td>
- <td>Ticket</td>
- </tr>
- </thead>
- {% for trade in trades %}
- <tr>
- <td><a href="{{url_for('trade_manage', tradeid=trade.id)}}">{{trade.dealid}}</a></td>
- <td>{{trade.trade_date}}</td>
- <td>{{trade.settle_date}}</td>
- <td>{% if trade.buysell %}Buy{% else %}Sell{% endif %}</td>
- <td>{{trade.identifier}}</td>
- <td>{{trade.description}}</td>
- <td>{{"{0:,.0f}".format(trade.faceamount)}}</td>
- <td>{{trade.price|round(3)}}</td>
- <td><a href="{{url_for('edit_counterparty',
- cpcode=trade.counterparty.code)}}">{{trade.counterparty.name}}</a></td>
- <td>{{trade.folder}}</td>
- <td>{{trade.asset_class}}</td>
- <td>{{trade.accrued|round(3)}}</td>
- <td>{%if trade.ticket %}<a href="{{url_for('download_ticket', tradeid = trade.id)}}">
- <span class="glyphicon glyphicon-file"></span></a>{% endif %}</td>
- </tr>
- {% endfor %}
- </table>
- </body>
-</html>
+{% extends "base.html" %}
+{% block content %}
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <td>Deal ID</td>
+ <td>Trade Date</td>
+ <td>Settle Date</td>
+ <td>Buy/Sell</td>
+ <td>Identifier</td>
+ <td>Description</td>
+ <td>Notional</td>
+ <td>Price</td>
+ <td>Counterparty</td>
+ <td>Strategy</td>
+ <td>Asset Class</td>
+ <td>Acc Int</td>
+ <td>Ticket</td>
+ </tr>
+ </thead>
+ {% for trade in trades %}
+ <tr>
+ <td><a href="{{url_for('trade_manage', tradeid=trade.id)}}">{{trade.dealid}}</a></td>
+ <td>{{trade.trade_date}}</td>
+ <td>{{trade.settle_date}}</td>
+ <td>{% if trade.buysell %}Buy{% else %}Sell{% endif %}</td>
+ <td>{{trade.identifier}}</td>
+ <td>{{trade.description}}</td>
+ <td>{{"{0:,.0f}".format(trade.faceamount)}}</td>
+ <td>{{trade.price|round(3)}}</td>
+ <td><a href="{{url_for('edit_counterparty',
+ cpcode=trade.counterparty.code)}}">{{trade.counterparty.name}}</a></td>
+ <td>{{trade.folder}}</td>
+ <td>{{trade.asset_class}}</td>
+ <td>{{trade.accrued|round(3)}}</td>
+ <td>{%if trade.ticket %}<a href="{{url_for('download_ticket', tradeid = trade.id)}}">
+ <span class="glyphicon glyphicon-file"></span></a>{% endif %}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endblock %}
diff --git a/python/Dawn/templates/cds_blotter.html b/python/Dawn/templates/cds_blotter.html
index 704475aa..f0ce8d44 100644
--- a/python/Dawn/templates/cds_blotter.html
+++ b/python/Dawn/templates/cds_blotter.html
@@ -1,40 +1,34 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
- </head>
- <body style="max-width:1500px; margin:0 auto">
- <table class="table table-striped">
- <thead>
- <tr>
- <td>Deal ID</td>
- <td>Trade Date</td>
- <td>Protection</td>
- <td>Description</td>
- <td>Red Code</td>
- <td>Notional</td>
- <td>Attach</td>
- <td>Detach</td>
- <td>Counterparty</td>
- <td>Strategy</td>
- </tr>
- </thead>
- {% for trade in trades %}
- <tr>
- <td><a href="{{url_for('cds_trade_manage', tradeid=trade.id)}}">{{trade.dealid}}</a></td>
- <td>{{trade.trade_date}}</td>
- <td>{{trade.protection}}</td>
- <td>{{trade.security_desc}}</td>
- <td>{{trade.security_id}}</td>
- <td>{{trade.notional}}</td>
- <td>{{trade.attach if trade.attach is not none}}</td>
- <td>{{trade.detach if trade.detach is not none}}</td>
- <td><a href="{{url_for('edit_counterparty',
- cpcode=trade.counterparty.code)}}">{{trade.counterparty.name}}</a></td>
- <td>{{trade.folder}}</td>
- </tr>
- {% endfor %}
- </table>
- </body>
-</html>
+{% extends "base.html" %}
+{% block content %}
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <td>Deal ID</td>
+ <td>Trade Date</td>
+ <td>Protection</td>
+ <td>Description</td>
+ <td>Red Code</td>
+ <td>Notional</td>
+ <td>Attach</td>
+ <td>Detach</td>
+ <td>Counterparty</td>
+ <td>Strategy</td>
+ </tr>
+ </thead>
+ {% for trade in trades %}
+ <tr>
+ <td><a href="{{url_for('cds_trade_manage', tradeid=trade.id)}}">{{trade.dealid}}</a></td>
+ <td>{{trade.trade_date}}</td>
+ <td>{{trade.protection}}</td>
+ <td>{{trade.security_desc}}</td>
+ <td>{{trade.security_id}}</td>
+ <td>{{trade.notional}}</td>
+ <td>{{trade.attach if trade.attach is not none}}</td>
+ <td>{{trade.detach if trade.detach is not none}}</td>
+ <td><a href="{{url_for('edit_counterparty',
+ cpcode=trade.counterparty.code)}}">{{trade.counterparty.name}}</a></td>
+ <td>{{trade.folder}}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endblock %}
diff --git a/python/Dawn/templates/counterparties.html b/python/Dawn/templates/counterparties.html
index 39883e02..16f3680f 100644
--- a/python/Dawn/templates/counterparties.html
+++ b/python/Dawn/templates/counterparties.html
@@ -1,49 +1,43 @@
-<!DOCTYPE html>
-<html lang="en">
- <head>
- <meta charset="utf-8">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
- </head>
- <body style="max-width:1800px; margin:0 auto">
- <table class="table table-striped">
- <thead>
- <tr>
- <td>CODE</td>
- <td>Firm</td>
- <td>Location</td>
- <td>DTC Number</td>
- <td>Sales Contact</td>
- <td>Sales Phone</td>
- <td>Valuation Contact1</td>
- <td>Valuation Contact2</td>
- <td>Valuation Contact3</td>
- <td>Valuation Contact4</td>
+{% extends "base.html" %}
+{% block content %}
+<table class="table table-striped">
+ <thead>
+ <tr>
+ <td>CODE</td>
+ <td>Firm</td>
+ <td>Location</td>
+ <td>DTC Number</td>
+ <td>Sales Contact</td>
+ <td>Sales Phone</td>
+ <td>Valuation Contact1</td>
+ <td>Valuation Contact2</td>
+ <td>Valuation Contact3</td>
+ <td>Valuation Contact4</td>
<td>Valuation Note</td>
- <td>Instructions</td>
- </tr>
- </thead>
- {% for cp in counterparties %}
- <tr>
- <td><a href="{{url_for('edit_counterparty',cpcode=cp.code)}}">{{cp.code}}</td>
- <td>{{cp.name}}</td>
- <td>{{cp.city}}, {{cp.state}}</td>
- <td>{{cp.dtc_number if cp.dtc_number}}</td>
- <td><a href="mailto:{{cp.sales_email}}">{{cp.sales_contact if cp.sales_contact}}</a></td>
- <td>{{cp.sales_phone if cp.sales_phone}}</td>
- <td>{% if cp.valuation_contact1 %}
- <a href="mailto:{{cp.valuation_email1}}">
- {{cp.valuation_contact1}}</a>{% endif %}</td>
- <td>{% if cp.valuation_contact2 %}
- <a href="mailto:{{cp.valuation_email2}}">{{cp.valuation_contact2}}</a>{% endif %}</td>
- <td>{% if cp.valuation_contact3 %}
- <a href="mailto:{{cp.valuation_email3}}">{{cp.valuation_contact3}}</a>{% endif %}</td>
- <td>{% if cp.valuation_contact4 %}
- <a href="mailto:{{cp.valuation_email4}}">{{cp.valuation_contact4}}</a>{% endif %}</td>
- <td style="width:50px">{{cp.notes if cp.notes}}</td>
- <td>{%if cp.instructions %}<a href="{{url_for('list_counterparties', instr = cp.instructions)}}">
- <span class="glyphicon glyphicon-file"></span></a>{% endif %}</td>
- </tr>
- {% endfor %}
- </table>
- </body>
-</html>
+ <td>Instructions</td>
+ </tr>
+ </thead>
+ {% for cp in counterparties %}
+ <tr>
+ <td><a href="{{url_for('edit_counterparty',cpcode=cp.code)}}">{{cp.code}}</td>
+ <td>{{cp.name}}</td>
+ <td>{{cp.city}}, {{cp.state}}</td>
+ <td>{{cp.dtc_number if cp.dtc_number}}</td>
+ <td><a href="mailto:{{cp.sales_email}}">{{cp.sales_contact if cp.sales_contact}}</a></td>
+ <td>{{cp.sales_phone if cp.sales_phone}}</td>
+ <td>{% if cp.valuation_contact1 %}
+ <a href="mailto:{{cp.valuation_email1}}">
+ {{cp.valuation_contact1}}</a>{% endif %}</td>
+ <td>{% if cp.valuation_contact2 %}
+ <a href="mailto:{{cp.valuation_email2}}">{{cp.valuation_contact2}}</a>{% endif %}</td>
+ <td>{% if cp.valuation_contact3 %}
+ <a href="mailto:{{cp.valuation_email3}}">{{cp.valuation_contact3}}</a>{% endif %}</td>
+ <td>{% if cp.valuation_contact4 %}
+ <a href="mailto:{{cp.valuation_email4}}">{{cp.valuation_contact4}}</a>{% endif %}</td>
+ <td style="width:50px">{{cp.notes if cp.notes}}</td>
+ <td>{%if cp.instructions %}<a href="{{url_for('list_counterparties', instr = cp.instructions)}}">
+ <span class="glyphicon glyphicon-file"></span></a>{% endif %}</td>
+ </tr>
+ {% endfor %}
+</table>
+{% endblock %}