summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2011-01-19 20:41:09 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2011-01-19 20:41:09 -0500
commit555b7aa5a63aa631a963b4cb6196d41d650bc605 (patch)
treeebe20cf5d6b39a453e4de26bd7db39ee88bb978a
parent6526ed8ec7d6ef2f696fbced58aa6e7baa040537 (diff)
downloadGradeBook-555b7aa5a63aa631a963b4cb6196d41d650bc605.tar.gz
GradeBook-555b7aa5a63aa631a963b4cb6196d41d650bc605.zip
added refresh control link
Ignore-this: 49471725aeff6a76775acb33ef2813ea darcs-hash:20110120014109-067c0-2410a582fdbc60d7f1e170d4a1dd3e8d4f779008.gz
-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>"