Revision: 1308
http://mrbs.svn.sourceforge.net/mrbs/?rev=1308&view=rev
Author: cimorrison
Date: 2010-03-21 10:38:46 +0000 (Sun, 21 Mar 2010)
Log Message:
-----------
Brought styling of the users table and the list of outstanding provisional
bookings into line with the new styling for the rooms table
Modified Paths:
--------------
mrbs/trunk/web/admin.php
mrbs/trunk/web/edit_users.php
mrbs/trunk/web/mrbs.css.php
Modified: mrbs/trunk/web/admin.php
===================================================================
--- mrbs/trunk/web/admin.php 2010-03-21 08:54:33 UTC (rev 1307)
+++ mrbs/trunk/web/admin.php 2010-03-21 10:38:46 UTC (rev 1308)
@@ -205,7 +205,7 @@
echo "<div id=\"room_info\">\n";
// (a) the "header" column containing the room names
echo "<div id=\"header_column\">\n";
- echo "<table>\n";
+ echo "<table class=\"admin_table\">\n";
echo "<thead>\n";
echo "<tr>\n";
if ($is_admin)
@@ -251,7 +251,7 @@
// (b) the "body" columns containing the room info
echo "<div id=\"body_columns\">\n";
- echo "<table>\n";
+ echo "<table class=\"admin_table\">\n";
echo "<thead>\n";
echo "<tr>\n";
// ignore these columns, either because we don't want to display them,
Modified: mrbs/trunk/web/edit_users.php
===================================================================
--- mrbs/trunk/web/edit_users.php 2010-03-21 08:54:33 UTC (rev 1307)
+++ mrbs/trunk/web/edit_users.php 2010-03-21 10:38:46 UTC (rev 1308)
@@ -746,6 +746,8 @@
print "<table id=\"edit_users_list\" class=\"admin_table\">\n";
print "<thead>\n";
print "<tr>";
+ // First column which is an action button
+ print "<th>" . get_vocab("action") . "</th>";
// Column headers (we don't use 'id' and 'password')
foreach ($fields as $fieldname)
@@ -755,33 +757,46 @@
print "<th>" . get_loc_field_name($fieldname) . "</th>";
}
}
- // Last column which is an action button
- print "<th>" . get_vocab("action") . "</th>";
+
print "</tr>\n";
print "</thead>\n";
print "<tbody>\n";
- $i = 0;
+ $i = 0;
+ $row_class = "odd_row";
while ($line = sql_row_keyed($list, $i++))
{
- print "<tr>\n";
+ $row_class = ($row_class == "even_row") ? "odd_row" : "even_row";
+ echo "<tr class=\"$row_class\">\n";
+ // First column (the action button)
+ print "<td style=\"text-align: center\">\n";
+ // You can only edit a user if you have sufficient admin rights, or else
if that user is yourself
+ if (($level >= $min_user_editing_level) || (strcasecmp($line['name'],
$user) == 0))
+ {
+ echo "<form method=\"post\" action=\"" .
htmlspecialchars(basename($PHP_SELF)) . "\">\n";
+ echo "<div>\n";
+ echo "<input type=\"hidden\" name=\"Action\" value=\"Edit\">\n";
+ echo "<input type=\"hidden\" name=\"Id\" value=\"" . $line['id'] .
"\">\n";
+ echo "<button type=\"submit\" name=\"action\" value=\"edit\" title=\"" .
get_vocab("edit") . "\">\n";
+ echo "<img src=\"images/edit.png\" width=\"16\" height=\"16\" alt=\"" .
get_vocab("edit") . "\">\n";
+ echo "</button>\n";
+ echo "</div>\n";
+ echo "</form>\n";
+ }
+ else
+ {
+ print " \n";
+ }
+ print "</td>\n";
// Column contents
foreach ($line as $key=>$col_value)
- {
- // sql_row_keyed returns an array indexed by both index number annd key
name,
- // so skip past the index numbers
- if (is_int($key))
- {
- continue;
- }
+ {
switch($key)
{
case 'id':
- $this_id = $col_value; // Don't display it, but remember it.
- break;
case 'password':
- break; // Don't display the password
+ break; // Don't display the id or password
case 'level':
echo "<td>" . get_vocab("level_$col_value") . "</td>\n";
break;
@@ -791,24 +806,6 @@
} // end switch
} // end foreach
- // Last column (the action button)
- print "<td>\n";
- // You can only edit a user if you have sufficient admin rights, or else
if that user is yourself
- if (($level >= $min_user_editing_level) || (strcasecmp($line['name'],
$user) == 0))
- {
- print "<form method=\"post\" action=\"" .
htmlspecialchars(basename($PHP_SELF)) . "\">\n";
- print " <div>\n";
- print " <input type=\"hidden\" name=\"Action\" value=\"Edit\">\n";
- print " <input type=\"hidden\" name=\"Id\" value=\"$this_id\">\n";
- print " <input type=\"submit\" value=\"" . get_vocab("edit") .
"\">\n";
- print " </div>\n";
- print "</form>\n";
- }
- else
- {
- print " \n";
- }
- print "</td>\n";
print "</tr>\n";
} // end while
Modified: mrbs/trunk/web/mrbs.css.php
===================================================================
--- mrbs/trunk/web/mrbs.css.php 2010-03-21 08:54:33 UTC (rev 1307)
+++ mrbs/trunk/web/mrbs.css.php 2010-03-21 10:38:46 UTC (rev 1308)
@@ -32,11 +32,15 @@
h2 {font-size: large}
img {border: 0}
+button {background-color: transparent; border: 0; padding: 0}
+button img {vertical-align: middle}
a:link {color: <?php echo $anchor_link_color ?>; text-decoration: none;
font-weight: bold}
a:visited {color: <?php echo $anchor_visited_color ?>; text-decoration: none;
font-weight: bold}
a:hover {color: <?php echo $anchor_hover_color ?>; text-decoration:
underline; font-weight: bold}
+tr.even_row {background-color: <?php echo $row_even_color ?>}
+tr.odd_row {background-color: <?php echo $row_odd_color ?>}
td, th {vertical-align: top}
@@ -53,23 +57,21 @@
border: 1px solid <?php echo $admin_table_border_color ?>}
fieldset fieldset {position: relative; clear: left; width: 100%; padding: 0;
border: 0; margin: 0} /* inner fieldsets are invisible */
fieldset fieldset legend {font-size: 0} /* for IE: even if there is no
legend text, IE allocates space */
-
-
-table.admin_table {border-spacing: 0px; border-collapse: collapse;
border-color: <?php echo $admin_table_header_back_color ?>; border-style: solid;
- border-top-width: 0; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 0}
-.admin_table th, .admin_table td {padding: 0.1em 0.5em 0.1em 0.5em;
vertical-align: middle; text-align: left;
- border-top-width: 1px; border-right-width: 0; border-bottom-width: 0;
border-left-width: 1px; border-style: solid;
- border-top-color: <?php echo $admin_table_header_back_color ?>}
-.admin_table th {color: <?php echo $admin_table_header_font_color ?>;
font-size: small;
- background-color: <?php echo $admin_table_header_back_color ?>;
- border-left-color: <?php echo $admin_table_header_sep_color ?>}
-.admin_table th:first-child {border-left-color: <?php echo
$admin_table_header_back_color ?>}
-.admin_table td {border-left-color: <?php echo $admin_table_header_back_color
?>;}
.naked {margin: 0; padding: 0; border-width: 0} /* Invisible tables used for
internal needs */
table.naked {width: 100%; height: 100%}
table:hover.naked {cursor: pointer} /* set cursor to pointer; if you don't
it doesn't show up when show_plus_link is false */
+table.admin_table {border-spacing: 0px; border-collapse: collapse;
border-color: <?php echo $admin_table_border_color ?>; border-style: solid;
+ border-top-width: 0; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 0}
+.admin_table th, .admin_table td {vertical-align: middle; text-align: left;
+ padding: 0.1em 0.5em 0.1em 0.5em;
+ border-top-width: 0; border-right-width: 0; border-bottom-width: 0;
border-left-width: 1px; border-style: solid;}
+.admin_table th {color: <?php echo $admin_table_header_font_color ?>;
+ background-color: <?php echo $admin_table_header_back_color ?>}
+.admin_table td, .admin_table th {border-color: <?php echo
$admin_table_border_color ?>}
+.admin_table th:first-child {border-left-color: <?php echo
$admin_table_header_back_color ?>}
+
select.room_area_select {margin-right: 0.5em}
/* ------------ ADMIN.PHP ---------------------------*/
@@ -104,34 +106,20 @@
#area_form label#area_label {display: block; float: left; font-weight: bold;
margin-right: <?php echo $admin_form_gap ?>em}
#areaChangeForm select {display: block; float: left; margin: -0.1em 1.5em 0 0}
#areaChangeForm input {float: left; margin: -0.2em 0.5em 0 0}
-#areaChangeForm button {display: block; float: left; margin: -0.2em 0.5em 0
0.5em;
- background-color: transparent; border: 0; padding: 0}
-#areaChangeForm button img {vertical-align: middle}
+#areaChangeForm button {display: block; float: left; margin: -0.2em 0.5em 0
0.5em}
div#room_info {width: 100%; float: left}
div#header_column, div#body_columns {position: relative; float: left;
overflow-x: scroll; overflow-y: hidden}
div#header_column {max-width: 20%}
div#body_columns {max-width: 80%}
-#room_info table {border-spacing: 0px; border-collapse: collapse;
border-color: <?php echo $admin_table_border_color ?>; border-style: solid;
- border-top-width: 0; border-right-width: 1px; border-bottom-width: 1px;
border-left-width: 0}
#room_info th div, #room_info td div {display: table-cell; vertical-align:
middle; white-space: nowrap; overflow: hidden}
#room_info th div {height: 1.5em; max-height: 1.5em; min-height: 1.5em}
#room_info td div {height: 2em; max-height: 2em; min-height: 2em}
#room_info td.int div {width: 6em; text-align: right; padding-right: 0.5em}
+#body_columns .admin_table th:first-child {border-left-color: <?php echo
$admin_table_border_color ?>}
-tr.even_row {background-color: <?php echo $row_even_color ?>}
-tr.odd_row {background-color: <?php echo $row_odd_color ?>}
-#room_info th, #room_info td {vertical-align: middle; text-align: left;
- padding: 0.1em 0.5em 0.1em 0.5em;
- border-top-width: 0; border-right-width: 0; border-bottom-width: 0;
border-left-width: 1px; border-style: solid;}
-#room_info th {color: <?php echo $admin_table_header_font_color ?>;
- background-color: <?php echo $admin_table_header_back_color ?>;
- }
-#room_info td, #room_info th {border-color: <?php echo
$admin_table_border_color ?>}
-#room_info #header_column th:first-child {border-left-color: <?php echo
$admin_table_header_back_color ?>}
-
/* ------------ DAY/WEEK/MONTH.PHP ------------------*/
<?php
@@ -700,13 +688,14 @@
#pending_list table.minimised tbody {display: none}
#pending_list table th {border-top: 1px solid <?php echo
$admin_table_header_sep_color ?>;
background-color: <?php echo
$pending_header_back_color ?>}
+#pending_list td {border-top-width: 1px}
#pending_list .control {padding-left: 0; padding-right: 0; text-align: center;
color: <?php echo $standard_font_color ?>}
#pending_list th.control + th {border-left-width: 0}
#pending_list td.control + td {border-left-width: 0}
#pending_list table th.control{background-color: <?php echo
$pending_control_color ?>; cursor: default}
#pending_list table th a {color: <?php echo $admin_table_header_font_color ?>}
-#pending_list table td {border-color: <?php echo $pending_header_back_color ?>;
+#pending_list table td {border-color: <?php echo $admin_table_border_color ?>;
background-color: <?php echo $series_entry_back_color
?>}
#pending_list .control {width: 1.2em}
#pending_list th.header_name {width: 10%}
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mrbs-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mrbs-commits