diff options
Diffstat (limited to 'tpl')
-rw-r--r-- | tpl/general/top.php | 2 | ||||
-rw-r--r-- | tpl/study/list.php | 20 |
2 files changed, 19 insertions, 3 deletions
diff --git a/tpl/general/top.php b/tpl/general/top.php index 2eb0862..2e73057 100644 --- a/tpl/general/top.php +++ b/tpl/general/top.php @@ -18,6 +18,7 @@ global $user, $apps; //These might be hidden because this page is called from sq </head> <body<?php if (isset($onload_js)) echo ' onload="' . $onload_js . '"'; ?>> + <div class="menu"> <div class="right"> <?php @@ -47,6 +48,7 @@ if ($user['id'] != 0) { <div style="clear: both;"></div> </div> + <div class="contents-right"> <h1><?php echo $title; ?></h1> diff --git a/tpl/study/list.php b/tpl/study/list.php index c44e45e..8d240fb 100644 --- a/tpl/study/list.php +++ b/tpl/study/list.php @@ -3,11 +3,12 @@ $title = "Studying " . $study['listowner'] . ':' . $study['listname']; require("tpl/general/top.php"); + echo '<div class="small_right"><a href="listrm-study-' . $studyid . '">stop studying</a></div>'; echo '<div class="ordering_links">' . filters_html_full() . '</div>'; -echo '<table><tr><th>Batch name</th><th>actions</th><th>last test</th><th>score</th></tr>'; +echo '<table><tr><th>Batch name</th><th>actions</th><th>tests</th><th>last test</th><th>score</th></tr>'; foreach ($batches as $batch) { $color = ""; if ($batch['lr_date']) { @@ -23,12 +24,25 @@ foreach ($batches as $batch) { } if ($color != "") $color = ' style="background-color: ' . $color . '"'; + $days_color = ($batch['lr_days'] >= 30 ? "#BFBFBF" : + ($batch['lr_days'] >= 20 ? "#C7C7C7" : + ($batch['lr_days'] >= 14 ? "#CFCFCF" : + ($batch['lr_days'] >= 10 ? "#D7D7D7" : + ($batch['lr_days'] >= 7 ? "#DFDFDF" : + ($batch['lr_days'] >= 5 ? "#E7E7E7" : + ($batch['lr_days'] >= 3 ? "#EFEFEF" : + ($batch['lr_days'] >= 1 ? "#F7F7F7" : "#FFFFFF")))))))); + $dc = ($batch['lr_date'] ? ' style="background-color: ' . $days_color .'"' : ''); echo '<tr>'; echo '<td><code>' . $batch['name'] . '</code></td>'; echo '<td><a href="batch-study-' . $batch['id'] . '">view</a> | <a href="batchreview-study-' . $batch['id'] . '">test</a></td>'; - echo '<td>' . ($batch['lr_date'] ? $batch['lr_date'] : "never") . '</td>'; - echo '<td'.$color.'>' . ($batch['lr_date'] ? $batch['lr_score'] . '/100' : 'N/A') . '</td>'; + echo '<td>' . $batch['num_reviews'] . '</td>'; + echo '<td'.$dc.'>' . ($batch['lr_date'] ? $batch['lr_date'] : "never") . '</td>'; + echo '<td'.$color.'>' . ($batch['lr_date'] ? $batch['lr_score'] . '/100' : 'N/A') . + ($batch['blr_date'] ? ($batch['lr_score'] > $batch['blr_score'] ? '<span style="color: green"> ⬈</span>' : + ($batch['lr_score'] < $batch['blr_score'] ? '<span style="color: orange;"> ⬊</span>' : + '<span style="color: grey"> ➡</span>')) : '') . '</td>'; echo '</tr>'; } echo '</table>'; |