diff options
Diffstat (limited to 'GradeBook.tcl')
-rwxr-xr-x | GradeBook.tcl | 10 |
1 files changed, 4 insertions, 6 deletions
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>" |