summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--GradeBook.css5
-rwxr-xr-xGradeBook.tcl10
2 files changed, 9 insertions, 6 deletions
diff --git a/GradeBook.css b/GradeBook.css
index fd9d65e..98b6193 100644
--- a/GradeBook.css
+++ b/GradeBook.css
@@ -46,6 +46,11 @@ div.controls {
margin-bottom: 15px;
}
+div.controls span.controls {
+ background-color: #ddbb88;
+ font-weight: bold;
+}
+
div.add_new_column {
/*border-bottom: 2px solid black;*/
background-color: #ffcc99;
diff --git a/GradeBook.tcl b/GradeBook.tcl
index 921da17..5934399 100755
--- a/GradeBook.tcl
+++ b/GradeBook.tcl
@@ -593,13 +593,11 @@ proc ShowControls { permission_list user } {
global script_name
dbg "outputing contol list"
puts "<div class=\"controls\">"
- set action_list [ list addcolumnrequest "Add Column" ]
- set separator {}
+ set action_list [ list defaultview "Refresh" addcolumnrequest "Add Column" ]
+ set separator { }
foreach {act act_label} $action_list {
- if { [info exist permission($act) ] } {
- if { $permission($act) } {
- puts -nonewline "$separator<a href=$script_name?action=$act>$act_label</a>"
- }
+ if { [isActionGranted $act $permission_list $user] } {
+ puts -nonewline "$separator<span class=\"controls\"><a href=$script_name?action=$act>$act_label</a></span>"
}
}
puts "</div>"