This repository has been archived by the owner on Feb 8, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 308
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
We want a single Dashboard js app that includes both the general ledger and chart of accounts.
- Loading branch information
1 parent
e4f4b60
commit 02c4ec0
Showing
7 changed files
with
132 additions
and
80 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,7 @@ | ||
[---] | ||
[---] text/css via scss | ||
#dashboard { | ||
section { | ||
display: none; | ||
} | ||
} |
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
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,57 @@ | ||
from aspen import Response | ||
[---] | ||
if user.ANON: | ||
raise Response(401) | ||
if not user.ADMIN: | ||
raise Response(403) | ||
[---] text/html | ||
<!doctype html> | ||
<html> | ||
<title>Dashboard</title> | ||
<link rel="stylesheet" type="text/css" href="{{ website.asset('dashboard.css') }}" /> | ||
<script src="{{ website.asset('jquery.min.js') }}"></script> | ||
<script src="{{ website.asset('underscore-min.js') }}"></script> | ||
<script src="{{ website.asset('backbone-min.js') }}"></script> | ||
<script src="{{ website.asset('dashboard.js') }}"></script> | ||
<script> | ||
$(document).ready(Dashboard.init); | ||
</script> | ||
</head> | ||
<body id="dashboard"> | ||
<h1>Dashboard</h1> | ||
<ul id="navigation"> | ||
<li><a href="ledger">General Ledger</a></li> | ||
<li><a href="accounts">Chart of Accounts</a></li> | ||
</ul> | ||
|
||
<section id="general-ledger"> | ||
<h2>General Ledger</h2> | ||
<table> | ||
<thead> | ||
<th>Account</th> | ||
<th>Debits</th> | ||
<th>Credits</th> | ||
</thead> | ||
<tbody></tbody> | ||
</table> | ||
</section> | ||
|
||
<section id="chart-of-accounts"> | ||
<h2>Chart of Accounts</h2> | ||
<table> | ||
<thead> | ||
<th>Number</th> | ||
<th>Name</th> | ||
<th>Type</th> | ||
</thead> | ||
<tbody></tbody> | ||
</table> | ||
</section> | ||
|
||
<script type="text/template" id="AccountRow"> | ||
<td><%= number %></td> | ||
<td><%= name %></td> | ||
<td><%= type %></td> | ||
</script> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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,12 @@ | ||
from aspen import Response | ||
[---] | ||
if user.ANON: | ||
raise Response(401) | ||
if not user.ADMIN: | ||
raise Response(403) | ||
|
||
out = {"accounts": [ {"number": "100", "name": "accounts receivable", "type": "asset"} | ||
, {"number": "200", "name": "accounts payable", "type": "liability"} | ||
]} | ||
[---] application/json via json_dump | ||
out |