|
2 | 2 | <html xmlns:th="http://www.thymeleaf.org" lang="en"> |
3 | 3 | <body> |
4 | 4 | <!--/*@thymesVar id="shareGraphData" type="com.hz.mymoney.ui.models.templates.InvestmentsTemplateData"*/--> |
5 | | -<table id="InvestmentTable" th:fragment="InvestmentTable (investmentsData)" class="ui fixed small compact celled table"> |
| 5 | +<table id="InvestmentTable" th:fragment="InvestmentTable (investmentsData)" |
| 6 | + class="ui unstackable single line small compact celled table"> |
6 | 7 | <thead> |
7 | 8 | <tr> |
8 | 9 | <th>Investment</th> |
9 | | - <th class="left aligned">Purchase Date</th> |
| 10 | + <th class="left aligned">Purchased</th> |
10 | 11 | <th class="right aligned" th:if="${#strings.contains(header,'Current')}">Quantity</th> |
11 | 12 | <th class="right aligned" th:if="${#strings.contains(header,'Current')}">Last Price</th> |
12 | | - <th class="right aligned">Outlay</th> |
13 | | - <th class="right aligned">Earnings</th> |
14 | | - <th class="right aligned">Sales</th> |
| 13 | + <th class="right aligned big-screen-table">Outlay</th> |
| 14 | + <th class="right aligned big-screen-table">Earnings</th> |
| 15 | + <th class="right aligned big-screen-table">Sales</th> |
15 | 16 | <th class="right aligned" th:if="${#strings.contains(header,'Current')}">Market Value</th> |
16 | | - <th class="right aligned">Net Profit/Loss</th> |
17 | | - <th class="right aligned">Annualised Return</th> |
| 17 | + <th class="right aligned big-screen-table">Net Profit/Loss</th> |
| 18 | + <th class="right aligned">Annual Return</th> |
18 | 19 | </tr> |
19 | 20 | </thead> |
20 | 21 | <tbody> |
|
25 | 26 | <td class="right aligned" th:if="${#strings.contains(header,'Current')}" th:text="${investment.count}"></td> |
26 | 27 | <td class="right aligned" th:if="${#strings.contains(header,'Current')}" |
27 | 28 | th:text="${#numbers.formatCurrency(investment.lastPrice)}"></td> |
28 | | - <td class="right aligned" th:text="${#numbers.formatCurrency(investment.costBase)}"></td> |
29 | | - <td class="right aligned" th:text="${#numbers.formatCurrency(investment.earnings)}"></td> |
30 | | - <td class="right aligned" th:text="${#numbers.formatCurrency(investment.sales)}"></td> |
| 29 | + <td class="right aligned big-screen-table" th:text="${#numbers.formatCurrency(investment.costBase)}"></td> |
| 30 | + <td class="right aligned big-screen-table" th:text="${#numbers.formatCurrency(investment.earnings)}"></td> |
| 31 | + <td class="right aligned big-screen-table" th:text="${#numbers.formatCurrency(investment.sales)}"></td> |
31 | 32 | <td class="right aligned" th:if="${#strings.contains(header,'Current')}" |
32 | 33 | th:text="${#numbers.formatCurrency(investment.balance)}"></td> |
33 | 34 | <td th:text="${#numbers.formatCurrency(investment.netProfitLoss)}" |
34 | | - th:attr="class=${investment.isProfit() ? 'right aligned green' : 'right aligned red'}"></td> |
| 35 | + th:attr="class=${investment.isProfit() ? 'right aligned green big-screen-table' : 'right aligned red big-screen-table'}"></td> |
35 | 36 | <td th:text="${#numbers.formatPercent(investment.yearlyReturn,1,2)}" |
36 | 37 | th:attr="class=${investment.isProfit() ? 'right aligned green' : 'right aligned red'}"></td> |
37 | 38 | </tr> |
38 | 39 | <tr th:unless="${investmentsData.investmentSummaries.isEmpty()}"> |
39 | 40 | <td th:if="${#strings.contains(header,'Current')}"></td> |
40 | 41 | <td th:if="${#strings.contains(header,'Current')}"></td> |
41 | 42 | <td></td> |
42 | | - <td class="right aligned" th:if="${#strings.contains(header,'Current')}"><b>Total Outlay</b></td> |
43 | | - <td class="right aligned blue" th:if="${#strings.contains(header,'Current')}" |
| 43 | + <td class="right aligned big-screen-table" th:if="${#strings.contains(header,'Current')}"><b>Total Outlay</b> |
| 44 | + </td> |
| 45 | + <td class="right aligned blue big-screen-table" th:if="${#strings.contains(header,'Current')}" |
44 | 46 | th:text="${#numbers.formatCurrency(investmentsData.getTotalOutlay())}">$0.00 |
45 | 47 | </td> |
46 | 48 | <td th:if="${#strings.contains(header,'Current')}"></td> |
47 | | - <td class="right aligned" th:unless="${#strings.contains(header,'Current')}"><b>Total Outlay</b></td> |
48 | | - <td class="right aligned blue" th:unless="${#strings.contains(header,'Current')}" |
| 49 | + <td class="right aligned big-screen-table" th:unless="${#strings.contains(header,'Current')}"><b>Total |
| 50 | + Outlay</b></td> |
| 51 | + <td class="right aligned blue big-screen-table" th:unless="${#strings.contains(header,'Current')}" |
49 | 52 | th:text="${#numbers.formatCurrency(investmentsData.getTotalOutlay())}">$0.00 |
50 | 53 | </td> |
51 | 54 | <td></td> |
52 | | - <td class="right aligned"><b>Total Profit/Loss</b></td> |
53 | | - <td class="right aligned blue" th:text="${#numbers.formatCurrency(investmentsData.getTotalProfitOrLoss())}"> |
| 55 | + <td class="right aligned big-screen-table"><b>Total Profit/Loss</b></td> |
| 56 | + <td class="right aligned blue big-screen-table" |
| 57 | + th:text="${#numbers.formatCurrency(investmentsData.getTotalProfitOrLoss())}"> |
54 | 58 | $0.00 |
55 | 59 | </td> |
56 | 60 | <td></td> |
57 | 61 | </tr> |
58 | 62 | </tbody> |
59 | 63 | </table> |
60 | 64 |
|
61 | | -<div id="InvestmentChart" th:fragment="InvestmentChart(investmentsData, header)" class="ui grid"> |
62 | | - <div class="eight wide column"> |
63 | | - <div th:if="${#strings.contains(header,'Current')}" id="investmentsTotalChart" |
64 | | - style="width: 100%; height: 600px"></div> |
65 | | - <div th:if="${#strings.contains(header,'Historical')}" style="width: 100%; height: 600px"></div> |
| 65 | +<div id="InvestmentChart" th:fragment="InvestmentChart(investmentsData, header)" |
| 66 | + th:class="${#strings.contains(header,'Current')} ? 'ui two column grid' : 'ui two column grid container'"> |
| 67 | + <div th:if="${#strings.contains(header,'Current')}" class="column"> |
| 68 | + <div id="investmentsTotalChart" class="chart"></div> |
66 | 69 | </div> |
67 | | - <div class="eight wide column"> |
68 | | - <div id="marketValueChart" |
69 | | - th:attr="data-chart-data=${investmentsData.getMarketValuesJson()}, data-chart-title=${#strings.contains(header,'Current')?'Market Value':'Net Profit/Loss'}" |
70 | | - style="width: 100%; height: 600px"></div> |
| 70 | + <div th:unless="${#strings.contains(header,'Current')}" class="three wide column"></div> |
| 71 | + <div class="column"> |
| 72 | + <div id="marketValueChart" class="chart" |
| 73 | + th:attr="data-chart-data=${investmentsData.getMarketValuesJson()}, data-chart-title=${#strings.contains(header,'Current')?'Market Value':'Net Profit/Loss'}"> |
| 74 | + </div> |
71 | 75 | </div> |
72 | 76 | </div> |
73 | 77 | </body> |
|
0 commit comments